OP-BT/BTS Command Reference Manual


OP-BT Complete Command List

Communication

Communication test software: sscom32 Mobile Bluetooth connection software: any Bluetooth debug app

Bluetooth: Android requires SPP communication; iOS uses BLE communication Listed Bluetooth devices must include a specific substring in the Bluetooth name: OPBT, TES, EDMI, LAND, TP, SPP, BLE, TOOL OPBT series icon TP series icon

OP Series Command Protocol

Supports communication with the device via serial port or Bluetooth. After modifying commands, you must send a save-configuration command for changes to persist after reboot.

Command Format

**Commands use a JSON-like format; multiple parameters can be set at once. Total command length must not exceed 150 characters. For example:

  • {“AtCommandMode”:true}
  • {“LcdScreenFlag”:true,“UartSelectedIndex”:1,“UserConfigSave”:true}

Command Overview

  1. Enter command mode: {"AtCommandMode":true} — after a successful entry, the device remains in command mode
  2. Set or query parameters
  3. To save parameters: {"UserConfigSave":true}
  4. Exit command mode: {"AtCommandMode":false}

**The device defaults to transparent transmission mode; to configure parameters, you must enter command mode first

Command List

1. Command Mode Control

Enter command mode

  • Command: {"AtCommandMode":true} or OP>1\r\n
  • Response: {"OK":true} or OK\r\n indicates successful entry into command mode
  • Description: After entry, the device stays in command mode; exit command mode to return to transparent transmission mode
  • Default: false

Exit command mode

  • Command: {"AtCommandMode":false} or OP>0\r\n
  • Response: {"OK":false} or OK\r\n indicates successful exit from command mode
  • Description: After exit, the device returns to transparent transmission mode
  • Default: false

Start Python script execution

  • Command: OP>2\r\n
  • Response: No response; launches the Python terminal directly
  • Description: Sets PythonRunMode to 1 and automatically configures the Python script echo UART based on communication mode (UART2BT_MODE uses UART 1; BT2UART_MODE uses UART 0).
  • Default: 0

2. System Parameter Operations

Restore user factory defaults

  • Command: {"UserDefault":true}
  • Response: {"OK":""} indicates successful setting
  • Description: Restores system parameters to user factory defaults; send a save-configuration command and reboot for changes to take effect

Restore manufacturer factory defaults

  • Command: {"FactoryDefault":true}
  • Response: {"OK":""} indicates successful setting
  • Description: Restores system parameters to manufacturer factory defaults; send a save-configuration command and reboot for changes to take effect

Save current configuration to user storage

  • Command: {"UserConfigSave":true}
  • Response: {"OK":""} indicates successful save
  • Description: Saves current parameters as user defaults

Save current configuration to manufacturer storage

  • Command: {"FactoryConfigSave":true}
  • Response: {"OK":""} indicates successful save
  • Description: Saves current parameters as manufacturer defaults

System reboot

  • Command: {"Reboot":true}
  • Response: {"OK":""}
  • Description: Restarts the system

Power-on button configuration restore

  • Feature description: Quickly restore configuration at power-on using button combinations without entering command mode
  • Usage:
    1. Hold the middle button while powering on
    2. LED1 and LED2 red/green indicators light up, indicating configuration restore mode
    3. After 5 seconds, press the corresponding button combination as needed:
      • OK + middle button: Restore user defaults (load from factory configuration and save as user configuration)
      • Select (left) + middle button: Restore factory defaults (set and save both factory and user configuration)
    4. On success, all LEDs light up for 1 second as confirmation
  • Notes:
    • This feature runs at power-on and must be performed after LCD initialization completes but before configuration is loaded
    • If no valid button combination is detected within 5 seconds, the LEDs turn off automatically and the system continues normal startup
    • Restoring factory defaults updates both factory and user configuration; use with caution
    • Restoring user defaults updates user configuration only; factory configuration remains unchanged

3. Configuration Query

Device configuration query

  • Command: {"CurrentDeviceConfig":"?"}
  • Response: JSON data containing device model, version, serial number, and related information, for example:
{
    "Model": "OP-BT-585",
    "Customize Model": "OP-BT-585",
    "Software Version": "V4.1-585_20241208",
    "Hardware Version": "V3.08-585_20241208",
    "Hardware Version1": "V3.08-585_20241208",
    "Hardware Serial NO": "20241208001",
    "OPBT Software Version": "V4.1-585_20241208",
    "OPBT Hardware Version": "V3.08-585_20241208",
    "OPBT Hardware Serial Number": "20241208001",
    "Storage Capacity": "WB 16MB",  // Hardware SPI mode format: vendor capacity; soft SPI mode format: *vendor capacity (e.g. "*WB 16MB")
    "BT Name SPP": "ZENOVATE SPP",
    "BT Name BLE": "ZENOVATE BLE",
    "BT Pin": "1234",
    "BT UUID0": "18F0",
    "BT UUID1": "2AF0",
    "BT UUID2": "2AF1",
    "Battery voltage": 3809,
    "System voltage": 3756,
    "System temperature": 247,
    "Charging Flag": false,
    "Battery Level": 45
}

System configuration query

  • Command: {"CurrentSysConfig":"?"}
  • Response: JSON data containing system settings, for example:
{
    "Language": "English",
    "Debug": 0,
    "Customized Mode": 0,
    "Quick Charge": false,
    "Battery Voltage Low": 3400,
    "Battery Voltage Temp Alarm": 50,
    "System Charge Temp Low": -10,
    "System Charge Temp High": 50,
    "System Turn Off Time": 2000,
    "System Sleep Time": 1200,
    "Screen Sleep Time": 600,
    "Screen Black Time": 120,
    "Screen Auto Turn Off": true,
    "Screen Brightness": 100,
    "Flashlight Delay": 10,
    "OP Low Power Mode": true,
    "External Usb Mode": true,
    "Transmit Power": 16,
    "LED Switch Status": [
        true, true, true, true, true,
        true, true, true, true, true
    ],
    "RecvSens": [
        90, 91, 92, 93, 94,
        95, 96, 97, 98, 99
    ]
}

Communication parameter configuration query

  • Command: {"CurrentCommConfig":"?"}
  • Response: JSON data containing communication settings, for example:
{
    "Comm Protocol": "IEC6205621",
    "User Iec Hdlc Mode": true,
    "User Iec Mid Mode": false,
    "IEC1107 Auto Baudrate": true,
    "Uart Selected Index": 0,
    "IEC Mid Uart": "300,E,7,1",
    "OP BaudRate": "9600,N,8,1",
    "BT BaudRate": "115200,N,8,1",
    "IEC BaudRate": "300,E,7,1",
    "OP Preset BaudRate": [
        "9600,N,8,1",
        "19200,N,8,1",
        "300,E,7,1",
        "38400,N,8,1",
        "4800,N,8,1",
        "9600,E,7,1",
        "2400,E,7,1",
        "300,E,7,1",
        "9600,N,8,1",
        "19200,N,8,1"
    ]
}

