Hi,
Thank you for your response. I bought the material I mentioned on the page given in my previous message (by the way the page is not available any more because I use my github website for something else, here is a new link : https://geolocationrosar.netlify.app/) : 2 LC29HEA modules, 2 antennas for LC29HEA, 2 esp32 c3 super mini and 2 LLCC68 modules to make connection between base and rover. For the LLCC68 PCBs, the one I bought have to small pins so I have to find another PCB to solder it on which I don’t want to do so I might use the SX1278 LoRa modules I have if I can make it work with them.
I received all that about two weeks ago and since then I could make the LC29HEA work fine in GPS mode with QGNSS or the esp32 and print the NMEA messages in the Serial monitor. With QGNSS, using the centipede network, I could’nt have RTK fixed, only RTK float but I think it is because the nearest centipede station is 20km away from where I live. But that is not what I want to do anyway. I have a code to give commande to my lc29hea :
import serial
from math import sin, cos, sqrt, radians
def calculate_checksum(data: str) -> str:
"""
Calculate NMEA checksum for given data (excluding $ and *).
"""
checksum = 0
for char in data:
checksum ^= ord(char)
return f"{checksum:02X}"
def send_command():
"""
Sends commands to the GPS module and displays responses.
"""
baud_rate = 460800
try:
ser = serial.Serial("COM4", baud_rate, timeout=1)
except Exception as e:
print(f"Error opening serial port: {e}")
return
print("Type GPS commands to send. Press Ctrl+C to exit.")
while True:
try:
user_input = input("> ").strip()
if not user_input.startswith("$"):
print("Error: Command must start with '$'")
continue
# Prepare and send the command
command = user_input[1:] # Remove leading $
checksum = calculate_checksum(command)
full_command = f"${command}*{checksum}\r\n"
print(f"Debug: Command to send: {full_command.strip()}") # Debug log
ser.write(full_command.encode('utf-8'))
print(f"Sent: {full_command.strip()}")
# Read and display the response from the GPS
while True:
response = ser.readline().decode('utf-8', errors='ignore').strip()
if response:
# Print only relevant responses
if response.startswith("$P"):
print(f"Received: {response}")
break
else:
print("No response received. Retrying...")
except KeyboardInterrupt:
print("\nExiting...")
break
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
send_command()
I tried to set the rover in base mode with survey mode first with the following command : $PQTMRESTOREPAR (reset); $PQTMCFGRCVRMODE,W,2 (base mode); $PQTMCFGRCVRMODE, R (verifying base mode); $PQTMCFGSVIN,W,1,300,20,0,0,0 (start survey-in mode with 300 second set up and 20 meter precision to avoid failing) but it did not work after waiting more than the 5 minutes I had set for the set up process :
Type GPS commands to send. Press Ctrl+C to exit.
> $PQTMRESTOREPAR
Sent: $PQTMRESTOREPAR*13
Received: $PQTMRESTOREPAR,OK*3B
> $PQTMCFGGRVMODE,W,2
Sent: $PQTMCFGGRVMODE,W,2*29
Received: $PQTMCFGGRVMODE,OK*64
> $PQTMCFGGRVMODE,R
Sent: $PQTMCFGGRVMODE,R*32
Received: $PQTMCFGGRVMODE,2*7A
> $PQTMCFGSVIN,W,1,300,20,0,0,0
Sent: $PQTMCFGSVIN,W,1,300,20,0,0,0*13
Received: $PQTMCFGSVIN,OK*70
> $PQTMCFGSVIN,R
Sent: $PQTMCFGSVIN,R*26
Received: $PQTMCFGSVIN,1,300,20,0.0000,0.0000,0.0000*4B
> $PQTMCFGSVIN,R
Sent: $PQTMCFGSVIN,R*26
Received: $PQTMCFGSVIN,OK,1,300,20,0.0000,0.0000,0.0000*70
I tried with a one hour set up but it didn’t work either. When I tried to set up the fixed mode it seemed to work well thow.
Type GPS commands to send. Press Ctrl+C to exit.
> $PQTMRESTOREPAR
Sent: $PQTMRESTOREPAR*13
Received: $PQTMRESTOREPAR,OK*3B
> $PQTMCFGGRVMODE,W,2
Sent: $PQTMCFGGRVMODE,W,2*29
Received: $PQTMCFGGRVMODE,OK*64
> $PQTMCFGGRVMODE,R
Sent: $PQTMCFGGRVMODE,R*32
Received: $PQTMCFGGRVMODE,OK,2*7A
> $PQTMCFGSVIN,W,2,0,0,43.30142453,5.3817863,40
Sent: $PQTMCFGSVIN,W,2,0,0,43.30142453,5.3817863,40*11
Received: $PQTMCFGSVIN,OK*70
> $PQTMCFGSVIN,R
Sent: $PQTMCFGSVIN,R*26
Received: $PQTMCFGSVIN,OK,2,0,0,0,43.3014,5.3817,40.0000*4F
Now that I have my LC29HEA in base mode I need to have the rtk correction so I can send them to the seconde LC29HEA with LoRa. I have read that I need to ouput the RTCM messages which contain the RTK correction. At first I thought the LC29HEA could not read them because GithubCopilot told me that LC29HEA can only input RTCM messages and I should get a LC29HDA to output RTCM messages. But the protocole specification doesn’t mention that LC29HEA doesn’t support the $PAIR432 command unlike for other command. I also found this discussion :
It seem to work for them. I followed the instruction but it did not work for me :
Type GPS commands to send. Press Ctrl+C to exit.
> $PQTMRESTOREPAR
Sent: $PQTMRESTOREPAR*13
Received: $PQTMRESTOREPAR,OK*3B
> $PQTMCFGGRVMODE,W,2
Sent: $PQTMCFGGRVMODE,W,2*29
Received: $PQTMCFGGRVMODE,OK*64
> $PQTMSAVEPAR
Sent: $PQTMSAVEPAR*5A
Received: $PQTMSAVEPAR,OK*72
> $PAIR432,1
Sent: $PAIR432,1*22
Received: $PAIR010,0,0,2366,591201*34
> $PAIR432,R
Sent: $PAIR432,R*41
Received: $PAIR010,0,0,2366,591261*32
According to the protocole specification I should get $PAIR001,432,03E. But in these example I get $PAIR010,0,02366,59120134. After retrying later I simply get nothing after more than 20min.
So do you know how I could finally have those RTCM messages ? Should I change the firmware or something ? Should I take a LC29HDA (but it seem to work with a LC29HEA for other users above)?
Also do you know why the survey-in mode doesn’t work ?
After being able to read the RTCM messages, I have read that I need to give them to the rover lc29hea with serial port (RxD I suppose) and the firmware should give me rtk fixed automaticaly on TxD.