OP-BT/BTS Customer Command Reference Manual

Table of Contents

  1. Command Usage Instructions
  2. Query Battery Voltage
  3. Enable IEC Auto Baud Rate
  4. Disable IEC Auto Baud Rate
  5. Set Optical Head Baud Rate Parameters

1. Command Usage Instructions

Commands use text format and are sent after a successful Bluetooth connection to the device. On Windows, copy commands to the clipboard using a text editor, then connect to the device with a serial port debugging tool and send the commands from the clipboard. On Android and iOS, copy commands to the clipboard using a text editor, then connect to the device with a Bluetooth debugging tool and send the commands from the clipboard. Command format: command_name\r\n In commands, <parameter> denotes a required parameter. [parameter] denotes an optional parameter.

1. Query Battery Voltage

Description

Query the device’s current battery voltage to monitor power status.

  • Command: GetBatteryVolt\r\n
  • Response: V=3912\r\n
  • Notes:
    • The response value is battery voltage in millivolts (mV)
    • For example: V=3912 indicates a battery voltage of 3912 mV (approximately 3.9 V)

Usage Examples

Example 1: Query Battery Voltage

Send: GetBatteryVolt\r\n
Response: V=3912\r\n

Note: Current battery voltage is 3912 millivolts (3.912 volts)

Example 2: Send Command Using a Serial Port Tool

In a Windows serial port debugging tool (such as sscom32):

  1. Select the correct serial port and baud rate
  2. Enter in the send box: GetBatteryVolt
  3. Click Send (ensure the carriage return and line feed \r\n are included)
  4. The receive area displays: V=3912

Example 3: Send Command via Bluetooth

In Bluetooth debugging software: 2. Send command: GetBatteryVolt\r\n 3. Receive response: V=3912\r\n

Voltage Reference Values

  • Normal voltage range: 3400 mV - 4200 mV

Notes

  1. Command format: Must include the carriage return and line feed \r\n
  2. Real-time query: This command returns the current voltage value; each query retrieves the latest status

3. Enable IEC Auto Baud Rate

Description

Temporarily enable IEC auto baud rate so the device can automatically detect and switch to the correct communication baud rate. This setting is effective only at runtime; the device reverts to the default state at startup after a reboot. Device firmware version must be greater than V4.87

Command Format

  • Command: OPIECAUTOON\r\n
  • Response: OK\r\n
  • Notes:
    • Successfully enabled IEC auto baud rate
    • This setting is effective only at runtime; it reverts to the startup state after reboot
    • For permanent effect, use the OP series command {"IECAutoFlag":true} and save the configuration

Usage Examples

Example 1: Enable IEC Auto Baud Rate

Send: OPIECAUTOON\r\n
Response: OK\r\n

Note: IEC auto baud rate enabled successfully; the device can now automatically detect and switch baud rates

Example 2: Usage Scenario

Scenario: Temporarily enable auto baud rate to test meters at different baud rates

Step 1: Send enable command
Send: OPIECAUTOON\r\n
Response: OK\r\n

Step 2: Begin communicating with the meter; the device will automatically detect and switch to the correct baud rate

Step 3: After device reboot, this setting reverts to the default state

Example 3: Used Together with Disable Command

// Enable auto baud rate
Send: OPIECAUTOON\r\n
Response: OK\r\n

// Perform communication test...

// Disable auto baud rate
Send: OPIECAUTOOFF\r\n
Response: OK\r\n

Notes

  1. Temporary setting: This command’s setting is lost after device reboot and reverts to the default state at startup
  2. Command format: Must include the carriage return and line feed \r\n
  3. Application scenarios: Suitable for temporarily testing or debugging auto baud rate functionality

4. Disable IEC Auto Baud Rate

Description

Temporarily disable IEC auto baud rate so the device uses a fixed baud rate for communication. This setting is effective only at runtime; the device reverts to the default state at startup after a reboot. Device firmware version must be greater than V4.87

Command Format

This command uses text format and is sent via serial port or Bluetooth.

  • Command: OPIECAUTOOFF\r\n
  • Response: OK\r\n
  • Notes:
    • Successfully disabled IEC auto baud rate
    • This setting is effective only at runtime; it reverts to the startup state after reboot
    • For permanent effect, use the OP series command {"IECAutoFlag":false} and save the configuration

Usage Examples

Example 1: Disable IEC Auto Baud Rate

Send: OPIECAUTOOFF\r\n
Response: OK\r\n

Note: IEC auto baud rate disabled successfully; the device will use a fixed baud rate for communication

Example 2: Usage Scenario

Scenario: Fixed baud rate communication required to avoid automatic switching

Step 1: Send disable command
Send: OPIECAUTOOFF\r\n
Response: OK\r\n

Step 2: Communicate with the meter using a fixed baud rate

Step 3: After device reboot, this setting reverts to the default state

Example 3: Used Together with Enable Command

// Disable auto baud rate
Send: OPIECAUTOOFF\r\n
Response: OK\r\n

// Communicate using fixed baud rate...

// Re-enable auto baud rate
Send: OPIECAUTOON\r\n
Response: OK\r\n

Notes

  1. Temporary setting: This command’s setting is lost after device reboot and reverts to the default state at startup
  2. Command format: Must include the carriage return and line feed \r\n
  3. Application scenarios: Suitable for fixed baud rate communication or precise control of communication parameters

5. Set Optical Head Baud Rate Parameters

Description

Set the optical head (OP) serial communication parameters, including baud rate, parity, data bits, and stop bits. This command configures communication parameters between the device and the meter. Firmware version must be greater than V4.3