4. Bluetooth Configuration

SPP name query and set

  • Command: {"BtSppName":"?"}

  • Response example: {"BT Name SPP":"ZENOVATE SPP"}

  • Description: Query current SPP Bluetooth name

  • Default: “ZENOVATE SPP”

  • Command: {"BtSppName":"XXXXX"}

  • Response: {"OK":"XXXXX"}

  • Description: Set SPP Bluetooth name; maximum 20 bytes; takes effect after reboot

  • Default: “ZENOVATE SPP”

BLE name configuration

  • Command: {"BtBleName":"?"}

  • Response: {"BT Name BLE":"ZENOVATE BLE"}

  • Description: Query current BLE Bluetooth name

  • Default: “ZENOVATE BLE”

  • Command: {"BtBleName":"XXXXX"}

  • Response: {"OK":"XXXXX"}

  • Description: Set BLE Bluetooth name; maximum 15 bytes

  • Default: “ZENOVATE BLE”

PIN code configuration

  • Command: {"BtPin":"?"}

  • Response: {"BT PIN":"1234"}

  • Description: Query current PIN; default is 1234

  • Default: “1234”

  • Command: {"BtPin":"XXXX"}

  • Response: {"OK":"XXXX"}

  • Description: Set new PIN; must be a 4-digit decimal number

  • Default: “1234”

UUID configuration

  • Command: {"uuid0":"?"}

  • Response: {"uuid0":"18F0"}

  • Description: Query current UUID0 value

  • Default: “18F0”

  • Command: {"uuid0":"XXXX"}

  • Response: {"OK":"XXXX"}

  • Description: Set UUID0 value; supports 4-digit or 16-digit hexadecimal

  • Default: “18F0”

  • Command: {"uuid1":"?"}

  • Response: {"uuid1":"2AF0"}

  • Description: Query current UUID1 value

  • Default: “2AF0”

  • Command: {"uuid1":"XXXX"}

  • Response: {"OK":"XXXX"}

  • Description: Set UUID1 value; supports 4-digit or 16-digit hexadecimal

  • Default: “2AF0”

  • Command: {"uuid2":"?"}

  • Response: {"uuid2":"2AF1"}

  • Description: Query current UUID2 value

  • Default: “2AF1”

  • Command: {"uuid2":"XXXX"}

  • Response: {"OK":"XXXX"}

  • Description: Set UUID2 value; supports 4-digit or 16-digit hexadecimal

  • Default: “2AF1”

Bluetooth SPP and BLE mode query and set

  • Command: {"BtBleSppMode":"?"}

  • Response example: {"BtBleSppMode":0}

  • Description: Query current Bluetooth SPP and BLE mode; see the Bluetooth manual

  • Default: 0

  • Command: {"BtBleSppMode":NN}

  • Response: {"OK":NN}

  • Description: Set Bluetooth SPP and BLE mode; see the Bluetooth manual

  • Default: 0

Master/slave query and set

  • Command: {"ServerMacAddress":"?"}

  • Response example: {"ServerMacAddress":"001122334455"}

  • Description: Query the MAC address of the BLE server to connect to

  • Default: empty

  • Command: {"ServerMacAddress":"112233445566"}

  • Response example: {"OK":"001122334455"}

  • Description: Set the MAC address of the BLE server to connect to

  • Default: empty

5. System Parameter Configuration

Auto power-off time (Idle Before Auto Device Off)

  • Command: {"SystemTurnOffTime":"?"}

  • Response: {"SystemTurnOffTime":2000}

  • Description: Query current auto power-off time setting

  • Default: 2000 seconds

  • Command: {"SystemTurnOffTime":NNN}

  • Response: {"OK":NNN}

  • Description: Set auto power-off time; NNN=0 means never power off; other values are delay time in seconds

  • Default: 2000 seconds

System sleep time (Idle Before Hibernate)

  • Command: {"SystemSleepTime":"?"}

  • Response: {"SystemSleepTime":1200}

  • Description: Query current system sleep time setting; unit: seconds

  • Default: 1200 seconds

  • Command: {"SystemSleepTime":NNN}

  • Response: {"OK":NNN}

  • Description: Set system sleep time; NNN=0 means no sleep; other values are delay time in seconds

  • Default: 1200 seconds

Screen off time (Idle Before Screen Off)

  • Command: {"ScreenSleepTime":"?"}

  • Response: {"ScreenSleepTime":600}

  • Description: Query current screen sleep time setting; unit: seconds

  • Default: 600 seconds

  • Command: {"ScreenSleepTime":NNN}

  • Response: {"OK":NNN}

  • Description: Set screen sleep time; NNN=0 means no sleep; other values are delay time in seconds

  • Default: 600 seconds

Auto screen off (Auto Screen Off)

  • Command: {"ScreenAutoTurnOff":"?"}

  • Response: {"ScreenAutoTurnOff":true}

  • Description: Query current auto screen off setting; returns true or false

  • Default: true

  • Command: {"ScreenAutoTurnOff":true|false}

  • Response: {"OK":true|false}

  • Description: true = allow auto off; false = disable auto off

  • Default: true

Screen dim time (Idle Before Screen Dark)

  • Command: {"ScreenBlackTime":"?"}

  • Response: {"ScreenBlackTime":120}

  • Description: Query current screen dim time setting; unit: seconds

  • Default: 120 seconds

  • Command: {"ScreenBlackTime":NNN}

  • Response: {"OK":NNN}

  • Description: Set screen dim time; NNN=0 means no dimming; other values are delay time in seconds

  • Default: 120 seconds

Flashlight auto-off time (Auto Flashlight Off)

  • Command: {"FlashlightDelay":"?"}

  • Response: {"FlashlightDelay":10}

  • Description: Query current flashlight auto-off time setting; unit: seconds

  • Default: 10 seconds

  • Command: {"FlashlightDelay":NNN}

  • Response: {"OK":NNN}

  • Description: Set flashlight auto-off time; range 0–120 seconds

  • Default: 10 seconds

Screen brightness (Screen Brightness)

  • Command: {"ScreenBrightness":"?"}

  • Response: {"ScreenBrightness":100}

  • Description: Query current screen brightness setting; unit: %; range 0–100

  • Default: 100%

  • Command: {"ScreenBrightness":NNN}

  • Response: {"OK":NNN}

  • Description: Set screen brightness; range 0–100 (%)

  • Default: 100%

