Skip to content

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.

Terminal window
uv tool install lc29h

Every command accepts these options before the subcommand name:

OptionEnvironment VariableDefaultDescription
--port PATHLC29H_PORT/dev/ttyS0Serial port path
--baud RATELC29H_BAUD115200Serial baud rate
--jsonoffOutput as JSON where supported
--versionPrint 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:

Terminal window
export LC29H_PORT=/dev/ttyAMA0
export LC29H_BAUD=115200
# Now just:
lc29h info
lc29h monitor

Query the PAIR021 (chip version) and PQTMVERNO (firmware version) registers. Displays model identification, firmware version, build date, chip model, and chip firmware.

Terminal window
lc29h info

Example output:

Model: LC29HDAANR11A01S
Firmware: LC29HDANR11A01S_RSA
Built: 2024/02/23 17:58:32
Chip: Airoha AG3335A
Chip FW: AXN_5.8.3_LLAC29H

Stream real-time position fixes from the module. Output continues until interrupted with Ctrl+C or until --count fixes are reached.

Terminal window
lc29h monitor [--format table|csv|nmea] [--count N]
FlagShortDefaultDescription
--formattableOutput format: table, csv, or nmea
--count-n0Stop after N fixes (0 = infinite)
Terminal window
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.7

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.

Terminal window
lc29h satellites

On 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.


Enable or disable individual GNSS constellations. All constellations are enabled by default.

Terminal window
lc29h config constellation [flags]
FlagDefaultDescription
--gps / --no-gpsonGPS (US)
--glonass / --no-glonassonGLONASS (Russia)
--galileo / --no-galileoonGalileo (EU)
--beidou / --no-beidouonBeiDou (China)
--qzss / --no-qzssonQZSS (Japan)
Terminal window
# Enable GPS and Galileo only
lc29h config constellation --gps --galileo --no-glonass --no-beidou --no-qzss
# Enable all constellations
lc29h config constellation --gps --glonass --galileo --beidou --qzss

Set the position fix rate in milliseconds. Accepts values from 100 (10 Hz) to 10000 (0.1 Hz).

Terminal window
lc29h config fix-rate MS
Terminal window
# 10 Hz updates
lc29h config fix-rate 100
# 1 Hz updates (default)
lc29h config fix-rate 1000

Change the serial baud rate on the module. After this command succeeds, you must reconnect using the new rate.

Terminal window
lc29h config baud RATE
Terminal window
lc29h 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 monitor

Persist the current configuration to flash memory. Sends both the PAIR save command and the PQTM save command to cover all parameter domains.

Terminal window
lc29h config save
Configuration saved to flash
Parameters saved (PQTM)

Restore all module parameters to factory defaults. This resets constellations, fix rate, baud rate, and all other settings.

Terminal window
lc29h config restore
Factory defaults restored

Restart the GNSS module. The restart mode controls how much cached navigation data is cleared.

Terminal window
lc29h restart [cold|warm|hot]
ModeDefaultClearsTypical TTFF
hotyesNothing — restart with all data intact< 1s
warmEphemeris only~30s
coldEphemeris, almanac, position, and time~60s
Terminal window
# Quick restart (default)
lc29h restart
# Full cold start (forces re-acquisition of all satellites)
lc29h restart cold

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.

Terminal window
lc29h ntrip sources --host HOST [--port PORT]
FlagDefaultDescription
--hostrequiredNTRIP caster hostname
--port2101Caster port
Terminal window
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 points

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.

Terminal window
lc29h ntrip start --host HOST --mount MOUNT [--port PORT] [--user USER] [--password PASS]
FlagDefaultDescription
--hostrequiredNTRIP caster hostname
--mountrequiredMount point name
--port2101Caster port
--user""Username (rtk2go.com requires a valid email address)
--password""Password (rtk2go.com uses none for free mounts)
Terminal window
lc29h ntrip start \
--host rtk2go.com \
--mount NEAR_ME \
--user your@email.com \
--password none
Connected to rtk2go.com/NEAR_ME
Streaming RTCM3 corrections... (Ctrl+C to stop)
RTCM chunks forwarded: 120

Reconnection 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.


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.

Terminal window
lc29h survey-in start-survey [--duration SECS] [--accuracy METERS]
FlagDefaultDescription
--duration3600Minimum survey duration in seconds
--accuracy1.0Required position accuracy in meters
Terminal window
# Default: 1 hour, 1 meter accuracy
lc29h survey-in start-survey
# High accuracy: 2 hours, 10 cm
lc29h survey-in start-survey --duration 7200 --accuracy 0.1
Survey-in started (min 3600s, target 1.0m)

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.

Terminal window
lc29h survey-in status
State: survey-in
Duration: 1823s
Accuracy: 2.341 m
Lat: 38.89767630
Lon: -77.03652980
Alt: 42.300 m (ellipsoidal)
ECEF: X=1115468.3210 Y=-4844939.1230 Z=3983283.4560

The state field reports one of three values: idle (not started), survey-in (actively collecting), or valid (accuracy target met).


Cancel a running survey-in process.

Terminal window
lc29h survey-in stop

All commands accept --port to specify the serial device. The correct device path depends on your hardware interface and board model.

Terminal window
# 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 monitor

Set LC29H_PORT in your environment to avoid repeating the flag:

Terminal window
echo 'export LC29H_PORT=/dev/ttyAMA0' >> ~/.bashrc
source ~/.bashrc
VariantFeatures 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