Skip to content

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 sends OK); REBOOT and FRESET (reset before replying).
    • Query commands output one or more KEY=VALUE lines ending with OK. Match by KEY name in scripts rather than line number or order.
  • Standard workflow: LOG DISABLE (pause stream) → change settings → read back to verify → SAVECONFIG → REBOOT if required → read back and check live output after reboot.
    • OK alone 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 REBOOT or FRESET, then send LOG VERSION to confirm recovery.

Command Quick Reference ​

CommandArgumentsFunctionTakes Effect
LOG VERSION—Query model, build date, UUID, SN, firmware & bootloader versionQuery
LOG COMCONFIG—Query port baud rate, ONTIME (ms) / ONMARK, HI83 MAPQuery
LOG USRCONFIG—Query PROFILE, URFR, COORDQuery
LOG MCAL STAT—Query magnetic calibration state and progressQuery
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 = offSet periodic serial outputImmediate
LOG [<COM>] <MSG> ONMARK 1Same as aboveTrigger frame on SYNC_IN rising edgeImmediate
LOG [<COM>] <MSG> ONMARK ONCESame as aboveSoftware-trigger frames configured for ONMARK 1 (no OK)Immediate
LOG HI83 MAP <BITMAP>Public bitmask 0x00000FFF (hex with 0x)Select HI83 payload segmentsImmediate
SERIALCONFIG [<COM>] <BAUD>10 standard baud rates (below)Change serial baud rateImmediate (auto-saved)
CONFIG ATT MODE <VAL>0 / 1 / 4 / 5 / 7Set operating modeSave & reboot
CONFIG IMU COORD <VAL>0 (RFU) / 4 (ROS)Set output coordinate frameSave & reboot
CONFIG IMU URFR <CODE>24 three-digit codes, default 024Set mounting orientationSave & reboot
CONFIG ATT RST <VAL>0 / 1 / 2 / 3 / 5Attitude zeroing and levelingImmediate
CONFIG MCAL START [2D]Omit for 3D; 2D for planar calibrationStart magnetic calibrationImmediate
CONFIG PMUX<n> IO<m>n: 1 = SYNC_IN, 2 = SOUTRemap multifunction IO pinSave & reboot
SAVECONFIG—Save configuration to non-volatile memoryImmediate
REBOOT—Reboot moduleImmediate
FRESET—Restore factory defaults and rebootImmediate

Serial Port & Output Control ​

SERIALCONFIG — Change Baud Rate ​

text
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 ​

text
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 active ONTIME (ms) with LOG 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, then LOG COM2 HI91 ONTIME 0.002 → SAVECONFIG.
  • For frame sizes and rate ceilings, see Baud Rate & Frame Rate Limits.

LOG HI83 MAP — Select HI83 Segments ​

text
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 ​

text
→ LOG COMCONFIG
← COM=COM1
← BAUD=115200
← MSG=HI83, ONTIME=0
← MSG=HI83, MAP=0xFF
← MSG=HI91, ONTIME=10
← OK

Ignore any extra MSG= lines in the response.

Operating Modes, Range & Bandwidth ​

text
CONFIG ATT MODE <VAL>
VALModeUse Case
06-axis (VRU, default)Acc + gyro only; relative heading, immune to magnetic interference; ideal indoors, on robots, and near motors
19-axis (AHRS)Fuses magnetometer for magnetic-north heading; requires a clean magnetic environment and calibration
4Humanoid robotBipedal / humanoid dynamic motion
5Indoor low-speed robotCleaning / service robots; stronger stationary detection for steadier parked heading
7Low-dynamic / inclinometerStatic 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, returns OK.
  • 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):

text
→ 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)

Last updated:

IMU · AHRS · INS · RTK Support Center