Optical probe power setting (IR Power)

  • Command: {"OPLowPowerMode":"?"}

  • Response: {"OPLowPowerMode":true}

  • Description: Query current optical probe power mode; true = normal mode; false = high power mode

  • Default: true

  • Command: {"OPLowPowerMode":true|false}

  • Response: {"OK":true|false}

  • Description: true = low power mode; false = high power mode

  • Default: true

OP low-power master switch (Enable OP Low Power vs 38K PWM)

  • Command: {"OPLowPowerEnable":"?"}

  • Response: {"OPLowPowerEnable":true|false}

  • Description: Controls whether OP low-power functionality is allowed. When true, drives the low-power pin (PA7) according to OPLowPowerMode; when false, disables low power and enables PWM5 to output a 38 kHz square wave (default 50% duty cycle)

  • Default: true

  • Command: {"OPLowPowerEnable":true|false}

  • Response: {"OK":true|false}

  • Description: true = enable OP low-power (PA7 active); false = disable OP low power and enable 38 kHz square wave output (PWM5)

USB communication mode (USB Mode)

  • Command: {"ExternalUsbMode":"?"}

  • Response: {"ExternalUsbMode":true|false}

  • Description: Query current USB communication mode setting; returns true or false

  • Default: true

  • Command: {"ExternalUsbMode":true|false}

  • Response: {"OK":true|false}

  • Description: true = USB serial port supported; false = USB serial port not supported

  • Default: true

Quick charge setting (Quick Charge)

  • Command: {"QuickChargeFlag":"?"}

  • Response: {"QuickChargeFlag":false}

  • Description: Query current charging mode setting; returns true or false

  • Default: false

  • Command: {"QuickChargeFlag":true|false}

  • Response: {"OK":true|false}

  • Description: true = fast charging; false = normal charging

  • Default: false

Temporary baud rate configuration

  • Command: {"OP BaudRate":"?"}

  • Response: {"OP BaudRate":"9600,N,8,1"}

  • Description: Query current temporary baud rate setting; return value is a string

  • Default: 9600,N,8,1

  • Command: {"OP BaudRate":"9600,N,8,1"}

  • Response: {"OK":"9600,N,8,1"}

  • Description: Set current temporary baud rate; takes effect immediately; see format below

  • Default: 9600,N,8,1

  • Command: {"BT BaudRate":"?"}

  • Response: {"BT BaudRate":"115200,N,8,1"}

  • Description: Query current Bluetooth module baud rate

  • Default: 115200,N,8,1

  • Command: {"BT BaudRate":"57600,N,8,1"}

  • Response: {"OK":"57600,N,8,1"}

  • Description: Set Bluetooth module baud rate; takes effect immediately; see format below

  • Default: 115200,N,8,1

Preset baud rate table query or set

  • Command: {"UartSelectedIndex":"?"}

  • Response: {"UartSelectedIndex":0}

  • Description: Query current preset baud rate index

  • Default: 0

  • Command: {"UartSelectedIndex":N}

  • Response: {"OK":N}

  • Description: Set preset baud rate index; N range 0–9

  • Default: 0

UART maximum index query or set

  • Command: {"UartMaxIndex":"?"}

  • Response: {"UartMaxIndex":9}

  • Description: Query the maximum available UART index; this value affects how many baud rate options appear in the menu. UART has 10 preset baud rate configurations (index 0–9); this parameter controls the maximum number of baud rate options shown in the menu

  • Default: 9

  • Command: {"UartMaxIndex":N}

  • Response: {"OK":N}

  • Description: Set the maximum available UART index; N range 1–9. For example, setting 4 shows only indices 0–4 (5 baud rate options including Return); setting 9 shows all 10 options. The system automatically limits the maximum value to 9

  • Default: 9

UART communication parameter configuration

  • Query command: Two query methods supported

  • Array query (backward compatible): {"UartForwardConfig":"?"} or {"UartForwardConfig":""}

  • Array response: {"UartForwardConfig":["0,10,10,50,10,...","3,40,100,...",...,"1152,5,5,..."]} (returns all 10 configuration groups)

  • Single-item query: {"UartForwardConfig":"baud rate value"} (baud rate values: 0,3,12,24,48,96,192,384,576,1152)

  • Single-item response: {"UartForwardConfig":"baud rate,10,10,50,10,20,10,50,10"} (returns the configuration string for the specified baud rate)

  • Query example: {"UartForwardConfig":"96"} returns {"UartForwardConfig":"96,5,5,50,10,20,10,50,10"}

  • Description: Core communication parameter settings. If a customer-specific configuration is already set, this configuration may not take effect (e.g. Egypt, Mexico, etc.)

  • Format: “baud rate,UART1 receive timeout threshold,UART1 forward delay timeout,UART1 forward state timeout,UART1 chars required before forward,UART0 receive timeout threshold,UART0 forward delay timeout,UART0 forward state timeout,UART0 chars required before forward”

  • Baud rate: 0=default, 3=300, 12=1200, 24=2400, 48=4800, 96=9600, 192=19200, 384=38400, 576=57600, 1152=115200

  • UART1 receive timeout threshold: Uart1RecvTimeoutThreshold, default 10 ms, UART receive timeout threshold in milliseconds; cannot be 0

  • UART1 forward delay timeout: uart1_to_uart0_delay_timeout, default 10 ms, delay-forward timeout in milliseconds; forwarding is triggered even if uart1_to_uart0_delay_chars is not reached when this time elapses; cannot be 0

  • UART1 forward state timeout: uart1_to_uart0_forward_timeout, forward mode duration timeout in milliseconds; controls maximum forward mode duration to prevent long-term resource occupation; automatically exits forward mode and returns to normal state on timeout

  • UART1 chars required before forward: uart1_to_uart0_delay_chars, delay-forward character count threshold; forwarding is triggered immediately when UART buffer accumulated characters reach this value for batch forwarding and improved efficiency

  • UART0 receive timeout threshold: Uart0RecvTimeoutThreshold,

  • UART0 forward delay timeout: uart0_to_uart1_delay_timeout,

  • UART0 forward state timeout: uart0_to_uart1_forward_timeout,

  • UART0 chars required before forward: uart0_to_uart1_delay_chars,

  • Set command: {"UartForwardConfig":"baud rate,UART1 receive timeout threshold,UART1 forward delay timeout,UART1 forward state timeout,UART1 chars required before forward,UART0 receive timeout threshold,UART0 forward delay timeout,UART0 forward state timeout,UART0 chars required before forward"}

  • Set response: {"OK":"baud rate,10,10,50,10,20,10,50,10"}

  • Set example: {"UartForwardConfig":"96,5,5,50,10,20,10,50,10"}

  • Default: Default parameter values for 10 preset baud rate configurations (baud rate indices 0–9 correspond to 0,3,12,24,48,96,192,384,576,1152)

    • Index 0 (default): 0,10,10,50,10,20,10,50,10
    • Index 1 (300 bps): 3,40,100,100,30,40,40,50,20
    • Index 2 (1200 bps): 12,25,25,50,20,25,25,50,20
    • Index 3 (2400 bps, Egypt mode): 24,20,10,20,350,20,10,20,10
    • Index 4 (4800 bps): 48,10,10,50,10,20,10,50,10
    • Index 5 (9600 bps): 96,5,5,50,10,20,10,50,10
    • Index 6 (19200 bps): 192,5,5,50,10,20,10,50,10
    • Index 7 (38400 bps): 384,5,5,50,10,20,10,50,10
    • Index 8 (57600 bps): 576,5,5,50,10,20,10,50,10
    • Index 9 (115200 bps, Czech gas meter): 1152,5,5,20,300,20,10,20,60
  • Command: {"OP Preset BaudRate":"?"}

  • Response example:

