Python CLI
The lc29h CLI replaces the Windows-only QGNSS tool with a native Linux solution for all LC29H variants. Built on Click, it provides full module control over serial UART or USB.
Installation
Section titled “Installation”uv tool install lc29hpipx install lc29hgit clone https://git.supported.systems/warehack.ing/lc29hcd lc29huv syncuv run lc29h --helpGlobal Options
Section titled “Global Options”Every command accepts these options before the subcommand name:
| Option | Environment Variable | Default | Description |
|---|---|---|---|
--port PATH | LC29H_PORT | /dev/ttyS0 | Serial port path |
--baud RATE | LC29H_BAUD | 115200 | Serial baud rate |
--json | off | Output as JSON where supported | |
--version | Print version and exit |
Environment variables are checked when the flag is not provided, so you can set them once in your shell profile or .env file instead of passing --port on every invocation:
export LC29H_PORT=/dev/ttyAMA0export LC29H_BAUD=115200
# Now just:lc29h infolc29h monitorCommands
Section titled “Commands”Query the PAIR021 (chip version) and PQTMVERNO (firmware version) registers. Displays model identification, firmware version, build date, chip model, and chip firmware.
lc29h infoExample output:
Model: LC29HDAANR11A01SFirmware: LC29HDANR11A01S_RSABuilt: 2024/02/23 17:58:32Chip: Airoha AG3335AChip FW: AXN_5.8.3_LLAC29Hmonitor
Section titled “monitor”Stream real-time position fixes from the module. Output continues until interrupted with Ctrl+C or until --count fixes are reached.
lc29h monitor [--format table|csv|nmea] [--count N]| Flag | Short | Default | Description |
|---|---|---|---|
--format | table | Output format: table, csv, or nmea | |
--count | -n | 0 | Stop after N fixes (0 = infinite) |
lc29h monitor Time Lat Lon Alt Fix Sats HDOP---------------------------------------------------------------------- 14:32:01 38.8976763 -77.0365298 42.3 RTK FIX 18 0.6 14:32:02 38.8976764 -77.0365297 42.2 RTK FIX 18 0.6 14:32:03 38.8976762 -77.0365299 42.4 RTK FIX 17 0.7lc29h monitor --format csv -n 314:32:01,38.8976763,-77.0365298,42.3,4,18,0.614:32:02,38.8976764,-77.0365297,42.2,4,18,0.614:32:03,38.8976762,-77.0365299,42.4,4,17,0.7Fields: timestamp,lat,lon,alt,fix_type,sats,hdop
lc29h monitor --format nmea -n 2$GNGGA,143201.00,3853.86058,N,07702.19179,W,4,18,0.6,42.3,M,-33.4,M,1.0,0000*4E$GNRMC,143201.00,A,3853.86058,N,07702.19179,W,0.012,,260226,,,D,V*12satellites
Section titled “satellites”Display satellite constellation status. The command collects approximately 3 seconds of GSV data, then renders a table. The output format adapts automatically based on whether the module reports dual-band (L1+L5) data.
lc29h satellitesOn modules tracking L1+L5 (the typical case for LC29H), satellites are grouped by physical PRN with separate SNR columns per band:
PRN Const Elev Azim L1 L5 Used-------------------------------------------- 6 GPS 53 55 22 23 * 11 GPS 69 170 34 29 * 25 GPS 28 307 26 27 * 30 GPS 15 42 --- 18 75 GLONASS 54 155 27 --- * 76 GLONASS 34 302 19 --- 27 BEIDOU 50 53 33 29 * 30 BEIDOU 70 256 33 33
8 satellites tracked (14 signal observations)The Used column shows * for satellites contributing to the current fix (derived from GSA sentence parsing). A --- in the L1 or L5 column means no signal was received on that band.
When only single-band data is available, a simpler table is shown:
PRN Const Elev Azim SNR Used-------------------------------------- 6 GPS 53 55 22 * 11 GPS 69 170 34 * 25 GPS 28 307 26 *
Total: 3 satellites in viewconfig constellation
Section titled “config constellation”Enable or disable individual GNSS constellations. All constellations are enabled by default.
lc29h config constellation [flags]| Flag | Default | Description |
|---|---|---|
--gps / --no-gps | on | GPS (US) |
--glonass / --no-glonass | on | GLONASS (Russia) |
--galileo / --no-galileo | on | Galileo (EU) |
--beidou / --no-beidou | on | BeiDou (China) |
--qzss / --no-qzss | on | QZSS (Japan) |
# Enable GPS and Galileo onlylc29h config constellation --gps --galileo --no-glonass --no-beidou --no-qzss
# Enable all constellationslc29h config constellation --gps --glonass --galileo --beidou --qzssconfig fix-rate
Section titled “config fix-rate”Set the position fix rate in milliseconds. Accepts values from 100 (10 Hz) to 10000 (0.1 Hz).
lc29h config fix-rate MS# 10 Hz updateslc29h config fix-rate 100
# 1 Hz updates (default)lc29h config fix-rate 1000config baud
Section titled “config baud”Change the serial baud rate on the module. After this command succeeds, you must reconnect using the new rate.
lc29h config baud RATElc29h config baud 921600# Output: Baud rate set to 921600# Reconnect with the new baud rate to continue.
# Subsequent commands must use the new rate:lc29h --baud 921600 monitorconfig save
Section titled “config save”Persist the current configuration to flash memory. Sends both the PAIR save command and the PQTM save command to cover all parameter domains.
lc29h config saveConfiguration saved to flashParameters saved (PQTM)config restore
Section titled “config restore”Restore all module parameters to factory defaults. This resets constellations, fix rate, baud rate, and all other settings.
lc29h config restoreFactory defaults restoredrestart
Section titled “restart”Restart the GNSS module. The restart mode controls how much cached navigation data is cleared.
lc29h restart [cold|warm|hot]| Mode | Default | Clears | Typical TTFF |
|---|---|---|---|
hot | yes | Nothing — restart with all data intact | < 1s |
warm | Ephemeris only | ~30s | |
cold | Ephemeris, almanac, position, and time | ~60s |
# Quick restart (default)lc29h restart
# Full cold start (forces re-acquisition of all satellites)lc29h restart coldntrip sources
Section titled “ntrip sources”Query an NTRIP caster for its source table (list of available mount points). Useful for discovering what correction streams are available before starting an RTK session.
lc29h ntrip sources --host HOST [--port PORT]| Flag | Default | Description |
|---|---|---|
--host | required | NTRIP caster hostname |
--port | 2101 | Caster port |
lc29h ntrip sources --host rtk2go.com Name Format Nav Country Auth Fee------------------------------------------------------------ NEAR_MOUNT RTCM 3.2 GPS+GLO+GAL US N N OTHER_BASE RTCM 3.2 GPS+GLO+GAL US N N
Total: 2 mount pointsntrip start
Section titled “ntrip start”Connect to an NTRIP caster and stream RTCM3 correction data to the module for RTK positioning. The client auto-detects NTRIP protocol version (1.0 ICY-style vs 2.0 HTTP/1.1) based on the server response.
lc29h ntrip start --host HOST --mount MOUNT [--port PORT] [--user USER] [--password PASS]| Flag | Default | Description |
|---|---|---|
--host | required | NTRIP caster hostname |
--mount | required | Mount point name |
--port | 2101 | Caster port |
--user | "" | Username (rtk2go.com requires a valid email address) |
--password | "" | Password (rtk2go.com uses none for free mounts) |
lc29h ntrip start \ --host rtk2go.com \ --mount NEAR_ME \ --user your@email.com \ --password noneConnected to rtk2go.com/NEAR_MEStreaming RTCM3 corrections... (Ctrl+C to stop) RTCM chunks forwarded: 120Reconnection behavior: On disconnect, the client uses exponential backoff starting at 10 seconds and doubling up to a maximum of 5 minutes. The backoff resets to 10 seconds on each successful reconnection. This follows the rtk2go.com fair-use guidelines.
survey-in start-survey
Section titled “survey-in start-survey”Begin a base station survey-in process. The module averages its position over the specified duration to establish a fixed reference point. This command is specific to the LC29H(BS) variant.
lc29h survey-in start-survey [--duration SECS] [--accuracy METERS]| Flag | Default | Description |
|---|---|---|
--duration | 3600 | Minimum survey duration in seconds |
--accuracy | 1.0 | Required position accuracy in meters |
# Default: 1 hour, 1 meter accuracylc29h survey-in start-survey
# High accuracy: 2 hours, 10 cmlc29h survey-in start-survey --duration 7200 --accuracy 0.1Survey-in started (min 3600s, target 1.0m)survey-in status
Section titled “survey-in status”Check the progress of a running survey-in. Displays the current state, elapsed duration, achieved accuracy, and computed position in both ECEF and WGS84 coordinates.
lc29h survey-in statusState: survey-inDuration: 1823sAccuracy: 2.341 mLat: 38.89767630Lon: -77.03652980Alt: 42.300 m (ellipsoidal)ECEF: X=1115468.3210 Y=-4844939.1230 Z=3983283.4560The state field reports one of three values: idle (not started), survey-in (actively collecting), or valid (accuracy target met).
survey-in stop
Section titled “survey-in stop”Cancel a running survey-in process.
lc29h survey-in stopPort Selection
Section titled “Port Selection”All commands accept --port to specify the serial device. The correct device path depends on your hardware interface and board model.
# UART mode (Raspberry Pi 4B)lc29h --port /dev/ttyS0 monitor
# UART mode (Raspberry Pi 5)lc29h --port /dev/ttyAMA0 monitor
# USB mode (any board)lc29h --port /dev/ttyUSB0 monitorSet LC29H_PORT in your environment to avoid repeating the flag:
echo 'export LC29H_PORT=/dev/ttyAMA0' >> ~/.bashrcsource ~/.bashrcSupported Variants
Section titled “Supported Variants”| Variant | Features Available via CLI |
|---|---|
| LC29H(AA) | Info, monitor, satellites, constellation config, AGNSS |
| LC29H(BA) | Info, monitor, satellites, NTRIP, dead reckoning config |
| LC29H(CA) | Info, monitor, satellites, dead reckoning config |
| LC29H(DA) | Info, monitor, satellites, NTRIP |
| LC29H(BS) | Info, monitor, satellites, survey-in, base station config |