====== Device ====== Commands that provide access to device level data and functions. ===== Enumerate ===== ---- Enumerate all device info. This should return static information about the device. Dynamic data should be retrieved using getters. **Command** * **device** - (Object) - The device object. * **command** - (String) - The Enumerate command: “enumerate” **Response** * **awg** - (Object) - The AWG instrument object.\\ * **numChans** - (Integer) - The number of AWG channels. * **#** - (Integer) - An AWG channel number. * **signalTypes** - (Array) - Array of supported regular signal types. * **signalFreqMin** - (Integer) - The minimum regular signal frequency in mHz. * **signalFreqMax** - (Integer) - The maximum regular signal frequency in mHz. * **dataType** - (String) - The sample data type (ex. I16). * **bufferSizeMax** - (Integer) - The maximum buffer size of the specified channel in samples. * **dacVpp** - (Integer) - The peak to peak voltage range of the digital to analog converter in mV. * **sampleFreqMin** - (Integer) - The minimum sample frequency in mHz. * **sampleFreqMax** - (Integer) - The maximum sample frequency in mHz. * **vOffsetMin** - (Integer) - The minimum supported offset voltage in mV. * **vOffsetMax** - (Integer) - The maximum supported offset voltage in mV. * **vOutMin** - (Integer) - The minimum supported output voltage in mV. * **vOutMax** - (Integer) - The maximum supported output voltage in mV. * **osc** - (Object) - The OSC instrument object.\\ * **la** - Notes: MSB first, bits are right justified and contiguous. ===Example:=== **Command** { "device":[ { "command":"enumerate" } ] } **Response** { "device": [ { "command": "enumerate", "statusCode": 0, "wait": 0, "deviceMake": "Digilent", "deviceModel": "OpenScope MZ", "calibrationSource": "flash", "firmwareVersion": { "major": 0, "minor": 283, "patch": 0 }, "awg": { "1": { "signalTypes": [ "sine", "square", "sawtooth", "triangle", "dc" ], "signalFreqMin": 100, "signalFreqMax": 1000000000, "dataType": "I16", "bufferSizeMax": 32640, "dacVpp": 3000, "sampleFreqMin": 1000000, "sampleFreqMax": 10000000000, "vOffsetMin": -1500, "vOffsetMax": 1500, "vOutMin": -3000, "vOutMax": 3000 }, "numChans": 1 }, "dc": { "1": { "voltageMin": -4000, "voltageMax": 4000, "voltageIncrement": 40, "currentMin": 0, "currentMax": 50, "currentIncrement": 0 }, "2": { "voltageMin": -4000, "voltageMax": 4000, "voltageIncrement": 40, "currentMin": 0, "currentMax": 50, "currentIncrement": 0 }, "numChans": 2 }, "gpio": { "numChans": 10, "sourceCurrentMax": 7000, "sinkCurrentMax": 12000 }, "la": { "numChans": 1, "1": { "bufferDataType": "U16", "numDataBits": 10, "bitmask": 1023, "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "bufferSizeMax": 32640 } }, "osc": { "1": { "resolution": 12, "effectiveBits": 11, "bufferSizeMax": 32640, "bufferDataType": "I16", "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "delayMax": 4611686018427388000, "delayMin": -32640000000000000, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [ 1, 0.25, 0.125, 0.075 ] }, "2": { "resolution": 12, "effectiveBits": 11, "bufferSizeMax": 32640, "bufferDataType": "I16", "sampleFreqMin": 6000, "sampleFreqMax": 6250000000, "delayMax": 4611686018427388000, "delayMin": -32640000000000000, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [ 1, 0.25, 0.125, 0.075 ] }, "numChans": 2 }, "log": { "analog": { "1": { "resolution": 12, "effectiveBits": 12, "bufferSizeMax": 32702, "fileSamplesMax": 2147483136, "sampleDataType": "I16", "sampleFreqUnits": 0.000001, "sampleFreqMin": 1, "sampleFreqMax": 50000000000, "delayUnits": 1e-12, "delayMax": 9223372036854776000, "delayMin": 0, "voltageUnits": 0.001, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [1, 0.25, 0.125, 0.075] }, "2": { "resolution": 12, "effectiveBits": 12, "bufferSizeMax": 32702, "fileSamplesMax": 2147483136, "sampleDataType": "I16", "sampleFreqUnits": 0.000001, "sampleFreqMin": 1, "sampleFreqMax": 50000000000, "delayUnits": 1e-12, "delayMax": 9223372036854776000, "delayMin": 0, "voltageUnits": 0.001, "adcVpp": 3000, "inputVoltageMax": 20000, "inputVoltageMin": -20000, "gains": [1, 0.25, 0.125, 0.075] }, "fileFormat": 1, "fileRevision": 1, "numChans": 2 } } } ] } \\ \\ ===== Enter Bootloader ===== ---- Put the device in the bootloader. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Enter Bootloader command: “enterBootloader” **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Enter Bootloader command: “enterBootloader” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"enterBootloader" } ] } **Response** { "device":[ { "command":"enterBootloader", "statusCode":0, "wait":1000 } ] } \\ ===== Calibration - Get Instructions ===== ---- Get user calibration instructions. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Get Instructions command: “calibrationGetInstructions” **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Get Instructions command: “calibrationGetInstructions” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **calibrationInstructions** - (String) - User calibration instructions. ===Example:=== **Command** { "device":[ { "command":"calibrationGetInstructions" } ] } **Response** { "device":[ { "command":"calibrationGetInstructions", "statusCode":0, "wait":0, "instructions":"Connect the Orange OSC1 lead to the Blue AWG1 Lead". } ] } \\ ===== Calibration - Get Status ===== ---- Get the calibration status. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Get Status command: "calibrationGetStatus" **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Get Status command: "calibrationGetStatus" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **status** - (String) - The calibration process status: "idle", "runningPretest", "calibrating", "calibrationFailed". ===Example:=== **Command** { "device":[ { "command":"calibrationGetStatus" } ] } **Response** { "device":[ { "command":"calibrationGetStatus", "statusCode":0, "wait":500, "status": "idle" } ] } \\ ===== Calibration - Get Storage Types ===== ---- Get calibration storage types. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Get Calibration Storage Types command: "calibrationGetStorageTypes" **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Get Calibration Storage Types command: "calibrationGetStorageTypes" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **storageTypes** - (Array) - Array of calibration storage types (ex. 'flash', 'sd'). ===Example:=== **Command** { "device":[ { "command":"calibrationGetStorageTypes" } ] } **Response** { "device":[ { "command":"calibrationGetStorageTypes", "statusCode":0, "wait":0, "storageTypes":[ "flash", "sd" ] } ] } \\ ===== Calibration - Load ===== ---- Load saved calibration data into the working register. The calibration data is not applied to the instruments until **Calibration Apply** is called. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Load command: "calibrationLoad" * **name** - (String) - The calibration data to load (ex: "flash", "sd"). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Load command: "calibrationLoad" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"calibrationLoad", "type":"flash" } ] } **Response** { "device":[ { "command":"calibrationLoad", "statusCode":0, "wait":0 } ] } \\ ===== Calibration - Read ===== ---- Read the calibration data from the working register. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Read command: "calibrationRead". **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Read command: "calibrationRead". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **calibrationData** - (Object) - Device specific calibration data expressed as a JSON object. ===Example:=== **Command** { "device":[ { "command":"calibrationRead" } ] } **Response** { "device":[ { "command":"calibrationRead", "statusCode":0, "wait":0, "calibrationData" : { } } ] } \\ ===== Calibration - Save ===== ---- Save the calibration data to non-volatile storage. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Save command: "calibrationSave" * **type** - (String) - The configuration type to save (ex. "flash", "sd"). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Save command: "calibrationSave" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"calibrationSave", "type": "flash" } ] } **Response** { "device":[ { "command":"calibrationSave", "statusCode":0, "wait":0 } ] } \\ ===== Calibration - Start ===== ---- Start the calibration process. This function returns immediately. If the calibration process completes successfully new calibration data is saved in the calibration data working register. Use the Calibration Save and Calibration Apply functions to save of apply the new calibration data. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Calibration Start command: "calibrationStart" **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Calibration Start command: "calibrationStart" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"calibrationStart" } ] } **Response** { "device":[ { "command":"calibrationStart", "statusCode":0, "wait":45 } ] } \\ ===== NIC - Connect ===== ---- Connect to the active network using the specified network adapter. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The NIC Connect command: "nicConnect " * **adapter** - (String) - The network adapter to use (ex. "wlan0", "wlan1"). * **parameterSet** - (String) - The source of the NIC parameter set (ex. "activeParameterSet", "workingParameterSet") * **force** - (Boolean) - If the specified adapter is already connected and "force" is true the adapter will disconnected and attempt to connect. If the adapter is connected and "force" is false an error is returned. If the adapter is not connected "force" is ignored. **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The NIC Connect command: "nicConnect " * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"nicConnect", "adapter":"wlan0", "parameterSet":"activeParameterSet", "force":true } ] } **Response** { "device":[ { "command":"nicConnect", "statusCode":0, "wait":-1 } ] } \\ ===== NIC - Disconnect ===== ---- Disconnect the specified network adapter from the currently connected network. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The NIC Disconnect command: "nicDisconnect" * **adapter** - (String) - The network adapter to use (ex. wlan0, wlan1). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The NIC Disconnect command: "nicDisconnect" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"nicDisconnect", "adapter":"wlan0" } ] } **Response** { "device":[ { "command":"nicDisconnect", "statusCode":0, "wait":-1 } ] } \\ ===== NIC - Get Status ===== ---- Get the status of the specified network interface controller. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Get NIC Status command: "nicGetStatus" * **adapter** - (String) - The network adapter to use (ex. eth0, eth1, wlan0, wlan1, workingParameterSet). * Note: "workingParameterSet" will return the value in the working parameter set. Status will always be disconnected. **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Get NIC Status command: "nicGetStatus" * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **adapter** - (String) - The network adapter (ex. eth0, eth1, wlan0, wlan1). * **securityType** - (String) - The network security type: "open", "wep40", "wep104", "wpa", "wpa2". * **status** - (String) - NIC status: "connected", "disconnected". * **ssid** - (String) - The specified network adapter's SSID or an empty string if now SSID is set. A non-empty SSID does not indicate that the network adapter is connected. * **ipAddress** - (String) - The IP address of the device (if connected). ===Example:=== **Command** { "device":[ { "command":"nicGetStatus", "adapter":"wlan0" } ] } **Response** { "device":[ { "command":"nicGetStatus", "statusCode":0, "wait":0, "adapter": "wlan0", "securityType": "wpa2", "status":"connected", "ssid": "HorseFeathers", "ipAddress": "192.168.1.127" } ] } \\ ===== NIC - List ===== ---- List all network adapters on the device. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The NIC List command: "nicList". **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Enter Bootloader command: “enterBootloader” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **nics** - (Array) - An array of all the NICs on the device. ===Example:=== **Command** { "device":[ { "command":"nicList" } ] } **Response** { "device":[ { "command":"nicList", "statusCode":0, "wait":0, "nics": ["wlan0"] } ] } \\ ===== Reset Instruments ===== ---- Reset all instruments on the device. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Reset Instruments command: “resetInstruments”. **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Reset Instruments command: “resetInstruments”. * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:protocol-status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"resetInstruments" } ] } **Response** { "device": [ { "command": "resetInstruments", "statusCode": 0, "wait": 1000 } ] } \\ \\ ===== Storage - Get Locations ===== ---- Get a list of all non-volatile storage locations. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Storage Get Locations command: "storageGetLocations". **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Storage Get Locations command: "storageGetLocations". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **storageLocations** - (Array) - The devices storage locations (ex. "flash", "sd0", "/tmp/") ===Example:=== **Command** { "device":[ { "command":"storageGetLocations" } ] } **Response** { "device":[ { "command":"storageGetLocations", "statusCode":0, "wait":0, "storageLocations":[ "flash", "sd0" ] } ] } \\ ===== Wifi - Delete Saved Parameters ===== ---- Delete the specified saved Wifi network. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Delete Saved Parameters command: "wifiDeleteParameters". * **storageLocation** - (String) - The location to delete saved network parameters from (ex. "flash", "sd"). * **ssid** - (String) - The network SSID to delete. **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi Delete Saved Parameters command: "wifiDeleteParameters". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"wifiDeleteParameters", "storageLocation":"flash", "ssid":"HorseFeathers" } ] } **Response** { "device":[ { "command":"wifiDeleteParameters", "statusCode": 0, "wait": 0 } ] } \\ ===== Wifi - List Saved Parameters ===== ---- List all saved network parameters. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi List Saved Parameters command: "wifiListSavedParameters". * **storageLocation** - (String) - The location to read saved network parameters from (ex. "flash", "sd"). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi List Saved Parameters command: "wifiListSavedParameters". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **parameterSets** - (Object) - An object describing the network parameters. * **ssid** - (String) - The network SSID. * **securityType** - (String) - The network security type: "open", "wep40", "wep104", "wpa", "wpa2". * **autoConnect** - (boolean) - True if the device should automatically connect to this network on boot. ===Example:=== **Command** { "device":[ { "command":"wifiListSavedParameters", "storageLocation":"flash" } ] } **Response** { "device":[ { "command":"wifiListSavedParameters", "statusCode":0, "parameterSets":[ { "ssid":"HorseFeathers", "securityType":"wpa2", "autoConnect":true } ] } ] } \\ ===== Wifi - Load Parameters ===== ---- Load a saved network parameters into the working register. This command does not connect to the network. Use the Wifi Connect Network command to connect to the network after loading it. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Load Parameters command: "wifiLoadParameters". * * **storageLocation** - (String) - The location to read saved network parameters from (ex. "flash", "sd"). * **ssid** - (String) - The SSID of the network parameters to load. **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi Load Parameters command: "wifiLoadParameters". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"wifiLoadParameters", "storageLocation":"flash", "ssid":"HorseFeathers" } ] } **Response** { "device":[ { "command":"wifiLoadParameters", "statusCode":0, "wait":0 } ] } \\ ===== Wifi - Read Scanned Networks ===== ---- Read the list of networks detected by the previous Wifi Scan call. Scan data is only available after a successful scan and is lost on the next call of a NIC or Wifi command. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Read Scanned Networks command: "wifiReadScannedNetworks". * **adapter** - (String) - The network adapter to use (ex. wlan0, wlan1). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi Read Scanned Networks command: "wifiReadScannedNetworks". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. * **adapter** - (String) - The network adapter to use (ex. wlan0, wlan1). * **networks** - (Array) - Array of objects describing scanned networks. * **ssid** - (String) - The network SSID. * **bssid** - (String) - The network SSID. * **securityType** - (String) - The network security type: "open", "wep40", "wep104", "wpa", "wpa2". * **channel** - (Integer) - The network channel. * **signalStrength** - (Integer) - The network signal strength in arbitrary units from 0 (lowest) to 100 (highest). ===Example:=== **Command** { "device":[ { "command":"wifiReadScannedNetworks", "adapter":"wlan0" } ] } **Response** { "device":[ { "command":"wifiReadScannedNetworks", "statusCode":0, "wait":0, "adapter":"wlan0", "networks":[ { "ssid":"HorseFeathers", "bssid":"HorseFeathers", "securityType":"wpa2", "channel": 1, "signalStrength":100 } ] } ] } \\ ===== Wifi - Save Parameters ===== ---- Save the parameters from the working parameter set to storage. If a network with the same SSID already exists in non-volatile storage this function will overwrite it. **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Save Parameters command: "wifiSaveParameters". * **storageLocation** - (String) - The location to save the current network parameters. \\ //**Note that locations outside of flash may not be secure!** See [[software:digilent-instrumentation-protocol:protocol#storage_-_get_locations| storageGetLocations]] for a list of available storage locations. // **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi Save Parameters command: "wifiSaveParameters". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"wifiSaveParameters", "storageLocation":"flash" } ] } **Response** { "device":[ { "command":"wifiSaveParameters", "statusCode":0, "wait":0 } ] } \\ ===== Wifi - Scan ===== ---- Scan for Wifi networks. This function returns immediately and results can be collected using the Wifi Read Available Networks command. An error is returned if the specified adapter is not able to scan (ie if it is connected). **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Scan command: "wifiScan". * **adapter** - (String) - The network adapter to use (ex. wlan0, wlan1). **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Wifi Scan command: "wifiScan". * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command": "wifiScan", "adapter":"wlan0" } ] } **Response** { "device":[ { "command": "wifiScan", "statusCode": 0, "wait": -1 } ] } \\ ===== Wifi - Set Parameters ===== ---- Set one or more parameter of the active network. Changes are applied to the working register (active network) only. \\ //Note: Currently only DHCP is supported (not static IP)// **Command** * **device** - (Array) - Array of command objects to apply to the device. * **command** - (String) - The Wifi Set Parameters command: "wifiSetParameters" * **ssid** - (String) - The network SSID * **securityType** - (String) - The network security type: "open", "wep40", "wep104", "wpa", "wpa2". * **passphrase** - (String) - Optional - The passphrase when using WPA or WPA2 (ignored if not using WPA/WPA2) * **keys** - (String) - Optional - The key(s) for the network. Depends on the security type. The key should be expressed as hex values separated by ':' (ex. 01:02:03:AA...). * **keyIndex** - (Number) - Optional - The key index. This field is ignored if securityType is not 'wep40' or 'wep104' * **autoConnect** - (Boolean) - If true the device will attempt to auto connect to this network whenever it is in range **Response** * **device** - (Array) - Array of response objects to apply to the device. * **command** - (String) - The Enter Bootloader command: “enterBootloader” * **statusCode** - (Integer) - A numeric value representing the device status. See [[software:digilent-instrumentation-protocol:status-codes]] * **wait** - (Integer) - The number of ms to wait before the device is ready to process another command. ===Example:=== **Command** { "device":[ { "command":"wifiSetParameters", "ssid":"HorseFeathers", "securityType":"wpa2", "passphrase":"swordfish", "autoConnect":true } ] } **Response** { "device":[ { "command":"wifiSetParameters", "statusCode":0, "wait":0 } ] } \\