{
    "OP Preset BaudRate": [
        "9600,N,8,1",    // Baud 9600, no parity, 8 data bits, 1 stop bit
        "19200,N,8,1",   // Baud 19200, no parity, 8 data bits, 1 stop bit
        "300,E,7,1",     // Baud 300, even parity, 7 data bits, 1 stop bit
        "38400,N,8,1",   // Baud 38400, no parity, 8 data bits, 1 stop bit
        "4800,N,8,1",    // Baud 4800, no parity, 8 data bits, 1 stop bit
        "9600,E,7,1",    // Baud 9600, even parity, 7 data bits, 1 stop bit
        "2400,E,7,1",    // Baud 2400, even parity, 7 data bits, 1 stop bit
        "300,E,7,1",     // Baud 300, even parity, 7 data bits, 1 stop bit
        "9600,N,8,1",    // Baud 9600, no parity, 8 data bits, 1 stop bit
        "19200,N,8,1"    // Baud 19200, no parity, 8 data bits, 1 stop bit
    ]
}
  • Description: Query the preset baud rate configuration list

  • Command: {"OP Preset BaudRate":["9600,N,8,1","115200,N,8,1",.....]} 10 optical probe baud rate presets

  • Response example: {"OK|FAIL":""}

  • Description: Set the preset baud rate configuration list; OK = success, FAIL = failure

Baud rate parameter format:

  • 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
  • Stop bits: 0/1 = 1 stop bit, 2 = 2 stop bits

UART1 full-duplex mode query and set

  • Command: {"Uart1FullDuplexMode":"?"}

  • Response: {"Uart1FullDuplexMode":true}

  • Description: Query whether UART1 is in full-duplex mode. true = full-duplex (normal send/receive); false = half-duplex (clears receive buffer on transmit to avoid receiving own transmitted data)

  • Default: true (full-duplex mode)

  • Command: {"Uart1FullDuplexMode":true}

  • Response: {"OK":true}

  • Description: Set UART1 to full-duplex mode (normal send/receive). This is the default mode, suitable for most hardware connection scenarios

  • Default: true (full-duplex mode)

  • Command: {"Uart1FullDuplexMode":false}

  • Response: {"OK":false}

  • Description: Set UART1 to half-duplex mode. In half-duplex mode, when UART1 sends data, the system clears the receive buffer after a delay (time to transmit 10 bits, calculated automatically from baud rate) to avoid receiving transmitted data loopback. Primarily used to resolve send data loopback issues in certain hardware connections

  • Default: true (full-duplex mode)

Note:

  • Full-duplex mode is the default and suitable for most hardware connections, providing optimal bidirectional communication performance
  • Half-duplex mode is primarily used to resolve send data loopback issues in hardware connections. If your hardware connection is normal, full-duplex mode is recommended
  • In half-duplex mode, the receive buffer is automatically cleared after sending, which may affect normal bidirectional communication. Choose the appropriate mode based on your hardware connection
  • The delay before clearing is calculated automatically from the current baud rate; delay time equals the time to transmit 10 bits (microsecond precision), ensuring the buffer is cleared only after data transmission completes

UART forward mode query and set

  • Command: {"UartForwardMode":"?"}

  • Response: {"UartForwardMode":0} or {"UartForwardMode":1}

  • Description: Query current UART forward mode. 0 = real-time scheme (default); 1 = packet mode

  • Default: 0 (real-time scheme)

  • Command: {"UartForwardMode":0}

  • Response: {"OK":0}

  • Description: Set UART forwarding to real-time scheme (default)

  • Command: {"UartForwardMode":1}

  • Response: {"OK":1}

  • Description: Set UART forwarding to packet mode. Uses packet-based reception; when either UART has data, enters a receive loop polling both UARTs; exits reception and forwards when packet size or timeout is reached; supports command processing

6. File Operations

List files or folders

  • Command: {"FileDir":"/"}
  • Response example: {"FileDir":["py","test.txt","test.py"]}
  • Description: Returns all file names in the specified folder

Open or create file

  • Command: {"FileOpen":"/test.txt"}
  • Response: {"FileOpen":N}
  • Description: Open or create file “/test.txt”; returns N=0 on success; other values indicate failure

File write

  • Command: {"FileWrite":"112233445566778899AABBCCDDEEFF"} or {"FileWrite":"112233445566778899AABBCCDDEEFF,AB"}
  • Response: {"FileWrite":N}
  • Description: Write data to the previously opened file; format is hexadecimal string with 2 hex digits per byte. Optionally includes checksum (after comma); returns number of bytes written (N>=0 = success; negative N = failure; N=-2 = checksum verification failed; N=-1 = file not open)

File read

  • Command: {"FileRead":N}
  • Response example: {"FileRead":"112233445566778899AABBCCDDEEFF,AB"}
  • Description: Read N bytes from the previously opened file; return format “hex data,checksum”; checksum is the sum of all read bytes (2-digit hex); return value 0 means end of file; negative values indicate failure

File close

  • Command: {"FileClose":"/test.txt"}
  • Response: {"FileClose":N}
  • Description: Close the previously opened file; returns N=0 on success; other values indicate failure

Delete file or folder

  • Command: {"FileRemove":"/test.txt"}
  • Response: {"FileRemove":N}
  • Description: Delete the specified file or empty folder; returns N=0 on success; other values indicate failure

