RTKBase: a GUI for your own Gnss Base Station

It would have to be in the requirements.txt before running install.sh. But after the fact, you can add it to requirements.txt and then run:

pip install -r requirements.txt
2 Likes

I finally got rtkbase up and running on my OrangePi5 (way overkill but that’s what I have). I also will be putting it on an old Pine64 board as a backup. At first I couldn’t get any satellites to show up at all, but that turned out to be a bad plug on my test antenna, a UBlox Ann-MB[1]. I swapped antennas and everything came alive.

I’m very impressed! I love that RTKLIB does everything so I can plug any ZED-F9P into my Pi and it works without doing any configuration other than maybe a clean reset of the F9P. Makes it much more of an appliance. If the receiver dies, just swap it out. My previous setup was rather fragile, and RTKBase makes my base station more reliable and replaceable. And it supports my triple mode of operation out of the box. NTRIP serve to rtk2go, local raw tcp/ip socket over VPN, and serial out to my radio transmitter! Overall I think this is a better way to go than ESPRTK because of the flexibility.

Again, many thanks, @Stefal.

[1] Problem was the center pin in the antenna SMA plug was shorting to the outer shield. I’ve had this happen before on a cheap extension cable and it damaged my ArduSimple board. That was repaired and the repair actually made the board tolerate this kind of short without frying, although it did cause the power regulator to heat up.

I do have a question for @Stefal, though. Currently the daemonized str2str processes write to stdout every few seconds, which fills the syslog. Is there a way to quiet them? They are supposed to be logging to log files if there are problems, so I don’t see the need to output to the log file. I modified run_cast.sh to redirect echo str2str instance stderr to /dev/null and that made them quiet.

Also, and this is just a matter of personal preference, I find it preferable to let systemd do the daemonization, so in my service files I usually set Type=simple rather than Type=forking, and then not background my process. Systemd then handles it and restarts when necessary. systemd is pretty smart, so it really doesn’t matter too much.

One more thing… I modified rtkbase to allow me to use long serial port id names instead of just the short ones like ttyAC0. Id names are more stable than the short names. Depending on how things are plugged in, sometimes you might get the F9P at ttyACM0 and sometimes ttyACM1, especially if another device is also a ttyACM device. By using the long name that’s normally in /dev/serial/by_id I can avoid that problem. For example, here are the names of my f9p and radio module:

/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0
/dev/serial/by-id/usb-u-blox_AG_-_www.u-blox.com_u-blox_GNSS_receiver-if00

I modified server.py to detect the GNSS with the long name, and then I modified run_cast.sh to resolve the long names to the correct path.

If you’re interested, see:

If in the future rtkbase will automatically present a list of serial ports when configuring the rtcm_serial service, consider using the long names.

Now I’m confused. I installed the dev version of rtkbase.
running flask --version returns:
Python 3.10.12
Flask 2.2.2
Werkzeug 2.2.2`

and I get the same import urls error I always did

Strange stuff. I’m not sure what’s going on there. The error you’re getting is exactly the same as you put in the github issue? Werkzeug 2.2.2 shows up in /usr/local/lib/python3.10/dist-packages/?

Did you reboot or restart the web app service since you updated? Python caches things in memory otherwise.

ive tired to install RTKBase into a Debian11-Standard LXC. After some problems i get the USB through and script runs nearly to the end. But i dont come around this Error, when /rtkbase/run_cast.sh want to make a directory.

STARTING SERVICES
################################
Job for gpsd.service failed because the control process exited with error code.
See "systemctl status gpsd.service" and "journalctl -xe" for details.
Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xe" for details.

Must something here at Line 47 and 86 with the mkdir but i dont get it.

Any suggestions for that?

Greets and good night!


Yes

Yes I think

I had the same thing happen here on Ubuntu 22.04 on my Orange Pi 5. The problem is the settings.conf in the rtkbase folder is not being created properly. Copy settings.conf.default to settings.conf. After restarting the device, the web interface should run now, and you can use that to re-detect and configure the GNSS. Then you can configure the rtcm services and start them.

I’m not sure why I had this problem, nor why you are having the same problem.

1 Like

@Davidwedel, what happens when you run the server manually?

sudo python /path/to/rtkbase/web_app/server.py

That should give you a full traceback which will help.

/usr/local/lib/python3.10/dist-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn(“Setuptools is replacing distutils.”)
Traceback (most recent call last):
File “/home/geekywedel/rtkbase/web_app/server.py”, line 59, in
from flask_bootstrap import Bootstrap4
File “/usr/local/lib/python3.10/dist-packages/flask_bootstrap/init.py”, line 3, in
from flask import current_app, Markup, Blueprint, url_for
File “/usr/lib/python3/dist-packages/flask/init.py”, line 7, in
from .app import Flask as Flask
File “/usr/lib/python3/dist-packages/flask/app.py”, line 28, in
from . import cli
File “/usr/lib/python3/dist-packages/flask/cli.py”, line 18, in
from .helpers import get_debug_flag
File “/usr/lib/python3/dist-packages/flask/helpers.py”, line 16, in
from werkzeug.urls import url_quote
ImportError: cannot import name ‘url_quote’ from ‘werkzeug.urls’ (/usr/local/lib/python3.10/dist-packages/werkzeug/urls.py)
Exact warning.

@torriem Werkzeug and Werkzeug 3 do but not 2.2.2

Hmm somehow pip didn’t get the version out of requirements.txt for some reason. You can try manually installing it:

sudo pip install werkzeug==2.2.2

That fixed it. Thanks! But now I’m confused why flask showed I had Werkzeug 2.2.2 BEFORE I ran the pip install command. I guess I had several versions and running the command changed them all to the right version or something.

I’m confused on that point too!

I assembled the radiobase and it works great. but how to properly turn off orangepi zero? I didn’t want to carry a router with me to turn off the base. I’m looking for a solution to turn it off with a button. there are options?

Hi can somebody please tell me what port do i need to forward on my router so i can access the rtkbase web ui.

From local network or from the internet? If locally, you don’t need to do anything. If from the internet, port 80. Just set a good long password. And if you’re going to access if from the internet, you’ll need a public static ip or domain name. IMO it isn’t worth that.

1 Like

I imagine something like this would work on the orange pi:

Unfortunately the instructables article does not talk about how to make the python script always run but if you get it the button working we can talk here about setting up a systemd service.

Thanks, i already have a static ip.