Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ If you use a Raspberry Pi, thanks to [jancelin](https://github.com/jancelin), yo
- [rtklibexplorer - PPP - for dual frequency receivers](https://rtklibexplorer.wordpress.com/2017/11/23/ppp-solutions-with-the-swiftnav-piksi-multi/)
- [Centipede documentation (in french)](https://docs.centipede.fr/docs/base/positionnement.html)

For Quectel LC29HBS receivers, open a shell, and run the following to survey-in the device (averaging samples across 1 day), and display the base station coordinates:
```bash
python3 tools/lc29h-bs_survey.py --mode survey --min-dur 86400 --speed 921600 /dev/ttyS0
```

+ To help you find your base ip address, you can use the simple `find_rtkase` gui tool. It is available for Gnu/Linux and Windows in [./tools/find_rtkbase/dist](./tools/find_rtkbase/dist/).

- Click on the "Find" button, wait, then click on the "Open" button. It will open the RTKBase GUI in your web browser.

<img src="./tools/find_rtkbase/find_rtkbase_screenshot.png" alt="screenshot of find_rtkbase tool" width="300" />
Expand Down Expand Up @@ -195,9 +200,9 @@ So, if you really want it, let's go for a manual installation with some explanat
```
1. Install and configure chrony and gpsd with `sudo ./install.sh --gpsd-chrony`, or:
+ Install chrony with `sudo apt install chrony` then add this parameter in the chrony conf file (/etc/chrony/chrony.conf):

```refclock SHM 0 refid GPS precision 1e-1 offset 0.2 delay 0.2```

Edit the chrony unit file. You should set `After=gpsd.service`
+ Install a gpsd release >= 3.2 or it won't work with a F9P. Its conf file should contains:
```
Expand Down
15 changes: 15 additions & 0 deletions configure_gps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
#
# configure_gps.sh: script to provide GPS modules with commands
# that are not saved in flash on the module (ie. they must be provided
# each time the module is started).


BASEDIR="$(dirname "$0")"
source <( grep -v '^#' "${BASEDIR}"/settings.conf | grep '=' ) #import settings

if [[ "${receiver}" = "Quectel LC29HBS" ]]; then
speed="${com_port_settings%%:*}"
python3 "${BASEDIR}"/tools/nmea.py --file "${BASEDIR}"/receiver_cfg/LC29HBS_Configure.txt /dev/"${com_port}" "${speed}" 3
echo Configuring Quectel LC29HBS on /dev/"${com_port}" at speed "${speed}"
fi
35 changes: 35 additions & 0 deletions receiver_cfg/LC29HBS_Configure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#Enable MSM7 messages
$PAIR432,1

#Enable Station Reference Message 1005
$PAIR434,1

#Enable Ephemeris messages
$PAIR436,1

#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
2 changes: 2 additions & 0 deletions receiver_cfg/LC29HBS_Factory_Defaults.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Restore factory defaults
$PQTMRESTOREPAR
9 changes: 9 additions & 0 deletions receiver_cfg/LC29HBS_Reboot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Power off the GNSS
$PAIR003

#SLEEP# 1000

#Power on the GNSS
$PAIR002

#SLEEP# 5000
2 changes: 2 additions & 0 deletions receiver_cfg/LC29HBS_Save.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Save parameters
$PQTMSAVEPAR
2 changes: 2 additions & 0 deletions receiver_cfg/LC29HBS_Set_Baud.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Crank the baud rate up (Could also go 3000000)
$PAIR864,0,0,921600
2 changes: 2 additions & 0 deletions receiver_cfg/LC29HBS_Version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Get the model and firmware version
$PQTMVERNO
38 changes: 34 additions & 4 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ detect_gnss() {
done
if [[ ${#detected_gnss[*]} -ne 2 ]]; then
vendor_and_product_ids=$(lsusb | grep -i "u-blox\|Septentrio" | grep -Eo "[0-9A-Za-z]+:[0-9A-Za-z]+")
if [[ -z "$vendor_and_product_ids" ]]; then
if [[ -z "$vendor_and_product_ids" ]]; then
echo 'NO USB GNSS RECEIVER DETECTED'
echo 'YOU CAN REDETECT IT FROM THE WEB UI'
#return 1
Expand All @@ -426,13 +426,23 @@ detect_gnss() {
systemctl is-active --quiet str2str_tcp.service && sudo systemctl stop str2str_tcp.service && echo 'Stopping str2str_tcp service'
# TODO remove port if not available in /dev/
for port in ttyS0 ttyUSB0 ttyUSB1 ttyUSB2 serial0 ttyS1 ttyS2 ttyS3 ttyS4 ttyS5; do
for port_speed in 115200 57600 38400 19200 9600; do
for port_speed in 3000000 921600 115200 57600 38400 19200 9600; do
echo 'DETECTION ON ' $port ' at ' $port_speed
# Detect u-blox ZED-F9P receivers
if [[ $(python3 "${rtkbase_path}"/tools/ubxtool -f /dev/$port -s $port_speed -p MON-VER -w 5 2>/dev/null) =~ 'ZED-F9P' ]]; then
detected_gnss[0]=$port
detected_gnss[1]='u-blox'
detected_gnss[2]=$port_speed
#echo 'U-blox ZED-F9P DETECTED ON '$port $port_speed
#echo 'U-blox ZED-F9P DETECTED ON ' $port ' at ' $port_speed
break
fi

# Detect Quectel LC29H-BS receivers using nmea.py
if [[ $(python3 "${rtkbase_path}"/tools/nmea.py --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Version.txt /dev/$port $port_speed 3 2>/dev/null) =~ 'LC29HBS' ]]; then
detected_gnss[0]=$port
detected_gnss[1]='LC29H-BS'
detected_gnss[2]=$port_speed
#echo 'Quectel LC29H-BS DETECTED ON ' $port ' at ' $port_speed
break
elif { model=$(python3 "${rtkbase_path}"/tools/unicore_tool.py --port /dev/$port --baudrate $port_speed --command get_model 2>/dev/null) ; [[ "${model}" == 'UM98'[0-2] ]] ;}; then
detected_gnss[0]=$port
Expand Down Expand Up @@ -594,7 +604,26 @@ configure_gnss(){
echo 'Failed to configure the Gnss receiver'
return 1
fi

elif [[ $(python3 "${rtkbase_path}"/tools/nmea.py --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Version.txt /dev/"${com_port}" ${com_port_settings%%:*} 3 2>/dev/null) =~ 'LC29HBS' ]]; then
# Factory reset and configure the module
python3 "${rtkbase_path}"/tools/nmea.py --verbose --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Factory_Defaults.txt /dev/"${com_port}" ${com_port_settings%%:*} 3 >>"${rtkbase_path}"/logs/LC29HBS_Configure.log && \
python3 "${rtkbase_path}"/tools/nmea.py --verbose --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Set_Baud.txt /dev/"${com_port}" ${com_port_settings%%:*} 3 >>"${rtkbase_path}"/logs/LC29HBS_Configure.log && \
python3 "${rtkbase_path}"/tools/nmea.py --verbose --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Save.txt /dev/"${com_port}" ${com_port_settings%%:*} 3 >>"${rtkbase_path}"/logs/LC29HBS_Configure.log && \
python3 "${rtkbase_path}"/tools/nmea.py --verbose --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Reboot.txt /dev/"${com_port}" ${com_port_settings%%:*} 3 >>"${rtkbase_path}"/logs/LC29HBS_Configure.log && \

# Speed has now been configured to 921600
speed=921600
version_str="$(python3 "${rtkbase_path}"/tools/nmea.py --file "${rtkbase_path}"/receiver_cfg/LC29HBS_Version.txt /dev/"${com_port}" ${speed} 3 2>/dev/null)"
firmware="`echo "$version_str" | cut -d , -f 2`"
if [[ -z "$version_str" ]]; then
echo "Could not get LC29HBS version string after rebooting the module, try power cycling the module."
return 1
fi
sudo -u "${RTKBASE_USER}" sed -i s/^receiver_firmware=.*/receiver_firmware=\'${firmware}\'/ "${rtkbase_path}"/settings.conf && \
sudo -u "${RTKBASE_USER}" sed -i s/^com_port_settings=.*/com_port_settings=\'921600:8:n:1\'/ "${rtkbase_path}"/settings.conf && \
sudo -u "${RTKBASE_USER}" sed -i s/^receiver=.*/receiver=\'Quectel LC29HBS\'/ "${rtkbase_path}"/settings.conf && \
sudo -u "${RTKBASE_USER}" sed -i s/^receiver_format=.*/receiver_format=\'rtcm3\'/ "${rtkbase_path}"/settings.conf
return $?
else
echo 'No Gnss receiver has been set. We can'\''t configure'
return 1
Expand Down Expand Up @@ -665,6 +694,7 @@ start_services() {
systemctl daemon-reload
systemctl enable --now rtkbase_web.service
systemctl enable --now str2str_tcp.service
systemctl enable --now configure_gps.service
systemctl restart gpsd.service
systemctl restart chrony.service
systemctl enable --now rtkbase_archive.timer
Expand Down
Loading