Rename file or folder

  • Command: {"FileRename":"/old.txt,/new.txt"}
  • Response: {"FileRename":N}
  • Description: Rename file or folder; parameter is comma-separated old path and new path; returns N=0 on success; other values indicate failure

File information query

  • Command: {"FileStat":"/test.txt"}
  • Response: {"FileStat":"1,1024,test.txt"}
  • Description: Query file or folder information; return format “type,size,name”; type=1 means file; type=2 means directory

File seek

  • Command: {"FileSeek":"100,0"}
  • Response: {"FileSeek":N}
  • Description: Set file read/write position; parameter format “offset,whence”; offset starts at 0; whence=0 (SET)/1 (CUR)/2 (END); returns new file position

File current position query

  • Command: {"FileTell":"?"}
  • Response: {"FileTell":N}
  • Description: Query current file read/write position; returns current offset in bytes

File position reset

  • Command: {"FileRewind":true}
  • Response: {"FileRewind":N}
  • Description: Reset file read/write position to the beginning; returns N=0 on success

File size query

  • Command: {"FileSize":"?"}
  • Response: {"FileSize":N}
  • Description: Query size of the currently open file; returns total bytes

File system size query

  • Command: {"FsSize":"?"}
  • Response: {"FsSize":N}
  • Description: Query total file system size; returns total allocated block count

File system traverse

  • Command: {"FsTraverse":true}
  • Response: {"FsTraverse":[1,2,3,4,...]}
  • Description: Traverse all used blocks in the file system; returns an array of block addresses

File system free space query

  • Command: {"FsFreeSize":"?"}
  • Response: {"FsFreeSize":N}
  • Description: Query remaining available file system space; returns bytes

File system free space query (KB)

  • Command: {"FsFreeSizeKB":"?"}
  • Response: {"FsFreeSizeKB":N}
  • Description: Query remaining available file system space; returns kilobytes (1024 bytes = 1 KB)
  • Note: All File* / Dir* / Fs* JSON commands are available only when the internal file system is mounted successfully (internal state FsMountOk!=FALSE). If file system mount fails, these commands return negative error codes and Bit 16 of ErrorCode is set for diagnosing external storage or file system issues.

Open directory

  • Command: {"DirOpen":"/py"}
  • Response: {"DirOpen":0} or {"DirOpen":-1}
  • Description: Open the specified directory; query returns the currently open directory path; return value 0 = success; negative values = failure

Close directory

  • Command: {"DirClose":true}
  • Response: {"DirClose":N}
  • Description: Close the currently open directory; returns N=0 on success; negative values indicate failure

Read directory

  • Command: {"DirRead":"?"}
  • Response: {"DirRead":"1,1024,test.txt"}
  • Description: Read the next entry in the directory; return format “type,size,name”; type=1 = file; type=2 = directory; return value 0 = no more entries; negative values indicate failure

Directory seek

  • Command: {"DirSeek":100}
  • Response: {"DirSeek":N}
  • Description: Set directory read position; returns N=0 on success; negative values indicate failure

Directory current position query

  • Command: {"DirTell":"?"}
  • Response: {"DirTell":N}
  • Description: Query current directory position; returns current offset; negative values indicate failure

Directory position reset

  • Command: {"DirRewind":true}
  • Response: {"DirRewind":N}
  • Description: Reset directory read position to the beginning; returns N=0 on success; negative values indicate failure

Create directory

  • Command: {"FileMkDir":"/py"} or {"FileMkDir":"?"} or {"FileMkDir":""}
  • Response: {"FileMkDir":N} or {"FileMkDir":""}
  • Description: Create directory at the specified path. On query (parameter “?” or empty string), returns empty string; on create, returns N=0 on success; negative values indicate failure (e.g. directory already exists returns -17; path not found returns -2, etc.). Requires external storage and successful file system mount to create directories

Hardware CPU unique ID query

  • Command: {"McuUniqeID":"?"}
  • Response: {"McuUniqeID":N}
  • Description: Query the MCU unique ID

Hardware MCU model query

  • Command: {"CpuType":"?"}
  • Response example: {"CpuType":583}
  • Description: Query the MCU model

Hardware device version query and set

  • Command: {"HardwareVersion":"?"}

  • Response example: {"HardwareVersion":"V3.08-585_20241208"}

  • Description: Query hardware device version

  • Command: {"HardwareVersion":"V3.08-583_20241208"}

  • Response example: {"OK":"V3.08-583_20241208"}

  • Range: within 20 characters

  • Description: Set hardware device version

Hardware device serial number query and set

  • Command: {"HardwareSerialNo":"?"}

  • Response example: {"HardwareSerialNo":"1234567890"}

  • Description: Query hardware device serial number

  • Command: {"HardwareSerialNo":"1122334455"}

  • Response example: {"OK":"1122334455"}

  • Range: within 30 characters

  • Description: Set hardware device serial number

Firmware version query and set

  • Command: {"SoftwareVersion":"?"}

  • Response example: {"SoftwareVersion":"V4.1-585_20241208"}

  • Description: Query firmware version

  • Command: {"SoftwareVersion":"V4.1-585_20241208"}

  • Response example: {"OK":"V4.1-585_20241208"}

  • Range: within 20 characters

  • Description: Set firmware version

Product internal model query and set

  • Command: {"Model":"?"}

  • Response example: {"Model":"OP-BTS-583"}

  • Description: Query product internal model

  • Command: {"Model":"OP-BT-585"}

  • Response example: {"OK":"OP-BT-585"}

  • Range: within 20 characters

  • Description: Set product internal model

User-customized product model query and set

  • Command: {"CustomizeModel":"?"}

  • Response example: {"CustomizeModel":"OP-BTS-EDMI"}

  • Description: Query customer-customized product model

  • Command: {"CustomizeModel":"OP-BT-EDMI"}

  • Response example: {"OK":"OP-BT-EDMI"}

  • Range: within 20 characters

  • Description: Set customer-customized product model

