ASCII Commands
Modules accept ASCII text commands over serial for querying and configuration.
Syntax & General Rules
- Format: keywords and arguments are all uppercase, space-separated, terminated with
\r\n, max 126 characters per line, no backspace editing. - Responses:
OK: command succeeded;ERR: argument out of range, bad syntax, or disallowed in the current state;- No response: misspelled or lowercase command (ignored);
ONMARK ONCE(never sendsOK);REBOOTandFRESET(reset before replying). - Query commands output one or more
KEY=VALUElines ending withOK. Match byKEYname in scripts rather than line number or order.
- Standard workflow:
LOG DISABLE(pause stream) → change settings → read back to verify →SAVECONFIG→REBOOTif required → read back and check live output after reboot.OKalone does not prove a setting took effect; verify critical changes by reading back and checking output (same for Modbus, J1939, and I2C).- Wait ~1 s after
REBOOTorFRESET, then sendLOG VERSIONto confirm recovery.
Command Quick Reference
| Command | Arguments | Function | Takes Effect |
|---|---|---|---|
LOG VERSION | — | Query model, build date, UUID, SN, firmware & bootloader version | Query |
LOG COMCONFIG | — | Query port baud rate, ONTIME (ms) / ONMARK, HI83 MAP | Query |
LOG USRCONFIG | — | Query PROFILE, URFR, COORD | Query |
LOG MCAL STAT | — | Query magnetic calibration state and progress | Query |
LOG [<COM>] ENABLE | DISABLE | <COM>: COM1 or COM2 (default: current port) | Temporarily resume / pause serial data streaming (not saved) | Immediate |
LOG [<COM>] <MSG> ONTIME <sec> | <MSG>: HI91 / HI83; sec: 0.001–32.767, 0 = off | Set periodic serial output | Immediate |
LOG [<COM>] <MSG> ONMARK 1 | Same as above | Trigger frame on SYNC_IN rising edge | Immediate |
LOG [<COM>] <MSG> ONMARK ONCE | Same as above | Software-trigger frames configured for ONMARK 1 (no OK) | Immediate |
LOG HI83 MAP <BITMAP> | Public bitmask 0x00000FFF (hex with 0x) | Select HI83 payload segments | Immediate |
SERIALCONFIG [<COM>] <BAUD> | 10 standard baud rates (below) | Change serial baud rate | Immediate (auto-saved) |
CONFIG ATT MODE <VAL> | 0 / 1 / 4 / 5 / 7 | Set operating mode | Save & reboot |
CONFIG IMU COORD <VAL> | 0 (RFU) / 4 (ROS) | Set output coordinate frame | Save & reboot |
CONFIG IMU URFR <CODE> | 24 three-digit codes, default 024 | Set mounting orientation | Save & reboot |
CONFIG ATT RST <VAL> | 0 / 1 / 2 / 3 / 5 | Attitude zeroing and leveling | Immediate |
CONFIG MCAL START [2D] | Omit for 3D; 2D for planar calibration | Start magnetic calibration | Immediate |
CONFIG PMUX<n> IO<m> | n: 1 = SYNC_IN, 2 = SOUT | Remap multifunction IO pin | Save & reboot |
SAVECONFIG | — | Save configuration to non-volatile memory | Immediate |
REBOOT | — | Reboot module | Immediate |
FRESET | — | Restore factory defaults and reboot | Immediate |
Serial Port & Output Control
SERIALCONFIG — Change Baud Rate
SERIALCONFIG [<COM>] <BAUD>Supported baud rates (10 steps): 4800, 9600, 19200, 38400, 57600, 115200, 230400, 256000, 460800, 921600 (other values return ERR). Omitting <COM> targets the current port.
The new baud rate is saved immediately; the module returns OK at the old baud rate and switches immediately. For example, to switch to 921600: send SERIALCONFIG 921600 at the old rate, wait for OK, switch the host to 921600 and flush the RX buffer, then send LOG COMCONFIG to confirm BAUD=921600.
LOG — Data Frame Output Control
LOG [<COM>] <MSG> ONTIME <sec>
LOG [<COM>] <MSG> ONMARK 1
LOG [<COM>] <MSG> ONMARK ONCE- Periods round to whole milliseconds (e.g.
0.01= 10 ms = 100 Hz,0.002= 2 ms = 500 Hz,0= off). Verify the activeONTIME(ms) withLOG COMCONFIG. - Common sequences:
- Switch from HI91 to 100 Hz HI83:
LOG HI91 ONTIME 0→LOG HI83 ONTIME 0.01→SAVECONFIG. - Enable 500 Hz HI91 on COM2:
SERIALCONFIG COM2 921600, thenLOG COM2 HI91 ONTIME 0.002→SAVECONFIG.
- Switch from HI91 to 100 Hz HI83:
- For frame sizes and rate ceilings, see Baud Rate & Frame Rate Limits.
LOG HI83 MAP — Select HI83 Segments
LOG HI83 MAP <BITMAP><BITMAP> uses 0x-prefixed hex and sets only public bits within 0x00000FFF. MAP is global across serial ports, takes effect on the next frame, and auto-saves without rebooting. Verify it against LOG COMCONFIG and the live frame header's data_bitmap.
Common bitmaps:
0x000000FF: default (acc, gyro, mag, Euler, quaternion, microsecond time, UTC, pressure)0x0000001F: compact 5-field set (acc, gyro, mag, Euler, quaternion)0x00000C1B: typical MRU set (acc, gyro, Euler, quaternion, MRU displacement & frequency)
Query Example
→ LOG COMCONFIG
← COM=COM1
← BAUD=115200
← MSG=HI83, ONTIME=0
← MSG=HI83, MAP=0xFF
← MSG=HI91, ONTIME=10
← OKIgnore any extra MSG= lines in the response.
Operating Modes, Range & Bandwidth
CONFIG ATT MODE <VAL>| VAL | Mode | Use Case |
|---|---|---|
0 | 6-axis (VRU, default) | Acc + gyro only; relative heading, immune to magnetic interference; ideal indoors, on robots, and near motors |
1 | 9-axis (AHRS) | Fuses magnetometer for magnetic-north heading; requires a clean magnetic environment and calibration |
4 | Humanoid robot | Bipedal / humanoid dynamic motion |
5 | Indoor low-speed robot | Cleaning / service robots; stronger stationary detection for steadier parked heading |
7 | Low-dynamic / inclinometer | Static or quasi-static measurement with smoother output |
Requires SAVECONFIG and REBOOT. Recheck attitude zeroing after changing modes; see Coordinates, Mounting & Zeroing.
Measurement range is managed automatically — no manual range setting is needed (check the model datasheet for limits). Modules using ICM-45686 automatically extend to ±32 G / ±4000 deg/s under high dynamics: floating-point frames (HI91 / HI83 / CANFD83) carry the full range, whereas fixed-point i16 outputs (Modbus / J1939) always scale to ±16 G and ±2000 deg/s and saturate there. A saturated fixed-point reading may not set ACC_SAT/GYR_SAT; treat full-scale fixed-point values as invalid.
Filter bandwidth and latency are set automatically by the operating mode.
Save, Reboot & Factory Reset
SAVECONFIG: persist current settings, returnsOK.REBOOT: restart the module to apply settings that require reboot.FRESET: restore user settings to factory defaults and reboot automatically (factory acc/gyro calibration is preserved).
WARNING
Record your current communication parameters (baud rates, Modbus slave ID, CAN bit rate and node address) before running FRESET. A factory reset may revert communication settings and clears mounting orientation, coordinate frame, and attitude zero offsets. For ordinary link issues, follow Link Recovery first rather than resetting.
After FRESET: reconnect using factory defaults (or recorded settings) → verify LOG COMCONFIG / LOG USRCONFIG → reapply output frames, mounting orientation, output axes, and zeroing as needed.
Complete Example (500 Hz HI91)
Goal: set 6-axis mode, raise COM1 to 921600 bps, and stream 500 Hz HI91. Rule: raise the baud rate before raising the frame rate (each configuration command replies OK on success):
→ LOG DISABLE (pause stream)
→ CONFIG ATT MODE 0 (6-axis mode, applied after reboot)
→ SERIALCONFIG 921600 (send at 115200; switches right after OK)
(switch host to 921600 and flush RX buffer)
→ LOG DISABLE (verify link at new baud rate)
→ LOG HI91 ONTIME 0.002 (2 ms = 500 Hz)
→ SAVECONFIG
→ REBOOT (wait ~1 s for reboot)
→ LOG DISABLE (stream resumes after reboot; pause to inspect)
→ LOG COMCONFIG (confirm BAUD=921600, HI91 ONTIME=2)
→ LOG USRCONFIG (confirm PROFILE=0)
→ LOG ENABLE (resume stream; verify 2 ms frame delta)