Overview…
Note: JSON data below is expanded for readability. All JSON should be minified (white space removed) before being transmitted.
All open scope commands are JSON objects (start with '{' and with '}' or OSJB (in chunck notation) Add JSON command that went sent via terminal puts the device into JSON command mode
All commands below are valid when the device is in either JSON mode or menu mode.
Put the device into JSON command mode.
{"mode":"JSON"}\r\n
Put the device into menu command mode.
{"mode":"menu"}\r\n
Commands that provide access to device level data and functions.
Enumerate all device info.
This should return static information about the device. Dynamic data should be retrieved using getters.
Type: POST
Response
Send
{
"device":[
{
"command":"enumerate"
}
]
}
Response
{
"device":[
{
"command":"enumerate",
"statusCode":0,
"wait":0,
"deviceMake":"Digilent",
"deviceModel":"OpenScope-MZ",
"firmwareVersion":{
"major":1,
"minor":0,
"patch":0
},
"awg":{
"numChans":1,
"1":{
"signalTypes":[
"sine",
"square",
"sawtooth",
"triangle",
"dc"
],
"signalFreqMin":312000,
"signalFreqMax":1000000000,
"dataType":"I16",
"bufferSizeMax":32640,
"dacVpp":3000,
"sampleFreqMin":1000,
"sampleFreqMax":1000000000,
"vOffsetMin":-1500,
"vOffsetMax":1500,
"vOutMin":-3000,
"vOutMax":3000
}
},
"dc":{
"numChans":2,
"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
}
},
"gpio": {
"numChans": 10,
"sourceCurrentMax": 50,
"sinkCurrentMax": 50
},
"la":{
"numChans":10
},
"osc":{
"numChans":2,
"1":{
"resolution": 12,
"effectiveBits":11,
"bufferSizeMax":32640,
"bufferDataType":"I16",
"sampleFreqMin": 1000,
"sampleFreqMax": 6250000000,
"adcVpp":3000,
"inputVoltageMax": 20000,
"inputVoltageMin": -20000,
"gains":[
1,
0.25,
0.125,
0.075
]
},
"2":{
"resolution": 12,
"effectiveBits":11,
"bufferSizeMax":32640,
"bufferDataType":"I16",
"sampleFreqMin": 1000,
"sampleFreqMax": 6250000000,
"adcVpp":3000,
"inputVoltageMax": 20000,
"inputVoltageMin": -20000,
"gains":[
1,
0.25,
0.125,
0.075
]
}
}
}
]
}
Reset all instruments on the device.
Type: POST
Send
{
"device":[
{
"command":"resetInstruments"
}
]
}
Response
{
"device": [
{
"command": "resetInstruments",
"statusCode": 0,
"wait": 1000
}
]
}
Get a list of all non-volatile storage locations.
Command
Response
Send
{
"device":[
{
"command":"storageGetLocations"
}
]
}
Response
{
"device":[
{
"command":"storageGetLocations",
"statusCode":0,
"wait":0,
"storageLocations":[
"flash",
"sd0"
]
}
]
}
Get calibration storage types.
Command
Response
Send
{
"device":[
{
"command":"calibrationGetStorageTypes"
}
]
}
Response
{
"device":[
{
"command":"calibrationGetStorageTypes",
"statusCode":0,
"wait":0,
"storageTypes":[
"USER",
"FACTORY"
]
}
]
}
Get user calibration instructions.
Command
Response
Send
{
"device":[
{
"command":"calibrationGetInstructions"
}
]
}
Response
{
"device":[
{
"command":"calibrationGetInstructions",
"statusCode":0,
"wait":0,
"instructions":"Connect the Orange OSC1 lead to the Blue AWG1 Lead".
}
]
}
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
Send
{
"device":[
{
"command":"calibrationStart"
}
]
}
Response
{
"device":[
{
"command":"calibrationStart",
"statusCode":0,
"wait":45
}
]
}
Load saved calibration data into the working register. The calibration data is not applied to the instruments until Calibration Apply is called.
Command
Response
Send
{
"device":[
{
"command":"calibrationLoad",
"type":"FACTORY"
}
]
}
Response
{
"device":[
{
"command":"calibrationLoad",
"statusCode":0,
"wait":0
}
]
}
Read the calibration data from the working register.
Command
Response
Send
{
"device":[
{
"command":"calibrationRead"
}
]
}
Response
{
"device":[
{
"command":"calibrationRead",
"statusCode":0,
"wait":0,
"calibrationData" : {
<ARBITRARY JSON CALIBRATION DATA>
}
}
]
}
Save the calibration data to non-volatile storage.
Command
Response
Send
{
"device":[
{
"command":"calibrationSave",
"type": "USER"
}
]
}
Response
{
"device":[
{
"command":"calibrationSave",
"statusCode":0,
"wait":0
}
]
}
Get the calibration status. Command
Response
Send
{
"device":[
{
"command":"calibrationGetStatus"
}
]
}
Response
{
"device":[
{
"command":"calibrationGetStatus",
"statusCode":0,
"wait":500,
"status": "idle"
}
]
}
List all network adapters on the device.
Command
Response
Send
{
"device":[
{
"command":"nicList"
}
]
}
Response
{
"device":[
{
"command":"nicList",
"statusCode":0,
"wait":0,
"nics": ["wlan0"]
}
]
}
Get the status of the specified network interface controller.
Command
Response
Send
{
"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"
}
]
}
Connect to the active network using the specified network adapter.
Command
Send
{
"device":[
{
"command":"nicConnect",
"adapter":"wlan0",
"parameterSet":"activeParameterSet",
"force":true
}
]
}
Response
{
"device":[
{
"command":"nicConnect",
"statusCode":0,
"wait":-1
}
]
}
Disconnect the specified network adapter from the currently connected network.
Command
Send
{
"device":[
{
"command":"nicDisconnect",
"adapter":"wlan0"
}
]
}
Response
{
"device":[
{
"command":"nicDisconnect",
"statusCode":0,
"wait":-1
}
]
}
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
Send
{
"device":[
{
"command": "wifiScan",
"adapter":"wlan0"
}
]
}
Response
{
"device":[
{
"command": "wifiScan",
"statusCode": 0,
"wait": -1
}
]
}
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
Send
{
"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
}
]
}
]
}
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
Send
{
"device":[
{
"command":"wifiSetParameters",
"ssid":"HorseFeathers",
"securityType":"wpa2",
"passphrase":"swordfish",
"autoConnect":true
}
]
}
Response
{
"device":[
{
"command":"wifiSetParameters",
"statusCode":0,
"wait":0
}
]
}
List all saved network parameters.
Command
Send
{
"device":[
{
"command":"wifiListSavedParameters",
"storageLocation":"flash"
}
]
}
Response
{
"device":[
{
"command":"wifiListSavedParameters",
"statusCode":0,
"parameterSets":[
{
"ssid":"HorseFeathers",
"securityType":"wpa2",
"autoConnect":true
}
]
}
]
}
Delete the specified saved Wifi network.
Command
Send
{
"device":[
{
"command":"wifiDeleteParameters",
"storageLocation":"flash",
"ssid":"HorseFeathers"
}
]
}
Response
{
"device":[
{
"command":"wifiDeleteParameters",
"statusCode": 0,
"wait": 0
}
]
}
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
Send
{
"device":[
{
"command":"wifiSaveParameters",
"storageLocation":"flash"
}
]
}
Response
{
"device":[
{
"command":"wifiSaveParameters",
"statusCode":0,
"wait":0
}
]
}
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
Send
{
"device":[
{
"command":"wifiLoadParameters",
"storageLocation":"flash",
"ssid":"HorseFeathers"
}
]
}
Response
{
"device":[
{
"command":"wifiLoadParameters",
"statusCode":0,
"wait":0
}
]
}
Put the device in the bootloader.
Command
Response
Send
{
"device":[
{
"command":"enterBootloader"
}
]
}
Response
{
"device":[
{
"command":"enterBootloader",
"statusCode":0,
"wait":1000
}
]
}
Commands that provide access to Arbitrary Waveform Generator data and functions.
Get the current state of the instrument's channel
Send
{
"awg": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"awg": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"state": "running",
"waveType": "sine",
"actualSignalFreq": 1000000,
"actualVpp": 3000,
"actualVOffset": 0,
"wait": 0
}
]
}
}
Set the parameters of the arbitrary waveform generator channel(s) to output an arbitrary waveform.
sampleFreq - Samples per second in mHz
Send
225
{
"awg":{
"1":[
{
"command":"setArbitraryWaveform",
"binaryOffset":0,
"binaryLength":20000,
"binaryType":"I16",
"vpp":3000,
"vOffset":0,
"sampleFreq":1000000
}
]
}
}
<20000 Byte BLOB>
Response
{
"awg":{
"1":[
{
"command":"setArbitraryWaveform",
"statusCode":0,
"wait":0
}
]
}
}
Set the parameters of the arbitrary waveform generator channel(s) to output a regular waveform.
Type: POST
Command
Send
{
"awg":{
"1":[
{
"command":"setRegularWaveform",
"signalType":"sine",
"signalFreq":1000000,
"vpp":3000,
"vOffset":0,
"dutyCycle": 50
}
]
}
}
Response
{
"awg":{
"1":[
{
"command":"setRegularWaveform",
"statusCode":0,
"actualSignalFreq": 1000000,
"actualVpp": 3000,
"actualVOffset":0,
"wait":0
}
]
}
}
Run the arbitrary waveform generator channel(s).
Send
{
"awg":{
"1":[
{
"command":"run"
}
]
}
}
Response
{
"awg":{
"1":[
{
"command":"run",
"statusCode":0,
"wait":0
}
]
}
}
Stop the arbitrary waveform generator channel(s).
Send
{
"awg":{
"1":[
{
"command":"stop"
}
]
}
}
Response
{
"awg":{
"1":[
{
"command":"stop",
"statusCode":0,
"wait":0
}
]
}
}
Commands that provide access to DC Power Supply data and functions.
Get the current state of the instrument's channel
Send
{
"dc": {
"1": [
{
"command":"getCurrentState"
}
]
}
}
Response
{
"dc": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"state": "idle",
"voltage": 3300,
"wait": 0
}
]
}
}
Get the output voltage(s) of the specified DC power supply channel(s).
Send
{
"dc":{
"1":[
{
"command":"getVoltage"
}
]
}
}
Response
{
"dc":{
"1":[
{
"command":"getVoltage",
"voltage":3300,
"statusCode":0,
"wait":100
}
]
}
}
Set the output voltage(s) of the specified DC power supply channel(s).
Send
{
"dc":{
"1":[
{
"command":"setVoltage",
"voltage":3300
}
]
}
}
Response
{
"dc":{
"1":[
{
"command":"setVoltage",
"statusCode":0,
"wait":500
}
]
}
}
Combine multiple DC commands in a single transaction. A single transaction may not include multiple commands for the same channel.
Send
{
"dc":{
"1":[
{
"command":"setVoltage",
"voltage":3300
},
{
"command":"getVoltage"
}
],
"2":[
{
"command":"setVoltage",
"voltage":5000
}
]
}
}
Response
{
"dc":{
"1":[
{
"command":"setVoltage",
"statusCode":0,
"wait":500
},
{
"command":"getVoltage",
"statusCode":0,
"wait":100,
"voltage":3300
}
],
"2":[
{
"command":"setVoltage",
"statusCode":0,
"wait":500
}
]
}
}
Commands that provide access to GPIO data and functions.
Get the current state of the instrument's channel
Send
{
"gpio": {
"1": [
{
"command":"getCurrentState"
}
]
}
}
Response
{
"gpio": {
"1": [
{
"command":"getCurrentState",
"statusCode": 0,
"state": "idle",
"mode": "gpio",
"direction": "output",
"value": 1,
"wait":0
}
]
}
}
Set the parameters (direction) of the specified GPIO channel(s).
valid directions: input, output, inputPullUp, inputPullDown
Send
{
"gpio":{
"1":[
{
"command":"setParameters",
"direction":"input"
}
],
"2":[
{
"command":"setParameters",
"direction":"output"
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"wait":100
}
],
"2":[
{
"command":"setParameters",
"statusCode":0,
"wait":100
}
]
}
}
Read the specified GPIO channel(s).
Send
{
"gpio":{
"1":[
{
"command":"read"
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"read",
"direction: "input"
"value":1,
"statusCode":0,
"wait":100
}
]
}
}
Write the output voltage(s) of the specified GPIO channel(s).
Send
{
"gpio":{
"1":[
{
"command":"write",
"value":1
}
]
}
}
Response
{
"gpio":{
"1":[
{
"command":"write",
"statusCode":0,
"wait":500
}
]
}
}
Commands that provide access to oscilloscope instrument data and functions.
Get the current state of the instrument's channel
Send
{
"osc": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"osc": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"state": "triggered",
"acqCount": 10,
"actualVOffset": 0,
"actualSampleFreq": 1000000,
"actualGain": 0.25,
"actualBufferSize": 32000,
"triggerDelay": 0,
"wait": 0
}
]
}
}
Set the specified parameter(s) of the specified OSC channel(s). Type: POST
sampleFreq - mHz bufferSize - in samples triggerDelay - delay from the trigger to the POI in pS
App will specify 'delay' in pS (+ or -) from the trigger to specify where the POI is. The device will return the index of the POI in the return buffer and will generally be the center point. The chart should be centered around this poi
Send
{
"osc":{
"1":[
{
"command":"setParameters",
"offset":3000,
"gain": 0.25,
"sampleFreq": 1000000,
"bufferSize": 32000,
"triggerDelay": 100000
}
]
}
}
Response
{
"osc":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"actualOffset":3100,
"actualSampleFreq": 1000000,
"wait":0
}
]
}
}
Read data from the device.
Data will be returned if the device acqCount is greater or equal to the command acqCount. If the device acqCount is less than the command acqCount the device responds with it's trigger status and optionally a estimated time before a new buffer will be available.
For both triggerIndex and pointOfInterest, -1 means it is not in the buffer.
Type: POST
Send
{
"osc":{
"1":[
{
"command":"read",
"acqCount":101
}
]
}
}
Response
352
{
"osc": {
"1": [
{
"command": "read",
"statusCode": 0,
"binaryOffset": 0,
"binaryLength": 65280,
"acqCount": 3,
"actualSampleFreq": 6250000000,
"pointOfInterest": 16320,
"triggerIndex": 16320,
"triggerDelay": 0
"actualVOffset": 48,
"actualGain": 1,
"wait": 0
}
]
}
}
<1024 Byte BLOB>
Commands that provide access to the logic analyzer instrument data and functions.
Get the current state of the instrument's channel
Send
{
"la": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"la": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"state": "triggered",
"acqCount": 10,
"mode": "la",
"actualSampleFreq": 1000000,
"actualBufferSize": 32000,
"triggerDelay": 0,
"wait": 0
}
]
}
}
Set the specified parameter(s) of the specified LA channel(s). Type: POST
sampleFreq - mHz bufferSize - in samples
Send
{
"la":{
"1":[
{
"command":"setParameters",
"sampleFreq": 1000000,
"bufferSize": 32000
}
]
}
}
Response
{
"la":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"actualSampleFreq": 6250000000,
"wait":0
}
]
}
}
Read data from the device.
Data will be returned if the device acqCount is greater or equal to the command acqCount. If the device acqCount is less than the command acqCount the device responds with it's trigger status and optionally a estimated time before a new buffer will be available.
Type: POST
Send
{
"la":{
"1":[
{
"command":"read",
"acqCount":101
}
]
}
}
Response
352
{
"la": {
"1": [
{
"command": "read",
"statusCode": 0,
"binaryOffset": 0,
"binaryLength": 65280,
"acqCount": 3,
"actualSampleFreq": 6250000000,
"pointOfInterest": 16384,
"triggerDelta": -16384,
"wait": 0
}
]
}
}
<1024 Byte BLOB>
Commands that provide access to trigger functionality.
Get the current state of the instrument's channel
Send
{
"trigger": {
"1": [
{
"command": "getCurrentState"
}
]
}
}
Response
{
"trigger": {
"1": [
{
"command": "getCurrentState",
"statusCode": 0,
"acqCount": 10,
"source": {
"instrument": "osc",
"channel": 1,
"type": "risingEdge",
"lowerThreshold": 0,
"upperThreshold": 30
},
"targets": {
"osc": [1, 2],
"la": [1]
},
"state": "armed" || "acquiring" || "idle" || "triggered",
"wait": 0
}
]
}
}
Force an immediate acquisition without waiting for a trigger condition.
Type: POST
Send
{
"trigger":{
"1":[
{
"command":"forceTrigger"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"forceTrigger",
"statusCode":0,
"acqCount": 27,
"wait": -1
}
]
}
}
Set the device trigger parameters.
Type: POST
Command
Send
{
"trigger": {
"1": [
{
"command": "setParameters",
"source": {
"instrument": "osc",
"channel": 1,
"type": "risingEdge",
"lowerThreshold": 3300,
"upperThreshold": 4000
},
"targets": {
"osc": [
1,
2
],
"la": [
1,
2
]
}
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"setParameters",
"statusCode":0,
"wait":0
}
]
}
}
Arm the specified trigger and immediately re-arm the trigger after a successful acquisition.
Type: POST
Send
{
"trigger":{
"1":[
{
"command":"run"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"run",
"statusCode":0,
"wait":-1,
"acqCount": 27
}
]
}
}
Arm the specified trigger and do not re-arm the trigger after a successful acquisition.
Type: POST
Send
{
"trigger":{
"1":[
{
"command":"single"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"single",
"statusCode":0,
"wait":-1,
"lastAcqCount": 27
}
]
}
}
Disarm the specified trigger.
Type: POST
Send
{
"trigger":{
"1":[
{
"command":"stop"
}
]
}
}
Response
{
"trigger":{
"1":[
{
"command":"stop",
"statusCode":0,
"wait": 0
}
]
}
}