Command Format (OP Series)

This command uses text format and is sent via serial port or Bluetooth.

  • Command: <BaudOp>,<baudrate>,<parity>,<datalen>,<stopbit>[,]\r\n
  • Response: OK\r\n

Parameter Description

Parameter Description Value Range Example
baudrate Baud rate 300-115200 9600, 19200, 38400
parity Parity N, E, O N=None, E=Even, O=Odd
datalen Data bit length 5, 6, 7, 8 8
stopbit Stop bits 0, 1, 2 0 or 1=1 stop bit, 2=2 stop bits

Common Baud Rate Configurations

Baud Rate Parity Data Bits Stop Bits Command Example
9600 None 8 1 BaudOp,9600,N,8,1\r\n
19200 None 8 1 BaudOp,19200,N,8,1\r\n
300 Even 7 1 BaudOp,300,E,7,1\r\n
2400 Even 7 1 BaudOp,2400,E,7,1\r\n
4800 None 8 1 BaudOp,4800,N,8,1\r\n
38400 None 8 1 BaudOp,38400,N,8,1\r\n
57600 None 8 1 BaudOp,57600,N,8,1\r\n
115200 None 8 1 BaudOp,115200,N,8,1\r\n

Usage Examples

Example 1: Set 9600 baud, no parity, 8 data bits, 1 stop bit

Send: BaudOp,9600,N,8,1\r\n
Response: OK\r\n

Note: Optical head baud rate set to 9600, no parity, 8 data bits, 1 stop bit

Example 2: Set 300 baud, even parity, 7 data bits, 1 stop bit (IEC standard)

Send: BaudOp,300,E,7,1\r\n
Response: OK\r\n

Note: Optical head baud rate set to 300, even parity, 7 data bits, 1 stop bit (compliant with IEC 62056-21)

Example 3: Set 19200 baud, no parity, 8 data bits, 1 stop bit

Send: BaudOp,19200,N,8,1\r\n
Response: OK\r\n

Note: Optical head baud rate set to 19200, no parity, 8 data bits, 1 stop bit

Example 4: Complete Communication Workflow

Step 1: Set baud rate parameters
Send: BaudOp,9600,N,8,1\r\n
Response: OK\r\n

Step 2: Begin communicating with the meter
(Send meter protocol commands)

Step 3: To switch baud rate, resend the configuration command
Send: BaudOp,300,E,7,1\r\n
Response: OK\r\n

Parameter Format Details

Baud Rate (baudrate)

  • Range: 300-115200
  • Common values: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
  • Description: Communication speed in bits per second

Parity (parity)

  • N: No parity (None)
  • E: Even parity (Even)
  • O: Odd parity (Odd)
  • Description: Used to detect data transmission errors

Data Bits (datalen)

  • Range: 5-8 bits
  • Common values: 7 (IEC standard), 8 (standard ASCII)
  • Description: Number of data bits per character

Stop Bits (stopbit)

  • 0 or 1: 1 stop bit
  • 2: 2 stop bits
  • Description: Marks the end of a character

Notes

  1. Command format:

    • Must include the BaudOp, prefix
    • Parameters are separated by commas
    • Trailing comma is optional but not recommended
    • Must include the carriage return and line feed \r\n
  2. Parameter matching: Configured parameters must exactly match the meter’s communication parameters; otherwise communication will fail

  3. IEC standard configuration:

    • IEC 62056-21 typically uses: 300 baud, even parity, 7 data bits, 1 stop bit
    • Command example: BaudOp,300,E,7,1\r\n
  4. Immediate effect: Settings take effect immediately; no device reboot required

  5. Device type:

    • Response: OK\r\n
  6. Relationship with auto baud rate:

    • If IEC auto baud rate is enabled, the device may automatically adjust the baud rate
    • To use a fixed baud rate, disable auto baud rate first: OPIECAUTOOFF\r\n
  7. Intermediate baud rate (firmware V4.88+): When using BaudMid or similar commands to set the IEC intermediate (handover) baud rate, firmware V4.88 and above supports 115200.


Appendix

Command Protocol Description

OP Runtime Series Commands

  • Format: Text format
  • Requirement: No need to enter command mode; can be sent directly
  • Terminator: Must include \r\n (carriage return and line feed)

Communication Methods

Serial Port Communication

  • On Windows, use a serial port debugging tool (such as sscom32)—select the correct serial port and baud rate
  • Ensure the correct terminator is included when sending commands

Bluetooth Communication

  • Android: Use a Bluetooth debugging tool via SPP or BLE
  • iOS: Use a Bluetooth debugging tool via BLE

Frequently Asked Questions

Q1: Why is there no response after sending a command?

  • Check whether command mode was entered (OP series commands)
  • Check whether the command format is correct, especially the terminator \r\n
  • Check whether the serial port or Bluetooth connection is working

Q2: Configuration is lost after rebooting the device?

  • OP runtime series commands (OPIECAUTOON/OFF) are temporary settings that are lost after reboot

Q3: How do I confirm the current baud rate setting?

  • Use OP dedicated configuration series commands to query
  • Or check the baud rate setting in the device menu

Q4: How do I choose between auto baud rate and fixed baud rate?

  • Auto baud rate: Suitable when the meter baud rate is unknown; the device detects it automatically
  • Fixed baud rate: Suitable when the meter baud rate is known and precise control is required

Version Information

  • Document version: 1.4
  • Last updated: 2026-06-01
  • Applicable devices: OP-BT series, OP-BTS series