Table of Contents

Digilent Agent Protocol

Command Format


6\r\n
chunk1\r\n
8\r\n
somedata\r\n
E\r\n
 in\r\n\r\nchunks.\r\n
0\r\n
\r\n

Enumerate Devices


Enumerate devices on the system and return a device list.

Command

Response

Example

Command

{
   "agent":[
      {
         "command":"enumerateDevices"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"enumerateDevices",
         "statusCode":0,
         "devices":[
            "COM1",
            "COM3",
            "COM6"
         ]
      }
   ]
}



Get Agent Info


Get information about the Digilent agent.

Command

Response

Example

Command

{  
   "agent":[  
      {  
         "command":"getInfo"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"getInfo",
         "statusCode":0,
         "version":{
            "major":1,
            "minor":0,
            "patch":0
         }
      }
   ]
}



Get Active Device


Note: Not yet implemented as of Digilent Agent 1.2.1. Get the active device.

Command

Response

Example

Command

{
   "agent":[
      {
         "command":"getActiveDevice"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"getActiveDevice",
         "statusCode":0,
         "device":"COM3"
      }
   ]
}



Set Active Device


Set the active device.

Command

Response

Example

Command

{  
   "agent":[  
      {  
         "command":"setActiveDevice",
         "device":"COM3"
      }
   ]
}

Response

{
  "agent": [
    {
      "command": "setActiveDevice",
      "statusCode": 0
    }
  ]
}



Enter JSON Mode


Put the active device in JSON command mode.

Command

Response

Example

Command

{
   "agent":[
      {
         "command":"enterJsonMode"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"enterJsonMode",
         "statusCode":0
      }
   ]
}



Release Active Device


Release the active device and free the hardware resource. Command

Response

Example

Command

{
   "agent":[
      {
         "command":"releaseActiveDevice"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"releaseActiveDevice",
         "statusCode":0
      }
   ]
}



Save To Temp File


Save the provided binary data as the specified file in a temp directory.

Command

Response

Example

Command

{
   "agent":[
      {
         "command":"saveTempFile",
         "fileName":"openscope-mz-firmware.hex"
      }
   ]
}

Response

{
   "agent":[
      {
         "command":"saveTempFile",
         "statusCode":0
      }
   ]
}



Upload Firmware


Upload new firmware to the active device.

Command

Response

Example

{  
   "agent":[  
      {  
         "command":"updateFirmware",
         "firmwarePath":"openscope-mz-firmware.hex",
         "enterBootloader": true
      }
   ]
}

Response

{
  "agent": [
    {
      "command": "updateFirmware",
      "statusCode": 0
    }
  ]
}



Update WaveForms Live Browser


Update the offline browser version of WaveForms Live.

Command

Response

Example

{  
   "agent":[  
      {  
         "command":"updateWaveFormsLiveBrowser",
         "updateZipFileName":"waveforms-live-0.1.0.zip"
      }
   ]
}

Response

{
  "agent": [
    {
      "command": "updateWaveFormsLiveBrowser",
      "statusCode": 0
    }
  ]
}



Get Update Firmware Status


Get the status of the firmware update process.

Command

Response

Response

Example

{  
   "agent":[  
      {  
         "command":"updateFirmwareGetStatus"
      }
   ]
}

Response

{
  "agent": [
    {
      "command": "updateFirmwareGetStatus",
      "statusCode": 0,
      "status": "uploading",
      "progress" 25
    }
  ]
}