How to configure Quectel LC29HBS
Waveshare has refered RTKBase in their LC29HBS board description https://www.waveshare.com/wiki/LC29H(XX)_GPS/RTK_HAT
Looks like their configuration was successful but they did not show Main Service configuration details.
Has anyone successfully configure this GNSS unit?
RTKBase does not detect this unit. How to correctly configure this unit? Are Base coordinates fill in automatically when unit is detected? I put the following coordinates: 49.208601 19.072489 1050 and RTKBase says format is not correct.
Please help to configure RTKBase unit
Coordinates format I've figured out myself by looking at input fields defined pattern. Altitude should have at least 2 decimal places 1050.00 in this case
LC29H(BS) Initial Configuration: Connect to the unit using QGNSS. In the console, data input, Advanced, select: Text format: ASCII, Checksum Type: NMEA, Suffix: CRLF
In Data Input, enter the following (as per Quectel_LC29HBS_GNSS_Protocol_Specification_V1.1-1.pdf):
Check firmware version:
$PQTMVERNO*
Enable MSM7 messages
$PAIR432,1*
Enable Station Reference Message 1005
$PAIR434,1*
Enable Ephemeris messages
$PAIR436,1*
Crank the baud rate up (Could also go 3000000)
$PAIR864,0,0,921600*
Enable NMEA GGA Time, position, and fix related data
$PAIR062,0,1*
Enable NMEA GLL Position data: position fix, time of position fix, and status
$PAIR062,1,1*
Enable NMEA GSA GPS DOP and active satellites
$PAIR062,2,1*
Enable NMEA GSV Satellite information
$PAIR062,3,1*
Enable NMEA RMC Position, velocity, and time
$PAIR062,4,1*
Enable NMEA VTG Track made good and speed over ground
$PAIR062,5,1*
Enable NMEA ZDA UTC day, month, and year, and local time zone offset
$PAIR062,6,1*
Enable NMEA GRS GRS range residuals
$PAIR062,7,1*
Enable NMEA GST Position error statistics
$PAIR062,8,1*
Save parameters
$PQTMSAVEPAR*
Power cycle the unit, reconnect at the new baud rate
Start Survey-in (1 day duration)
$PQTMCFGSVIN,W,1,86400,15,0,0,0*
You will see PQTMSVINSTATUS repeating, when the third field=2, the survey-in is complete. Fields 8, 9 & 10 are the mean ECEF coordinates. Convert these to lat/long/elevation above ellipsoid to enter into RTKBase. You may have to prune some places after the decimal point for height before the parser will accept it:
import numpy as np
# Constants
a = 6378137.0 # WGS-84 Earth semimajor axis (m)
f = 1 / 298.257223563 # WGS-84 flattening
e2 = f * (2 - f) # Square of eccentricity
# Input ECEF coordinates (X, Y, Z)
X, Y, Z = -123456789.0000, 1263456789.000, -123456789.1234
# Calculate longitude
longitude = np.arctan2(Y, X)
# Iterative calculation of latitude and height
p = np.sqrt(X**2 + Y**2)
lat = np.arctan2(Z, p * (1 - e2)) # Initial guess for latitude
lat_prev = 0
h = 0
# Iterate until convergence
while abs(lat - lat_prev) > 1e-12:
lat_prev = lat
N = a / np.sqrt(1 - e2 * np.sin(lat)**2) # Prime vertical radius of curvature
h = p / np.cos(lat) - N
lat = np.arctan2(Z, p * (1 - e2 * N / (N + h)))
# Convert latitude and longitude to degrees
latitude = np.degrees(lat)
longitude = np.degrees(longitude)
latitude, longitude, h
When complete, save parameters
$PQTMSAVEPAR*
For detection:
$PQTMVERNO*
returns:
$PQTMVERNO,LC29HBSNR11A01S,2023/02/13,10:14:06*
The pertinent information to detect this is:
LC29HBS
@deece - thanks a lot for this comprehensive guide! Have you ever got RTK fix status with this board? I read in internet, people get RTK float only.
I only got my base station functional tonight, I probably won't be at a point where I have rover for months.
@jupiter9595 Care to give this PR a try? https://github.com/Stefal/rtkbase/pull/432
You can find the full tree here: https://github.com/deece/rtkbase/tree/lc29hbs
What would be command to install the lc29hbs branch.
I did get the lc29hbs and LG290P working with rtkbase but was interested in checking out your more automated install process.
@jupiter9595 hey were you able to get rtk fix with this module as i am kinda stuck at float
Please add this Module to rtkbase , @deece or comit your tree to oginal master i got now rdkbase also work with LC29H but only RCTM3 , didnt see NMEA or position on first page ,
please can someone show all setting of rdkbase for LC29H BS
Just wanted to add to this great write up by @deece, whether it's on Windows or Linux (raspberry pi). I've had to have the LC29H-BS connected via USB to issue commands and receive a response I can actually read. Whereas if I manually send the commands over I2C on the Pi, responses come back delayed and garbled. But to be clear, if its running on I2C the proposed pull request #432 seems to handle this behind the scenes.
@RaptorSDS - if i had to wager a guess (but I could be wrong as a lot of this is new to me as well), it sounds like you need to manually register the configure_gps.service to get the device to start outputting data as the service sends the commands above on boot since they are not saved to the device's flash memory.
Just wanted to add to this great write up by @deece, whether it's on Windows or Linux (raspberry pi). I've had to have the LC29H-BS connected via USB to issue commands and receive a response I can actually read. Whereas if I manually send the commands over I2C on the Pi, responses come back delayed and garbled. But to be clear, if its running on I2C the proposed pull request #432 seems to handle this behind the scenes.
@RaptorSDS - if i had to wager a guess (but I could be wrong as a lot of this is new to me as well), it sounds like you need to manually register the configure_gps.service to get the device to start outputting data as the service sends the commands above on boot since they are not saved to the device's flash memory.
Thank you after edit settings.conf and use configure_gps.services (chmod +x) now it works be aware in setting you have to set Quectel LC29HBS as name , in Webinterface this name ist not possible red field
the garbage can be the rtcm3 messages , and then the nmea message , that also produce delays
Thanks for confirming my steps @RaptorSDS 😃
Hey @deece, really appreciate your work — totally deserves a merge 😄. Finally not stuck with just Null Island coords!
@deece great work on updating the LCH29BS. I'm able to use the base and get into RTK Fixed state on my rover, however, I'm seeing a behavior where when in DGPS and RTK Float, it is off by .00015 in latitude and .00001 in longitude. I've rebuilt the base 6 or so times and have changed coordinates a few times in the base to try and adjust for the off coordinates. I cannot see any reason that each time I rebuild it, I am still off by some 10 to 40 meters. I'm also struggling with similar issues as others where in the status page, I see the satellites signal quality graph, but in the bottom the base coordinates are not being detected. Could this be the reason? Is anyone able to list out the steps required to properly configure the base using the LCH29BS? I'm trying to survey my property lines using a known coordinate for the base, but I'm stuck being that when in RTK Fixed its is pushing my rover off by several meters.
I done the survey in by disconnect the base , connect my rover to the fixed base antenne used another base in my near to have trk fix for this position wait 10min to see the avarage and use the now found position for base antenna . after that switching back to base chip+antenna and iput this in the base coordinate . after many other problems with wlan driver in rasberry debian linux i now switch to another box with openwrt and str2str
Hello everyone. First thing first, I great thanks to both Stefal and Deece for all that great work. That helped a lot in clarifying the Waveshare slim documentation.
After a few days of trials and errors, I got the rtkbase installed on Bookworm. All the services are running and I can connect to the RTKBase website. However, using a Waveshare LC29HBS, I still cannot detect the gnss receiver and I have a few questions:
- If the name of the receiver in settings.conf is for instance LC29HBS, should there be a corresponding file in rtkbase/receiver_cfg that enumerates the $PQ and $PAIR commands that are needed to properly configure the receiver at startup?
- I'm pretty sure I'm missing something, and it might just be under my nose... There is a mention of a configure_gps.service, but I can't find how to run it.
Maybe those of you who successfully got it to work could give me a pointer in the right direction?
Many Thanks,
Michel
Answering my own question. I found some of the files that I missed during the install from deece's tree. Moving ahead :)
Curious how you make out. I had it working and due to a 5 to 40 meter inaccuracy rebuilt it and now can't get it working again. I really would be interested in a repeatable command syntax to setup the base. It does read values and does caster rtcm (legacy) messages out of the box, but doesn't recognize the base chip. I've rebuilt it from scratch so many times I can't count anymore and was just hoping for a little guidance. When I use .git, and overlay the deece branch it only builds a venv with the requirements in it. It seems like you may be best to use stefal's install and then download deece as a zip and unzip with overwrite any files it comes across as duplicates? Not %100 sure, but was really hoping to get this working to a satisfactory result.
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: michel2711 @.> Sent: Saturday, November 15, 2025 6:19:18 AM To: Stefal/rtkbase @.> Cc: erok26 @.>; Comment @.> Subject: Re: [Stefal/rtkbase] How to configure Quectel LC29HBS (Issue #425)
[https://avatars.githubusercontent.com/u/243813900?s=20&v=4]michel2711 left a comment (Stefal/rtkbase#425)https://github.com/Stefal/rtkbase/issues/425#issuecomment-3536380033
Answering my own question. I found some of the files that I missed during the install from deece's tree. Moving ahead :)
— Reply to this email directly, view it on GitHubhttps://github.com/Stefal/rtkbase/issues/425#issuecomment-3536380033, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BY2S2BFMZNSX5T66WPQA5ST344D3NAVCNFSM6AAAAABNDTMG7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMZWGM4DAMBTGM. You are receiving this because you commented.Message ID: @.***>
I used the lc29hbs branch in Deece. It seems to contain most of the files that are necessary to configure the receiver. So far, I'm still not detecting the receiver and I'm wondering if the receiver type (Quectel LC29HBS) is correct. The web UI seems to disagree. However, all services are running and the web application starts. That's what I did:
1 - I got a 64bits bookworm image with desktop using PI imager 2 - apt-get update and upgrade 3 - raspi-config to enable I2C and UART hardware 3 - cd ~ wget https://raw.githubusercontent.com/deece/rtkbase/refs/heads/lc29hbs/tools/install.sh -O install.sh chmod +x install.sh 4 - I ran the manual install (steps 1 to 10)
Note that for some reason that I cannot explain, I had to use a virtual environment on step 4 ( I also know close to nothing about Python). Also, the step 10 seems to expect configure_gps.sh to be in ~/rtkbase and it's in the ~/rtkbase/web_app directory. It needs to be moved up and chmod'ed +x etc. After that step 10 works fine and the services are all running. I am now on the web app UI and it cannot detect the receiver, although I see the receiving led blinking during the detect phase . I'm going to look at the code and try to understand what's happening. Hopefully, more news in the next few days.
Here is where I’m at (I hope the screenshots come through).
wget https://raw.githubusercontent.com/deece/rtkbase/refs/heads/lc29hbs/tools/install.sh -O install.sh chmod +x install.sh sudo ./install.sh --user=base --all release This does a full install of Stefal’s main master version (—all release) sudo scp @.**:/Users/Username/Downloads/deece.zip /home/base/ unzip -o deece.zip -d /home/base/test cp -r /home/base/test/rtkbase-lc29hbs/ /home/base/rtkbase/ open browser and set settings on main. [A screenshot of a computer AI-generated content may be incorrect.] Save and turn on sudo nano /rtkbase/settings.conf under [main] update com port, receiver format and receiver name (It should have been with a – as the web ui doesn’t accept the space.) [main] position='47.0983869 -1.2655108 36.40' com_port='ttyS0' com_port_settings='115200:8:n:1' receiver='Quectel LC29HBS' receiver_format='rtcm3' receiver_firmware='' receiver_carrier='' antenna_info='ADVNULLANTENNA' tcp_port='5015' ext_tcp_source='' ext_tcp_port='' gnss_rcv_web_ip=192.168.3.1 gnss_rcv_web_proxy_port=9090 nmea_port='5014'
sudo reboot sudo ./rtkbase/configure_gps.sh Should see a valid response; @.***:~ $ sudo ./rtkbase/configure_gps.sh Configuring Quectel LC29HBS on /dev/ttyS0 at speed 115200 Full power cycle of the pi and base should capture all settings as configured. Setup and test Ntrip Caster (I use Ntrip Checker on Android to verify output and output type).
[A screenshot of a computer AI-generated content may be incorrect.]
Connect your rover to the base. I use python with a flask web interface to tell me whether GPS is in Autonomous or any type of RTK float/fix.
However, I’ve found that using the Ntrip Caster Service I can never achieve RTK between the base and rover. If I point it at the rtcm tcp service on port 5016, I get to RTK_Float/RTK_Fixed.
[A screen shot of a gps point AI-generated content may be incorrect.] [A screenshot of a computer AI-generated content may be incorrect.] My current problem is getting survey in or the initial point coordinates to set in the base to start with to ensure that the rover is accurate. And on previous builds, I noticed either a 15m or 40m offset to the North with a slight accent West which is not ideal. Trying to understand why as both of my rovers do the exact same thing.
From: michel2711 @.> Date: Sunday, November 16, 2025 at 4:39 AM To: Stefal/rtkbase @.> Cc: erok26 @.>, Comment @.> Subject: Re: [Stefal/rtkbase] How to configure Quectel LC29HBS (Issue #425)
[https://avatars.githubusercontent.com/u/243813900?s=20&v=4]michel2711 left a comment (Stefal/rtkbase#425)https://github.com/Stefal/rtkbase/issues/425#issuecomment-3538463405
I used the lc29hbs branch in Deece. It seems to contain most of the files that are necessary to configure the receiver. So far, I'm still not detecting the receiver and I'm wondering if the receiver type (Quectel LC29HBS) is correct. The web UI seems to disagree. However, all services are running and the web application starts. That's what I did:
1 - I got a 64bits bookworm image with desktop using PI imager 2 - apt-get update and upgrade 3 - raspi-config to enable I2C and UART hardware 3 - cd ~ wget https://raw.githubusercontent.com/deece/rtkbase/refs/heads/lc29hbs/tools/install.sh -O install.sh chmod +x install.sh 4 - I ran the manual install (steps 1 to 10)
Note that for some reason that I cannot explain, I had to use a virtual environment on step 4 ( I also know close to nothing about Python). Also, the step 10 seems to expect configure_gps.sh to be in ~/rtkbase and it's in the ~/rtkbase/web_app directory. It needs to be moved up and chmod'ed +x etc. After that step 10 works fine and the services are all running. I am now on the web app UI and it cannot detect the receiver, although I see the receiving led blinking during the detect phase . I'm going to look at the code and try to understand what's happening. Hopefully, more news in the next few days.
— Reply to this email directly, view it on GitHubhttps://github.com/Stefal/rtkbase/issues/425#issuecomment-3538463405, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BY2S2BAX7WNS2EYXNFEIR2335BA5JAVCNFSM6AAAAABNDTMG7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKMZYGQ3DGNBQGU. You are receiving this because you commented.
Has anyone been able to get the "Survey In" script to work? It imports from pyproj and I can't install pyproj on any version of raspios. I tried doing a rewrite using just math instead of transformer and it looks like it will work. However, the device only brings back raw or binary data and no nmea sentences. So I'm not sure how to get it to do a survey in if the data (if its coming in) is in binary. This sounds like a firmware problem and I've asked Waveshare support for updated firmware several times and it seems like they are in avoidance mode. Anyone know where to get a legit updated version of firmware? The serial number on mine puts it in a production line in late 2022 so I have to assume there is updated firmware.
Sorry, I haven't built a rover yet
@erok26 , do you talk about base or rover , for base you can do reset also by hardware PIN 8 on chip itself (at waveshare it is not on breakout to mainboard , there you have to bridge pin to ground with cable or so ) or by command $PQTMRESTOREPAR13 our maybe full cold start $PAIR0073E ; after command/pin every time power off and on !! ; survey in you can also send postion also direkt to base $PQTMCFGSVIN,W,2,0,0,x,y,z*CS without wait ,see post above about base antenna postion
@RaptorSDS, Thanks. I have both a base and 2 rovers running. I've been trying to get the base running properly as the Rovers are working great. If I use rtk2go.com on my rover I can get RTK_Fix repeatedly and fairly quickly. So I'm confident that the Rovers are working great. I'm currently running a 48hour stent to get exact coordinates on the rover so that I can set them in the base manually. Referring to the base, it doesn't seem to accept the $PQTMCFGSVIN command. I tried on both the Raspberry PI setup and on a windows device and I just can't get it to go into survey in mode. It also does not seem to report back nmea sentences and therefore it never shows location on the map in RTKBase which is frustrating. Therefore, I'm using a rover with the rtk2go.com configuration to pinpoint gps coordinates for now and once I have them I can set them on the base. I again think it is firmware related, but waveshare support seems slow to get back to me on the firmware.
This is the output I get when trying to run a survey-in process on the base.
Starting Survey-In for 3600 seconds...
Sending: $PQTMCFGSVIN,W,1,3600,15.0,0.0,0.0,0.023
Received: $PQTMCFGSVIN,OK70
aCN8b ѐSQPҒȾ(:2!J1p0@1[b}!jPzhxG%Ҡ/0aYtDm4ޢ p( s.ŭ-Z5[1[UEGJ!G?@uO?g9CBN"䟬#8O _ٍE:S\S_L=FM4 @ _Z5^B408Equ1a#@e8(vy@G:TAOgHO"{!p+}?9%U1iuE4ޠ Q1>G58 UU:C-4B ɀ 5j IJHʡb<xW,T?VdT lnMͬ) b{7OOl>y0e~ekaCN8# ѐSQPҒβH<͇ {0xG&0e :Dm4B p( s!U,ĭ&%W]_c*:մFsR<o_xn=!Q~!zL>Fno$ Ɵ몿Vؗ$]ٍٿE\2߀kqFM4 @ _Zy|nBشsAA"sa+OIJ9E#RFx c"P
Received: 9|(2
%87.@AgZ@XEwЕ9S55i E4@ >K57R UxC-4 ɀ 7&$'%%)#P1-㷆U (۫=nd\4iiC/+oWҽA0w;l?
=Ȗ8zAp{PMb9VaCN82 ѐSQPҒޮ>x:-J
xG%Π/ ^Dm4 p( tu!,ís&F|OASbC vHgҸU/F?IMлt
i got in this bug that no NMEA was put out , please restart by pin and cold start and inklusive power off and on , try send §Pair60,1*CS to get standart postion output , between NMEA the reciver put out RCTM correction data , maybe you stuck at RCTM only
I have it working! @RaptorSDS thank you for your input. I did try to short pin6 and pin8 and powercycle which did not help. What I found is that running the configure_gps.sh appears to not have configured the unit after reboot. So I added the below into my survey2.py which is not using pyproj and after doing so I started polling gps coordinates both to screen as well as on the RTKBase status window. This is fantastic. I think I can let it survey in for a few days to make sure it is accurate and then I can start surveying my property and maybe take it to the next level with some other cool projects. Appreciate all your work and input. I hope this helps anyone else who may be struggling trying to get these LC29 series chips working together.
Enable NMEA GGA at 1 Hz
-----------------------------
def enable_nmea_gga(ser, uart_port=1, rate=1, verbose=False): """ Configure UART1 to output only NMEA and enable GGA. """ # Set UART with NMEA output send_cmd(ser, f"$PAIR062,0,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR432,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR434,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR436,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,1,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,2,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,3,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,4,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,5,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,6,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,7,1,{uart_port}", verbose=verbose) send_cmd(ser, f"$PAIR062,8,1,{uart_port}", verbose=verbose) if verbose: print("NMEA GGA enabled on UART1 at 1 Hz")
@deece - thanks so much for your hardwork on this. Question - when I send the version command with nmea.py, the verbose output looks like this:
Sent command: $PQTMVERNO*58
Received response: $PAIR012*39
I'm not sure where it's supposed to report LC29HBS , which is what the autodetection script is looking for. Am I doing something wrong?
thanks!
I dug a little bit, and I realize that the $PAIR012*39 response comes to every single command, but is usually followed by another message. Is it possible to suppress this, does anyone know?
$PAIR012 = System wake up , please ´look for command to power suspende mode deactivate autodetect dont work with Stefal because he hasnt implement LC29H , that why decca put out his SH scripts you have to git get the deeca script and start it
To clarify, I was using the modified install.sh script from @deece pull request. It has some code intended to autodetect the module in UART that relies on the response to the version command that I posted. But because of this $PAIR012 situation, the autodetection fails. I've looked through what I can find in the documentation for the LC29HBS and don't find anything about a suspend mode. Any other terms to help my Google'ing? Thanks!