rtkbase
rtkbase copied to clipboard
add a button to detect and configure usb gnss receiver
Some people upgrade F9P and are forced to switch to ssh to put the parameters back into the receiver.
Solution: add a web button with a function
sudo /home/basegnss/rtkbase/tools/install.sh --detect-usb-gnss --configure-gnss
Yes, I can do that. But users could save the F9P configuration before flashing it with a new firmware.
How can I use an MT8 receiver and what is the basegnss login and password?
This feature is a work in progress in the branch https://github.com/Stefal/rtkbase/tree/detect_button Sadly it doesn't work when server.py is launched with a systemd service because https://github.com/Stefal/rtkbase/blob/2e939c89f12d5bac538716947c29b4d74bcbb0a7/tools/install.sh#L397 fails when it is called from https://github.com/Stefal/rtkbase/blob/2e939c89f12d5bac538716947c29b4d74bcbb0a7/web_app/server.py#L529
let's use this script test_user.sh
#!/bin/bash
echo 'logname : ' $(logname)
echo 'whoami : ' $(whoami)
echo '$LOGNAME : ' $LOGNAME
./test_user.sh
logname : pi
whoami : pi
$LOGNAME : pi
sudo test_user.sh
logname : pi
whoami : root
$LOGNAME : root
from a systemd service, with User=root
Mar 13 13:25:04 raspberrypi test_user.sh[10085]: logname: no login name
Mar 13 13:25:04 raspberrypi test_user.sh[10084]: logname:
Mar 13 13:25:04 raspberrypi test_user.sh[10084]: whoami: root
Mar 13 13:25:04 raspberrypi test_user.sh[10084]: $LOGNAME: root
I see 3 ways to fix this:
- in
install.sh
if thelogname
test fail, test withwhoami
too - Add a
--user
argument toinstall.sh
-
install.sh
could get the user value from thesettings.conf