This document lists all the communication command of OP-BTS / OP-BT Bluetooth Optical Probes.
Command Format
All commands are in JSON-like format. Multiple parameters can be set simultaneously. Total command length should not exceed 150 characters.
Examples:
{"AtCommandMode":true}
{"LcdScreenFlag":true,"UartSelectedIndex":1,"UserConfigSave":true}
Command Instructions
To communicate with the device, you must set it to command mode first.
Enter command mode:
{"AtCommandMode":true}
Once successfully entered, the device remains in command mode.
Then you can send more commands to query or set parameters.
Save parameters:
{"UserConfigSave":true}
In the end, you need to send following command to set the device exit command mode:
Exit command mode:
{"AtCommandMode":false}
By default, the device operates in transparent transmission mode. Parameter configuration requires entering command mode.**
Command List
1. Command Mode Control
Enter Command Mode
- Command:
{"AtCommandMode":true} - Response:
{"OK":true}, indicates device are in command mode - Default: false
Note: The device remains in command mode until exited.
Exit Command Mode
- Command:
{"AtCommandMode":false} - Response:
{"OK":false}indicates the device has exit from command mode - Default: false
Note: Device will returns to transparent transmission mode after exiting.
2. System Parameter Operations
Restore User Factory Settings
- Command:
{"UserDefault":true} - Response:
{"OK":""}indicates device is reset to factory default.
Note: device must be reboot to take reset effective.
Save Current Configuration to User
- Command:
{"UserConfigSave":true} - Response:
{"OK":""}
Note: Saves current parameters as user defaults
3. Configuration Query
4. Bluetooth Configuration
Query SPP Name
- Query:
{"BtSppName":"?"} - Response example :
{"BT Name SPP":"ZENOVATE SPP"} - Default: “ZENOVATE SPP”
Note: Queries current SPP Bluetooth name
Set SPP Name
- Set:
{"BtSppName":"NewSppName"} - Response:
{"OK":"NewSppName"} - Default: “ZENOVATE SPP”
Note: The max SPP Bluetooth name length is 20 bytes. Requires reboot to take effect.
Query BLE Name
- Query:
{"BtBleName":"?"} - Response example:
{"BT Name BLE":"ZENOVATE BLE"} - Default: “ZENOVATE BLE”
Set BLE Name
- Set:
{"BtBleName":"NewBleName"} - Response:
{"OK":"NewBleName"} - Default: “ZENOVATE BLE”
Note: The max BLE Bluetooth name lengh is 15 bytes.
Query Current Pairing Code
- Query:
{"BtPin":"?"} - Response:
{"BT PIN":"1234"} - Default: “1234”
Set New Pairing Code
- Set:
{"BtPin":"XXXX"} - Response:
{"OK":"XXXX"} - Default: “1234”
Note: A PIN code must be 4-digit numbers.
5. System Parameter Configuration
** Query USB Communication Mode**
This command shows the status of USB mode, enabled or disabled.
- Query:
{"ExternalUsbMode":"?"} - Response:
{"ExternalUsbMode":true|false} - Default: true
** Set USB Communication Mode**
This command enables or disables USB mode.
- Set:
{"ExternalUsbMode":true|false} - Response:
{"OK":true|false} - Default: true
Query Quick Charge Status
This command shows the status of quick charge.
- Query:
{"QuickChargeFlag":"?"} - Response:
{"QuickChargeFlag":false} - Default: false
Note: true=fast charge, false=normal charge
Enable or Disable Quick Charge
- Set:
{"QuickChargeFlag":true|false} - Response:
{"OK":true|false} - Default: false
Note: true=fast charge, false=normal charge
Query Temporary Baud Rate
Query current temporary baud rate (string)
- Query:
{"OP BaudRate":"?"} - Response:
{"OP BaudRate":"9600,N,8,1"} - Default: 9600,N,8,1
Set Temporary Baud Rate
- Set:
{"OP BaudRate":"9600,N,8,1"} - Response:
{"OK":"9600,N,8,1"} - Default: 9600,N,8,1
Note: Sets temporary baud rate takes effect immediately.
Query the Index of Current Baud Rate
- Query current index:
{"UartSelectedIndex":"?"} - Response:
{"UartSelectedIndex":0} - Default: 0
Set Baud Rate Preset Table
- Set index:
{"UartSelectedIndex":N} - Response:
{"OK":N} - Note: N ranges 0-9
Query Baud Rate Preset Table This command repnose with the list of preset baud rate configurations
- Query preset table:
{"OP Preset BaudRate":"?"}
Example response:
{
"OP Preset BaudRate": [
"9600,N,8,1", // 9600 baud, no parity, 8 data bits, 1 stop bit
"19200,N,8,1", // 19200 baud, no parity, 8 data bits, 1 stop bit
"300,E,7,1", // 300 baud, even parity, 7 data bits, 1 stop bit
"38400,N,8,1", // 38400 baud, no parity, 8 data bits, 1 stop bit
"4800,N,8,1", // 4800 baud, no parity, 8 data bits, 1 stop bit
"9600,E,7,1", // 9600 baud, even parity, 7 data bits, 1 stop bit
"2400,E,7,1", // 2400 baud, even parity, 7 data bits, 1 stop bit
"300,E,7,1", // 300 baud, even parity, 7 data bits, 1 stop bit
"9600,N,8,1", // 9600 baud, no parity, 8 data bits, 1 stop bit
"19200,N,8,1" // 19200 baud, no parity, 8 data bits, 1 stop bit
]
}
Sets the preset baud rate configuration list.
- Command:
{"OP Preset BaudRate":["9600,N,8,1","115200,N,8,1",.....]}(10 groups for optical head baud rates) - Example response:
{"OK|FAIL":""} - OK=success, FAIL=failure
Baud rate parameter format specifications:
- Baud rate: 300-115200 (300,600,1200,2400,4800,9600,19200,38400,57600,115200)
- Parity: N=None, E=Even, O=Odd
- Data bits: 5-8 bits
- Stop bits: 0/1=1 stop bit, 2=2 stop bits
7. Hardware-Related System Information Query and Configuration
Query Hardware Version
- Command:
{"HardwareVersion":"?"} - Example response:
{"HardwareVersion":"V3.08-585_20241208"}
Query Device Serial Number
- Command:
{"HardwareSerialNo":"?"} - Example response:
{"HardwareSerialNo":"1234567890"}
Query Firmware Version
- Command:
{"SoftwareVersion":"?"} - Example response:
{"SoftwareVersion":"V4.1-585_20241208"}
Query Flash Memory Capacity
- Command:
{"FlashSize":"?"} - Response:
{"FlashSize":"2MB"} - Description: Queries the product’s flash memory capacity (string format)
Query Battery Voltage
- Command:
{"BatteryVoltage":"?"} - Response:
{"BatteryVoltage":N} - Description: Queries the product’s battery voltage (in millivolts)
Query System Temperature
- Command:
{"SystemTemp":"?"} - Response:
{"SystemTemp":N} - Description: Queries the product’s system temperature (in Celsius×10, e.g., 246=24.6°C)