Communication test software: sscom32
Mobile Bluetooth app: any Bluetooth debugging app can be used
Bluetooth mode: Android must use SPP communication; iOS must use BLE communication
OP Series Command Communication Protocol
Communication with the device is supported via serial port or Bluetooth.
Command Format
Commands use a JSON-like format. Multiple parameters can be set in one command.
The total command length must not exceed 150 characters.
Examples:
OP>1\r\nor{"AtCommandMode":true}{"UartSelectedIndex":1}{"UserConfigSave":true}
Command Instructions
- Enter command mode with
OP>1or{"AtCommandMode":true}. After entering once successfully, the device stays in command mode. - Set or query parameters.
- If parameters need to be saved, send
{"UserConfigSave":true}. - Exit command mode with
{"AtCommandMode":false}.
The device is in transparent transmission mode by default. Parameter configuration requires entering command mode first.
Command List
1. Command Mode Control
Enter command mode
- Command:
OP>1\r\nor{"AtCommandMode":true}(firmware V4.3 and above only supportsOP>1) - Response:
OKor{"OK":true}means command mode is entered successfully - Description: After entering, the device remains in command mode. To return to transparent mode, exit command mode.
- Default: false
Exit command mode
- Command:
OP>0\r\nor{"AtCommandMode":false} - Response:
OKor{"OK":false}means command mode is exited successfully - Description: After exiting, the device returns to transparent transmission mode
- Default: false
2. System Parameter Operations
Restore user factory defaults
- Command:
{"UserDefault":true} - Response:
{"OK":""}means restore is successful - Description: Restores system parameters to user factory defaults. You must send a save command and reboot for it to take effect.
Save current configuration to user defaults
- Command:
{"UserConfigSave":true} - Response:
{"OK":""}means save is successful - Description: Saves current parameters as user defaults
3. Configuration Query
4. Bluetooth-Related Configuration
SPP name query and setting
-
Command:
{"BtSppName":"?"} -
Example response:
{"BT Name SPP":"ZENOVATE SPP"} -
Description: Queries the current SPP Bluetooth name
-
Default: “ZENOVATE SPP”
-
Command:
{"BtSppName":"XXXXX"} -
Response:
{"OK":"XXXXX"} -
Description: Sets the SPP Bluetooth name (max 20 bytes). Takes effect after reboot.
-
Default: “ZENOVATE SPP”
BLE name query and setting
-
Command:
{"BtBleName":"?"} -
Response:
{"BT Name BLE":"ZENOVATE BLE"} -
Description: Queries the current BLE Bluetooth name
-
Default: “ZENOVATE BLE”
-
Command:
{"BtBleName":"XXXXX"} -
Response:
{"OK":"XXXXX"} -
Description: Sets the BLE Bluetooth name (max 15 bytes)
-
Default: “ZENOVATE BLE”
PIN code query and setting
-
Command:
{"BtPin":"?"} -
Response:
{"BT PIN":"1234"} -
Description: Queries the current PIN code
-
Default: “1234”
-
Command:
{"BtPin":"XXXX"} -
Response:
{"OK":"XXXX"} -
Description: Sets a new PIN code; must be a 4-digit decimal number
-
Default: “1234”
5. System Parameter Configuration
USB communication mode (USB Mode)
-
Command:
{"ExternalUsbMode":"?"} -
Response:
{"ExternalUsbMode":true|false} -
Description: Queries the current USB communication mode setting (returns true or false)
-
Default: true
-
Command:
{"ExternalUsbMode":true|false} -
Response:
{"OK":true|false} -
Description:
true= USB serial supported (if serial is available),false= USB serial not supported -
Default: true
Quick charge setting (Quick Charge)
-
Command:
{"QuickChargeFlag":"?"} -
Response:
{"QuickChargeFlag":false} -
Description: Queries the current charging mode (returns true or false)
-
Default: false
-
Command:
{"QuickChargeFlag":true|false} -
Response:
{"OK":true|false} -
Description:
true= quick charging,false= normal charging -
Default: false
Temporary baud rate setting
-
Command:
{"OP BaudRate":"?"} -
Response:
{"OP BaudRate":"9600,N,8,1"} -
Description: Queries the current temporary baud rate setting (string)
-
Default: 9600,N,8,1
-
Command:
{"OP BaudRate":"9600,N,8,1"} -
Response:
{"OK":"9600,N,8,1"} -
Description: Sets the current temporary baud rate. The setting takes effect immediately. See format below.
-
Default: 9600,N,8,1
Baud rate preset table query and setting
-
Command:
{"UartSelectedIndex":"?"} -
Response:
{"UartSelectedIndex":0} -
Description: Queries the currently used preset baud rate index
-
Default: 0
-
Command:
{"UartSelectedIndex":N} -
Response:
{"OK":N} -
Description: Sets the preset baud rate index; N ranges from 0 to 9
-
Default: 0
-
Command:
{"OP Preset BaudRate":"?"} -
Example response:
{
"OP Preset BaudRate": [
"9600,N,8,1", // Baud rate 9600, no parity, 8 data bits, 1 stop bit
"19200,N,8,1", // Baud rate 19200, no parity, 8 data bits, 1 stop bit
"300,E,7,1", // Baud rate 300, even parity, 7 data bits, 1 stop bit
"38400,N,8,1", // Baud rate 38400, no parity, 8 data bits, 1 stop bit
"4800,N,8,1", // Baud rate 4800, no parity, 8 data bits, 1 stop bit
"9600,E,7,1", // Baud rate 9600, even parity, 7 data bits, 1 stop bit
"2400,E,7,1", // Baud rate 2400, even parity, 7 data bits, 1 stop bit
"300,E,7,1", // Baud rate 300, even parity, 7 data bits, 1 stop bit
"9600,N,8,1", // Baud rate 9600, no parity, 8 data bits, 1 stop bit
"19200,N,8,1" // Baud rate 19200, no parity, 8 data bits, 1 stop bit
]
}
-
Description: Queries the preset baud rate configuration list
-
Command:
{"OP Preset BaudRate":["9600,N,8,1","115200,N,8,1",.....]}(10 groups of optical head baud rates) -
Example response:
{"OK|FAIL":""} -
Description: Sets the preset baud rate configuration list (
OK= success,FAIL= failure)
Baud rate parameter format description:
- Baud rate: 300-115200 (300,600,1200,2400,4800,9600,19200,38400,57600,115200)
- Parity bit: N = none, E = even, O = odd
- Data bits: 5-8
- Stop bits: 0/1 = 1 stop bit, 2 = 2 stop bits
7. Hardware-Related System Information Query and Setting
Hardware version query and setting
- Command:
{"HardwareVersion":"?"} - Example response:
{"HardwareVersion":"V3.08-585_20241208"} - Description: Queries the hardware device version number
Hardware serial number query and setting
- Command:
{"HardwareSerialNo":"?"} - Example response:
{"HardwareSerialNo":"1234567890"} - Description: Queries the hardware device serial number
Firmware version query and setting
- Command:
{"SoftwareVersion":"?"} - Example response:
{"SoftwareVersion":"V4.1-585_20241208"} - Description: Queries the firmware version number
Flash size query
- Command:
{"FlashSize":"?"} - Response:
{"FlashSize":"2MB"} - Description: Queries product flash memory size (string)
Battery voltage query
- Command:
{"BatteryVoltage":"?"} - Response:
{"BatteryVoltage":N} - Description: Queries product battery voltage in millivolts
System temperature query
- Command:
{"SystemTemp":"?"} - Response:
{"SystemTemp":N} - Description: Queries product system temperature in Celsius x10 (for example, 246 means 24.6 C)