LCD screen presence query and set

  • Command: {"LcdScreenFlag":"?"}

  • Response: {"LcdScreenFlag":true|false}

  • Description: Query whether the product has an LCD screen; true = with LCD; false = without LCD

  • Default: false

  • Command: {"LcdScreenFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set whether the product has an LCD screen; true = with LCD; false = without LCD

  • Default: false

IEC auto baud rate switching support query and set

  • Command: {"IECAutoFlag":"?"}

  • Response: {"IECAutoFlag":true|false}

  • Description: Query whether the product supports IEC auto baud rate switching; true = supported; false = not supported

  • Default: true

  • Command: {"IECAutoFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set whether the product supports IEC auto baud rate switching; true = supported; false = not supported

  • Default: true

IEC HDLC protocol support query and set

  • Command: {"UserIecHdlcModeFlag":"?"}

  • Response: {"UserIecHdlcModeFlag":true|false}

  • Description: Query whether the product supports IEC HDLC protocol; true = supported; false = not supported

  • Default: true

  • Command: {"UserIecHdlcModeFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set whether the product supports IEC HDLC protocol; true = supported; false = not supported

  • Default: true

IEC mid baud rate support query and set (mainly for EDMI customized products)

  • Command: {"UserIecMidModeFlag":"?"}

  • Response: {"UserIecMidModeFlag":true|false}

  • Description: Query whether the product supports IEC mid baud rate setting; true = supported; false = not supported

  • Default: true

  • Command: {"UserIecMidModeFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set whether the product supports IEC mid baud rate setting; true = supported; false = not supported

  • Default: true

Firmware master/slave mode query and set

  • Command: {"HostFlag":"?"}

  • Response: {"HostFlag":true|false}

  • Description: Query product master/slave mode; true = host; false = slave (product connecting to terminal devices)

  • Default: false

  • Command: {"HostFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set product master/slave mode; true = host; false = slave (product connecting to terminal devices)

  • Default: false

User customized mode query and set

  • Command: {"CustomizedMode":"?"}

  • Response: {"CustomizedMode":N}

  • Default: 0

  • Description: Query product user mode, N=0, default mode N=1, Egypt N=2, EDMI N=3, itron N=4, sensus N=5, landgyr N=6, tespro N=7, EDMI ON Mode — disables IEC auto baud rate and HDLC mode; for direct EDMI meter connection N=8, EDMI OFF Mode — enables IEC auto baud rate and HDLC mode; for EDMI meter auto-negotiation mode N=9, Mexico

  • Command: {"CustomizedMode":N}

  • Response: {"OK":N}

  • Description: Set product user mode; see N values above

    • When set to N=7 (EDMI ON Mode), the system automatically sets IECAutoifOn=false and UserIecHdlcModeFlag=false
    • When set to N=8 (EDMI OFF Mode), the system automatically sets IECAutoifOn=true and UserIecHdlcModeFlag=true
    • Note: EDMI ON Mode and EDMI OFF Mode are primarily for two different EDMI meter connection methods; can be quickly switched via the “IEC Auto Baud Rate” menu option
  • Default: 0

Power-on LOGO display time query and set

  • Command: {"LogoDisplayTime":"?"}

  • Response: {"LogoDisplayTime":N}

  • Description: Query power-on LOGO display time; unit: milliseconds

  • Range: 0–5000

  • Default: 2000

  • Command: {"LogoDisplayTime":N}

  • Response: {"OK":N}

  • Description: Set power-on LOGO display time; unit: milliseconds

  • Default: 2000

LCD language query and set

  • Command: {"Language":"?"}

  • Response: {"Language":N}

  • Description: Query product LCD language; N=0 Chinese; N=1 English

  • Default: 1

  • Command: {"Language":N}

  • Response: {"OK":N}

  • Description: Set product LCD language; N=0 Chinese; N=1 English

  • Default: 1

Communication protocol query and set

  • Command: {"CommProtocol":"?"}

  • Response: {"CommProtocol":N}

  • Description: Query product communication protocol; see list below for N N=0: IEC 62056-21 N=1: ANSI C12.18 Normal N=2: ANSI C12.18 Type 2 N=3: ANSI C12.18 DTR Ctrl

  • Default: 0

  • Command: {"CommProtocol":N}

  • Response: {"OK":N}

  • Description: Set product communication protocol; see list above for N

  • Default: 0

Script mode query and set

  • Command: {"PythonRunMode":N}
  • Response: {"OK":N}
  • Description: Set script execution mode; see list below for N N=0: no script N=1: terminal mode N=2: file mode N=3: immediate execution mode

Run Python file query and set

  • Command: {"PythonFileRun":"?"} or {"PythonFileRun":""}

  • Response: {"PythonFileRun":"filename"}

  • Description: Query the current Python file to run

  • Command: {"PythonFileRun":"filename"}

  • Response: {"OK":"filename"}

  • Description: Set the Python file to run; filename maximum 30 characters. After setting, the filename is copied to CurrentScriptFile and PythonScriptRun is set to true; the system runs the Python file on the next cycle. Default path prefix “/py/” is added automatically

Security unlock feature commands

The security unlock feature provides optional password protection for PikaScript script execution, preventing malicious use if the device is lost.

Security PIN query and set

  • Command: {"SecurityPinCode":"?"} or {"SecurityPinCode":""}

  • Response: {"SecurityPinCode":"********"}

  • Description: Query current security PIN (returns masked value, not the actual password)

  • Command: {"SecurityPinCode":"10110010"}

  • Response: {"SecurityPinCode":"OK"} or {"SecurityPinCode":"FAIL"}

  • Description: Set new security PIN; must be 8 characters containing only ‘0’ or ‘1’. Returns OK on success; FAIL on format error

  • Default: “00000000”

Remote unlock

  • Command: {"SecurityUnlock":"10110010"}
  • Response: {"SecurityUnlock":"OK"} or {"SecurityUnlock":"FAIL"}
  • Description: Remotely unlock the device via JSON command. Unlock succeeds if password is correct; unlock state persists until power-off/reboot or timeout
  • Note: Successful unlock resets the unlock timeout timer

Unlock status query

  • Command: {"SecurityStatus":"?"} or {"SecurityStatus":""}
  • Response: {"SecurityStatus":true} or {"SecurityStatus":false}
  • Description: Query current unlock status; true = unlocked; false = locked

Security feature enable query and set

  • Command: {"SecurityEnable":"?"}

  • Response: {"SecurityEnable":true|false}

  • Description: Query whether security unlock is enabled; true = enabled; false = disabled

  • Command: {"SecurityEnable":true|false}

  • Response: {"OK":true|false}

  • Description: Set security unlock feature switch. When disabled, CheckUnlock() returns success directly, skipping verification

  • Default: false

Unlock timeout query and set

  • Command: {"SecurityUnlockTimeout":"?"}

  • Response: {"SecurityUnlockTimeout":N}

  • Description: Query unlock state timeout; unit: seconds. 0 means never expires

  • Command: {"SecurityUnlockTimeout":N}

  • Response: {"OK":N}

  • Description: Set unlock state timeout; unit: seconds. Automatically re-locks after this time following unlock; 0 means never expires

  • Default: 0 (never expires)

Charging allowed temperature lower limit query and set

  • Command: {"SysTempLow":"?"}

  • Response: {"SysTempLow":N}

  • Description: Query charging allowed temperature lower limit; unit: degrees Celsius

  • Default: -10

  • Command: {"SysTempLow":N}

  • Response: {"OK":N}

  • Description: Set charging allowed temperature lower limit; unit: degrees Celsius; range -10 to 20 °C

  • Default: -10

Charging allowed temperature upper limit query and set

  • Command: {"SysTempHigh":"?"}

  • Response: {"SysTempHigh":N}

  • Description: Query charging allowed temperature upper limit; unit: degrees Celsius

  • Default: 50

  • Command: {"SysTempHigh":N}

  • Response: {"OK":N}

  • Description: Set charging allowed temperature upper limit; unit: degrees Celsius; range 20 to 80 °C

  • Default: 50

Auto power-off voltage lower limit query and set

  • Command: {"BatVoltLow":"?"}

  • Response: {"BatVoltLow":N}

  • Description: Query auto power-off voltage lower limit; unit: millivolts

  • Default: 3400

  • Command: {"BatVoltLow":N}

  • Response: {"OK":N}

  • Description: Set auto power-off voltage lower limit; unit: millivolts; range 3000–3700 mV

  • Default: 3400

Buzzer enable query and set

  • Command: {"BeepFlag":"?"}

  • Response: {"BeepFlag":true|false}

  • Description: Query buzzer enable mode; true = sound allowed; false = sound disabled

  • Default: true

  • Command: {"BeepFlag":true|false}

  • Response: {"OK":true|false}

  • Description: Set buzzer enable mode; true = sound allowed; false = sound disabled

  • Default: true

Reset system sleep counter on Bluetooth connection query and set

  • Command: {"BtStatusResetSleep":"?"}

  • Response: {"BtStatusResetSleep":true|false}

  • Description: Query whether the system sleep counter is reset when Bluetooth connects; true = reset; false = do not reset. The sleep counter controls when the device enters sleep; resetting on Bluetooth connection extends standby time

  • Default: true

  • Command: {"BtStatusResetSleep":true|false}

  • Response: {"OK":true|false}

  • Description: Set whether the system sleep counter is reset when Bluetooth connects; true = reset; false = do not reset

    • When true: system sleep counter is reset on successful Bluetooth connection, extending standby time and preventing accidental sleep while connected
    • When false: system sleep counter is not reset even when Bluetooth connects; device still enters sleep per existing settings
  • Default: true

Note: This parameter affects sleep counter reset on Bluetooth connection only; it does not affect sleep reset behavior for data communication state (gDataCommFlag)

Keyboard middle button function query and set

  • Command: {"KeyMidFunction":"?"}

  • Response: {"KeyMidFunction":0}

  • Description: Query keyboard middle button function. The middle button is typically located at the center of the device for shortcut operations

  • Default: 0

  • Command: {"KeyMidFunction":N}

  • Response: {"OK":N}

  • Description: Set keyboard middle button function; N range 0–9

    • N=0: Status rotation — single press cycles through system status (battery voltage, temperature, connection status, etc.)
    • N=1: Baud rate switching — single press cycles preset baud rate index (from current index + 1, wraps to 0 when exceeding UartMaxIndex) and immediately applies new baud rate
    • N=2: IEC auto baud rate toggle — single press toggles IEC auto baud rate on/off
    • N=3: One-key script execution — single press runs the most recently selected script file from the menu
    • N=4–9: Reserved for future extension (custom shortcut operations)
  • Default: 0

Note:

  • When KeyMidFunction=1, the middle button becomes a baud rate shortcut, replacing status display. Switching automatically applies new UART configuration without reboot
  • When KeyMidFunction=2, the middle button quickly toggles IEC auto baud rate. Effective at runtime; reverts to power-on state after reboot
  • When KeyMidFunction=3, the middle button runs scripts with one press. Select the script in the menu first, then press the middle button. External storage and script file validity are checked before execution

LED indicator enable query and set

  • Command: {"LedOnFlag":"?"}

  • Response: {"LedOnFlag":[true,true,true,true,true,true,true,true,true,true]}

  • Description: Query whether LED indicators are allowed to light; returns 10 values for 10 LEDs; true = allowed; false = not allowed

  • Default: all allowed

  • Command: {"LedOnFlag":[true,true,true,true,true,true,true,true,true,true]}

  • Response: {"OK":1}

  • Description: Set whether LED indicators are allowed to light; 10 values for 10 LEDs; true = allowed; false = not allowed

  • Default: all allowed

WS2812 full-color status LED mode query and set

  • Command: {"UseTraditionalLed":"?"}

  • Response: {"UseTraditionalLed":true|false}

  • Description: Query current indicator mode. true = use traditional 6 independent RGB indicators; false = use 2 cascaded WS2812 full-color LEDs replacing the original 6 independent RGB indicators (LED1/LED2 red/green/blue)

  • Default: true

  • Command: {"UseTraditionalLed":true|false}

  • Response: {"OK":true|false}

  • Description: true = use traditional 6 independent LEDs; false = enable WS2812 mode (PA11 outputs single-wire timing to drive 2 WS2812s; automatically maps original LED red/green/blue states)

  • Default: true

Flash size query

  • Command: {"FlashSize":"?"}
  • Response examples:
    • Hardware SPI mode: {"FlashSize":"WB 16MB"} or {"FlashSize":"GD 32MB"} (format: vendor capacity)
    • Soft SPI mode: {"FlashSize":"*WB 16MB"} or {"FlashSize":"*GD 32MB"} (format: *vendor capacity; * indicates soft SPI)
    • Unknown vendor or capacity: {"FlashSize":"EF17"} or {"FlashSize":"*EF17"} (format: chip ID or *chip ID)
  • Description: Query product Flash size; returns string format. In soft SPI mode, a “*” prefix is automatically added to capacity info to identify the SPI communication method. Supported vendors include: WB (Winbond), GD (GigaDevice), PY (Puya), MX (Macronix), XM (Wuhan Xinxin), BY (Boyaa), ZD (Lanzhihui), etc.

Flash format command

  • Command: {"FlashFormat":true}
  • Response: {"FlashFormat":N}
  • Description:
    • N=0 means format and remount succeeded; N<0 means LittleFS error code (e.g. mount failure or underlying read/write failure).
    • Execution flow: close currently open file and directory handles; run lfs_format(&lfs_w25qxx, &lfscfg) on external Flash; on success call lfs_mount() to remount; on successful mount update FsMountOk flag, clear Bit 16 of ErrorCode (ERROR_BIT_FS_MOUNT_FAIL), sync pika_lfs_handle/mylfs handles, create /py directory, and recalculate storage space percentage.
    • This operation clears all files and directories on the current file system. Back up data before execution; use only when reinitializing the file system or repairing severe corruption is required.

Battery voltage query

  • Command: {"BatteryVoltage":"?"}
  • Response: {"BatteryVoltage":N}
  • Description: Query product battery voltage; unit: millivolts

System voltage query

  • Command: {"SystemVoltage":"?"}
  • Response: {"SystemVoltage":N}
  • Description: Query product system voltage; unit: millivolts

System temperature query

  • Command: {"SystemTemp":"?"}
  • Response: {"SystemTemp":N}
  • Description: Query product system temperature; unit: degrees Celsius × 10; e.g. 246 means 24.6 °C

Configuration error code query

  • Command: {"ErrorCode":"?"}
  • Response: {"ErrorCode":"00000000"}
  • Description: Query current configuration validation error code; returns 32-bit hexadecimal string. During configuration load, the system automatically validates critical configuration fields; if a field is out of range, the system auto-repairs to default and sets the corresponding ErrorCode bit
  • Default: “00000000” (no errors)

ErrorCode bit definition table

ErrorCode is a 32-bit error code; each bit corresponds to a configuration field group validation result:

Bit Field Group Description
Bit 0 TPUart overall Any TPUart Baudrate, DataBit, Parity, or StopBit field out of range
Bit 1 BTUart overall Any BTUart Baudrate, DataBit, Parity, or StopBit field out of range
Bit 2 Uart[10] array Any field of any element in the Uart array out of range
Bit 3 QuickChargeIfOn QuickChargeIfOn not in 0–1 range
Bit 4 ExternalUsbMode ExternalUsbMode not in 0–1 range
Bit 5 SysTempHigh SysTempHigh not in 30–70 range
Bit 6 SysTempLow SysTempLow not in -20 to 25 range
Bit 7 UartMaxIndex UartMaxIndex not in 1–9 range
Bit 8 UartSelectedIndex UartSelectedIndex > 9
Bit 9 CustomizedMode CustomizedMode > 9
Bit 10 Language Language > 3
Bit 11 BatVoltLow BatVoltLow not in 3300–3700 range
Bit 12 SystemSleepTime SystemSleepTime > 30000
Bit 13 SystemTurnOffTime SystemTurnOffTime not in 120–7200 range
Bit 14 LogoDisplayTime LogoDisplayTime > 10000
Bit 15 UartForwardConfig array Any field of any element in UartForwardConfig array not in 1–1000 range
Bit 16 File system mount failure LittleFS file system mount failed (internal FsMountOk=false); all file/directory JSON commands disabled; returns error code only
Bit 30 cfg errors Any field in cfg configuration out of range
Bit 31 RunCfg errors Any field in RunCfg configuration out of range

ErrorCode usage example

Query current error code:

{"ErrorCode":"?"}
Returns: {"ErrorCode":"00008005"}

Parse hexadecimal error code “00008005”:

  • Convert to binary: 00000000000000001000000000000101
  • Bit 0 = 1: TPUart configuration invalid; auto-repaired to default
  • Bit 2 = 1: Uart array has out-of-range configuration; auto-repaired to default
  • Bit 15 = 1: UartForwardConfig array has out-of-range configuration; auto-repaired to default

Notes

  • ErrorCode indicates which configuration fields were auto-repaired only; does not affect normal device operation
  • ErrorCode is revalidated and updated each time configuration is reloaded
  • Query ErrorCode to diagnose configuration issues; user intervention is typically not required

Display current user configuration

  • Command: {"CurrentUserSysConfig":"?"}
  • Response example:
{"Quick Charge":false,"System Turn Off Time":2000,"System Sleep Time":1200,"Screen Sleep Time":600,"Screen Black Time":120,"Screen Auto Turn Off":true,"Flashlight Delay Time":10,"Screen Brightness":100,"OP Low Power Mode":true,"External Usb Mode":true}

Unused commands

  • Command: {"BatTempAlarm":"?"}
  • Command: {"TranPower":"?"}
  • Command: {"RecvSens":"?"}

TP Series Command Protocol

Return battery voltage

  • Command: GetBatteryVolt\r\n
  • Response: V=3912\r\n

Return TP version number

  • Command: version?\r\n
  • Response (non-EDMI): OK,VER=01.00
  • Response (EDMI): edmi-3.06\r\n

Return OP hardware and firmware version

  • Command: BTVERSION\r\n
  • Response example: V3.08-585_20241208,V4.1-585_20241208

Enable IEC auto baud rate

  • Command: OPIECAUTOON\r\n
  • Response: OK\r\n
  • Description: Enable IEC auto baud rate; effective at runtime; reverts to power-on state after reboot

Disable IEC auto baud rate

  • Command: OPIECAUTOOFF\r\n
  • Response: OK\r\n
  • Description: Disable IEC auto baud rate; effective at runtime; reverts to power-on state after reboot

Set baud rate parameters

  • Command: <BaudTra><i|n|p|q|m|r>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n baudrate=300-15200 parity=N|E|O parity none|odd|even datalen=5|6|7|8 data length 5–8 bits stopbit=0|1|2 stop bits 1 bit|1 bit|2 bits

  • Response (EDMI): OK

  • Response (non-EDMI): OK,VER=01.00

  • Command: <BaudInit>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n

  • Response (non-EDMI): OK,VER=01.00

  • Command: <BaudOp>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n

  • Response: OK\r\n

  • Command: <BaudAlt>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n

  • Response: OK\r\n

  • Description: Set optical probe serial parameters; same function as BaudOp

  • Command: <BaudStart>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n

  • Response: OK\r\n

  • Description: Enable IEC auto baud rate and set initial IEC baud rate; same as BaudTrap but with unified response format

  • Command: <BaudMid>,<baudrate=300-115200>,<parity=N|E|O>,<datalen=5|6|7|8>,<stopbit=0|1|2>[,]\r\n

  • Response: OK\r\n

  • Description: Set IEC mid baud rate; primarily for EDMI mode; same as BaudTram but with unified response format

  • Command: \x55\xDE\xF2\xD6\xC1\x91\x5C\x9E\xB8\x31\xBD\x68\x11\x9F\x0D\x0A

  • Response: OK\r\n

  • Description: AT ON

  • Command: \x55\xBE\xD6\xC9\x9C\x21\x4C\x9E\xB6\x32\xBD\xC1\x00\x9F\x0D\x0A

  • Response: OK\r\n

  • Description: AT OFF