This document describes the low-level serial protocol implemented by the Borui-style programmable regulated power supply. It is written for developers who need to talk directly to the instrument (implement a client, driver or test harness).
<...> with no embedded newlines; device messages are entirely contained between < and >.< and ends with a literal >; the content between is an ASCII digit string (no CR/LF inside the frame).> is the definitive end-of-message marker.<xxxxxxxxxxx> and the reply uses the same bracketed format.> (or until a reasonable timeout) and then process the characters between < and > as a complete message.Typical device messages use the following fixed layout (decimal digits):
<op(2)><payload(5)><param(4)>
op (2 digits): operation or response code. Interpreted as a small integer opcode or status identifier.payload (5 digits): primary numeric value or measurement field. Zero-padded ASCII digits (e.g. 00123).param (4 digits): auxiliary parameter, flags or additional numeric data.The exact semantics of op, payload and param depend on the command; the device uses different opcodes for measurement vs. control frames.
1234 represents 12.34 (i.e., divide by 100 to get human units).00458 → 4.58 V.<14009300000> → payload 00930 → interpreted as 9.30 A (divide by 100)<14000183000> → payload 00183 → interpreted as 0.183 A (divide by 1000)Because the device does not explicitly indicate the payload scale in every response, drivers should consult the instrument’s manual for exact scaling per-opcode, or infer scale from expected ranges and precision.
Examples:
01234 and the instrument uses centi-units, the physical value is 12.34 (payload / 100).00123.<...> frames. The device processes the frame and usually replies with a bracketed response frame.The two-digit op field identifies the request or response type. Observed conventions:
01 — Set voltage (request). Example: <01012100001> sets device address 0001 to 12.10 V.02 — Read voltage (request). Example: <02012200000> asks for the measured voltage.03 — Set current (request). Example: <03006920000> sets current limit.04 — Read current (request). Example: <04003300000> asks for the measured current.07 — Power on (request): <07000000000>08 — Power off (request): <08000000000>09 — Remote lock (keypad lock). Param leading digit: 1 = remote lock on, 2 = remote lock off. Examples: <09100000000> (remote lock on), <09200000000> (remote lock off).11 — Set-voltage acknowledgement; example reply: <11OK0000000> indicates OK.12 — Read-voltage response; example reply: <12004580000> encodes 4.58 V.13 — Set-current acknowledgement; example reply: <13OK0000000>.14 — Read-current response; example reply: <14000183000> encodes 0.183 A.Note: response opcodes are typically the request opcode plus 10 (decimal). Implementations should accept these observed mappings but consult the device manual for complete opcode tables.
baud=9600, 8N1, timeouts around 2.0s, and recv_chunk_size=13 bytes.> character as the message terminator; drivers should read until > when parsing responses for these commands.<02012200000> (device replies with <12xxxxx....> style frame)<04003300000><01ppppp0000> where ppppp is a zero-padded 5-digit scaled payload (scale: ×100). Example intent: to set 12.10 V the scaled payload is 00121 → <01001210000> (config used <01${1}0000>).<03ppppp000> where the payload width is 6 and observed scaling is ×1000 in the configuration (i.e. scale 1000).<07000000000>; Output off: <08000000000><09100000000> (remote lock on), <09200000000> (remote lock off)*IDN? → KUAIQU>), clients should accumulate bytes until > is received or a read timeout occurs.<02012200000> # Example: read voltage request
<02012345000>
In the reply above, op = 02, payload = 01234, param = 5000 (field meanings depend on opcode); if payload uses centi-units, 01234 → 12.34 units.
param (4-digit) field often encodes status bits and the device address. In vendor examples the first digit(s) of the trailing region indicate CV/CC status (for current read replies the device may set a flag indicating whether it is in CV or CC mode) and the low-order digits include the device address. Example: <12000000001> indicates a voltage reading for device address 1.<01012100001> corresponds to hex byte sequence: 3C 30 31 30 31 32 31 30 30 30 30 31 3E.This instrument uses short bracketed ASCII frames with fixed digit fields: 2-digit opcode, 5-digit numeric payload and a 4-digit parameter/status block. Numeric payloads are fixed-point integers (implied decimal) and scaling varies by measurement type; use the vendor examples above and the device manual to choose the correct scaling per-opcode.
<...> frames.> logic rather than fixed-length reads.< and >, and write the bytes.> is seen, validate the leading <, then parse the inner text according to the opcode-specific layout.