OP-BT/BTS Customer Command Reference Manual
This document lists all the communication command of OP-BTS / OP-BT Bluetooth Optical Probes.
Communication testing software: Serial Port Assistant is the one our R&D team uses it for daily basics. You can also try Serial Debug Assistant from Microsoft Store.
Mobile Bluetooth connection software: any Bluetooth debugging tool
Bluetooth: Android requires SPP mode communication; iOS requires BLE mode communication
Table of Contents
- Command Usage Instructions
- Query Battery Voltage
- Enable IEC Auto Baudrate Function
- Disable IEC Auto Baudrate Function
- Set Optical Head Baudrate Parameters
1. Command Usage Instructions
Commands are sent in text format after successfully connecting to the device via Bluetooth.
For Windows systems, use any text editor to copy the command to the clipboard, then use a serial port debugging tool to connect to the device and send the command from the clipboard.
For Android and iOS systems, use a text editor to copy the command to the clipboard, then use a Bluetooth debugging tool to connect to the device and paste/send the command.
Command format: command_name\r\n
<parameter>: required parameter.
[parameter]: optional parameter.
2. Query Battery Voltage
Function Description
Query the current battery voltage of the device to monitor the device power status.
- Command:
GetBatteryVolt\r\n - Response:
V=3912\r\n - Description:
- The returned value is the battery voltage in millivolts (mV).
- For example:
V=3912means the battery voltage is 3912mV (about 3.9V).
Usage Example
Example 1: Query battery voltage
Send: GetBatteryVolt\r\n
Receive: V=3912\r\n
Note: Current battery voltage is 3912 mV (3.912 V).
Example 2: Sending the command with serial tool
In Windows serial debugging tool (such as sscom32):
- Select the correct COM port and baudrate
- Input
GetBatteryVoltin the sending box - Click send (ensure a carriage return and newline
\r\nis included) - The received area shows:
V=3912
Example 3: Sending the command via Bluetooth
In Bluetooth debugging software:
- Send command:
GetBatteryVolt\r\n - Receive response:
V=3912\r\n
Reference Voltage Values
- Normal voltage range: 3400mV - 4200mV
Notes
- Command format: Must include carriage return and newline
\r\n - Real-time query: This command returns real-time voltage, each query gets the latest value
3. Enable IEC Auto Baudrate Function
Function Description
Temporarily enable IEC auto baudrate detection, allowing the device to automatically detect and switch to the correct communication baudrate. This setting is effective only at runtime, and is reset to default after device restart.
Firmware version must be higher than V4.41.
Command Format
- Command:
OPIECAUTOON\r\n - Response:
OK\r\n - Description:
- Successfully enables IEC auto baudrate function.
- This setting is only valid at runtime; it will revert after restart.
- For permanent effect, use OP series command
{"IECAutoFlag":true}and save configuration.
Usage Example
Example 1: Enable IEC auto baudrate function
Send: OPIECAUTOON\r\n
Receive: OK\r\n
Note: IEC auto baudrate is now enabled, the device can automatically detect and switch baudrate.
Example 2: Use case
Scenario: You need to temporarily enable auto baudrate to test meters with different baudrates.
Step 1: Send enable command
Send: OPIECAUTOON\r\n
Receive: OK\r\n
Step 2: Start communicating with the meter; the device will auto-detect and switch baudrate
Step 3: After restart, this setting returns to default
Example 3: Using with disable command
// Enable auto baudrate
Send: OPIECAUTOON\r\n
Receive: OK\r\n
// Perform communication test...
// Disable auto baudrate
Send: OPIECAUTOOFF\r\n
Receive: OK\r\n
Notes
- Temporary setting: The effect will be lost after device restart (reverts to default).
- Command format: Must include carriage return and newline
\r\n - Scenarios: Suitable for temporary testing or debug purposes
4. Disable IEC Auto Baudrate Function
Function Description
Temporarily disable IEC auto baudrate detection, so the device uses a fixed baudrate for communication. This setting is only valid at runtime, and is reset to default after device restart.
Firmware version must be higher than V4.41.
Command Format
This command is in text format, sent via serial or Bluetooth.
- Command:
OPIECAUTOOFF\r\n - Response:
OK\r\n - Description:
- Successfully disables IEC auto baudrate function
- Only valid at runtime; will revert to default after restart
- For permanent effect, use OP series command
{"IECAutoFlag":false}and save configuration
Usage Example
Example 1: Disable IEC auto baudrate function
Send: OPIECAUTOOFF\r\n
Receive: OK\r\n
Note: IEC auto baudrate is now disabled, device uses a fixed baudrate for communication.
Example 2: Use case
Scenario: You want to use a fixed baudrate and prevent auto switching.
Step 1: Send disable command
Send: OPIECAUTOOFF\r\n
Receive: OK\r\n
Step 2: Communicate with the meter using fixed baudrate
Step 3: After restart, this setting returns to default
Example 3: Use together with enable command
// Disable auto baudrate
Send: OPIECAUTOOFF\r\n
Receive: OK\r\n
// Communicate with a fixed baudrate...
// Enable auto baudrate again
Send: OPIECAUTOON\r\n
Receive: OK\r\n
Notes
- Temporary setting: The effect will be lost after device restart (reverts to default).
- Command format: Must include carriage return and newline
\r\n - Scenarios: Suitable for fixed baudrate communication or precise parameter control
5. Set Optical Head Baudrate Parameters
Function Description
Set the serial communication parameters (baudrate, parity, datalen, stopbit) for the optical head (OP). This command is used to configure the communication parameters between the device and the meter.
Firmware version must be higher than V4.3.
Command Format (OP Series)
This command is in text format, sent via serial or Bluetooth.
- Command:
<BaudOp>,<baudrate>,<parity>,<datalen>,<stopbit>[,]\r\n - Response:
OK\r\n
The following similar commands are also available (firmware version must be greater than V4.5):
BaudAlt: Sets the optical probe serial port parameters, functions the same as BaudOp, and returns a unified “OK\r\n”.BaudStart: Enables IEC auto baudrate function and sets the initial IEC baudrate (default is 300E71), returns “OK\r\n”.BaudMid: Sets the intermediate IEC baudrate. If set, the device will force use of this baudrate when switching; if not set, the system will identify it automatically. Returns “OK\r\n”.
Parameter Description
| Parameter | Description | Range | Example |
|---|---|---|---|
baudrate |
Baudrate | 300-115200 | 9600, 19200, 38400 |
parity |
Parity bit | N, E, O | N=None, E=Even, O=Odd |
datalen |
Data bits | 5, 6, 7, 8 | 8 |
stopbit |
Stop bits | 0, 1, 2 | 0 or 1=1 stop, 2=2 stop bits |
Common Baudrate Configurations
| Baudrate | Parity | Data Bits | Stop Bits | Example Command |
|---|---|---|---|---|
| 9600 | N | 8 | 1 | BaudOp,9600,N,8,1\r\n |
| 19200 | N | 8 | 1 | BaudOp,19200,N,8,1\r\n |
| 300 | E | 7 | 1 | BaudOp,300,E,7,1\r\n |
| 2400 | E | 7 | 1 | BaudOp,2400,E,7,1\r\n |
| 4800 | N | 8 | 1 | BaudOp,4800,N,8,1\r\n |
| 38400 | N | 8 | 1 | BaudOp,38400,N,8,1\r\n |
| 57600 | N | 8 | 1 | BaudOp,57600,N,8,1\r\n |
| 115200 | N | 8 | 1 | BaudOp,115200,N,8,1\r\n |
Usage Example
Example 1: Set 9600 baudrate, no parity, 8 data bits, 1 stop bit
Send: BaudOp,9600,N,8,1\r\n
Receive: OK\r\n
Note: Successfully set the optical head to 9600 baud, no parity, 8 data bits, 1 stop bit.
Example 2: Set 300 baudrate, even parity, 7 data bits, 1 stop bit (IEC standard)
Send: BaudOp,300,E,7,1\r\n
Receive: OK\r\n
Note: Successfully set to 300 baudrate, even parity, 7 data bits, 1 stop bit (IEC 62056-21 standard).
Example 3: Set 19200 baudrate, no parity, 8 data bits, 1 stop bit
Send: BaudOp,19200,N,8,1\r\n
Receive: OK\r\n
Note: Successfully set to 19200 baudrate, no parity, 8 data bits, 1 stop bit.
Example 4: Complete communication process
Step 1: Set baudrate parameters
Send: BaudOp,9600,N,8,1\r\n
Receive: OK\r\n
Step 2: Start communication with the meter
(send meter protocol command)
Step 3: If switching baudrate is required, send new settings
Send: BaudOp,300,E,7,1\r\n
Receive: OK\r\n
Parameter Format Explanation
Baudrate (baudrate)
- Range: 300-115200
- Common values: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
- Note: Communication speed, unit: bps
Parity bit (parity)
- N: None
- E: Even
- O: Odd
- Note: Used to detect transmission errors
Data bits (datalen)
- Range: 5-8 bits
- Common: 7 (IEC standard), 8 (ASCII standard)
- Note: Data bits per character
Stop bits (stopbit)
- 0 or 1: 1 stop bit
- 2: 2 stop bits
- Note: Indicates end of character
Notes
-
Command format:
- Must include the
BaudOp,prefix - Parameters separated by commas
- Trailing comma is optional but not recommended
- Must include carriage return and newline
\r\n
- Must include the
-
Parameter match: Parameters must match exactly with meter device communication parameters, otherwise communication will fail.
-
IEC standard config:
- IEC 62056-21 standard uses: 300 baudrate, even parity, 7 data bits, 1 stop bit
- Example command:
BaudOp,300,E,7,1\r\n
-
Takes effect immediately: Settings apply immediately without device restart.
-
Device type:
- Response:
OK\r\n
- Response:
-
Relation with auto baudrate:
- If IEC auto baudrate is enabled, device may automatically adjust baudrate
- To use fixed baudrate, please disable auto baudrate function:
OPIECAUTOOFF\r\n
Appendix
Command Protocol Description
OP Runtime Series Commands
- Format: Text
- Requirement: No need to enter command mode; can send directly.
- Terminator: Must include
\r\n(carriage return and newline)
Communication Methods
Serial Port Communication
- On Windows, use serial debugging tools (such as sscom32) – select the correct COM port and baudrate.
- Make sure to include the correct command terminator.
Bluetooth Communication
- Android: use Bluetooth debugging tool via SPP or BLE mode.
- iOS: use Bluetooth debugging tool via BLE mode.
FAQ
Q1: Why is there no response after sending command?
- Check if it is OP series command (no command mode required)
- Check command format, especially the terminator
\r\n - Check if serial or Bluetooth connection is normal
Q2: Why does configuration reset after reboot?
- OP runtime commands (OPIECAUTOON/OFF) are temporary and lost after reboot.
Q3: How to confirm the current baudrate settings?
- Use OP configuration commands to query
- Or check the baudrate setting in the device menu
Q4: Should I choose auto baudrate or fixed baudrate?
- Auto baudrate: for scenarios where the meter baudrate is unknown, device will auto-detect.
- Fixed baudrate: for known meter baudrate, or when precise control is needed.
Version Information
- Documentation Version: 1.0
- Last Updated: 2025-12-03
- Supported Devices: OP-BT series, OP-BTS series