Table of Contents

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

Response

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

Response

Example:

Command

{
   "device":[
      {
         "command":"enterBootloader"
      }
   ]
}

Response

{
   "device":[
      {
         "command":"enterBootloader",
         "statusCode":0,
         "wait":1000         
      }
   ]
}


Calibration - Get Instructions


Get user calibration instructions.

Command

Response

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

Response

Example:

Command

{
   "device":[
      {
         "command":"calibrationGetStatus"
      }
   ]
}

Response

{
   "device":[
      {
         "command":"calibrationGetStatus",
         "statusCode":0,
         "wait":500,
         "status": "idle"
      }
   ]
}


Calibration - Get Storage Types


Get calibration storage types.

Command

Response

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

Response

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

Response

Example:

Command

{
   "device":[
      {
         "command":"calibrationRead"
      }
   ]
}

Response

{
   "device":[
      {
         "command":"calibrationRead",
         "statusCode":0,
         "wait":0,
         "calibrationData" : {
           <ARBITRARY JSON CALIBRATION DATA>
         }
      }
   ]
}


Calibration - Save


Save the calibration data to non-volatile storage. Command

Response

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

Response

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

Response

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

Response

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

Response

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

Response

Example:

Command

{
   "device":[
      {
         "command":"nicList"
      }
   ]
}

Response

{
   "device":[
      {
         "command":"nicList",
         "statusCode":0,
         "wait":0,
         "nics": ["wlan0"]
      }
   ]
}


Reset Instruments


Reset all instruments on the device.

Command

Response

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

Response

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

Response

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

Response

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

Response

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

Response

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

Response

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

Response

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

Response

Example:

Command

{
   "device":[
      {
         "command":"wifiSetParameters",
         "ssid":"HorseFeathers",         
         "securityType":"wpa2",
         "passphrase":"swordfish",
         "autoConnect":true
      }
   ]
}

Response

{
   "device":[
      {
         "command":"wifiSetParameters",
         "statusCode":0,
         "wait":0
      }
   ]
}