HackerGadgets uConsole RTL-SDR/LoRa/GPS/RTC/USB Hub All-In-One Extension Board setup Guide
Recommend Operating System.
It is recommended to use Rex's ported Bookworm image, which has SDR++ pre-installed in its software repository and already includes the dependencies required for Meshtasticd (LoRa) installation. The image can be downloaded from:https://forum.clockworkpi.com/t/bookworm-6-6-y-for-the-uconsole-and-devterm/13235
RTC Setup
-
Add the following code to the
/boot/firmware/config.txt
file to enable RTC functionality.# Clock dtparam=i2c_arm=on dtoverlay=i2c-rtc,pcf85063a
-
Restart uConsole and use the
sudo hwclock -r
command to check if it's working. If successful, you should see the output like this:pi@clockworkpi:~ $ sudo hwclock -r 2025-01-04 17:21:37.491776+08:00
If you don't see any output, please check if the battery is installed or if it's inserted backwards.
RTL-SDR Guide
-
Using Rex's ported Bookworm image, you can install SDR++ directly with
sudo apt sdrpp
. For other images, please refer to the SDR++ installation guide. -
Connect the antenna to the IPEX antenna connector labeled "SDR" on the expansion board.
-
After installation, enter
sdrpp
in the terminal to start SDR++.In the dropdown box indicated by arrow 1, select RTL-SDR.
In the dropdown box indicated by arrow 2, select the RTL-SDR device (the serial number may vary).
Adjust the reception frequency at the location indicated by arrow 3. It is recommended to tune to local FM radio stations.
Select the modulation type for the frequency at the location indicated by arrow 4. For FM radio stations, choose WFM.
Click the play button indicated by arrow 5. You should see a waterfall display like the one below and hear the radio broadcast sound from the speaker.
-
In addition to SDR++, the Raspberry Pi also supports other SDR software like GQRX. You can explore these options on your own.
GPS Setting
-
Add the following code to the
/boot/firmware/config.txt
file to enable the serial port functionality:For CM4:
enable_uart=1
For CM5:
dtparam=uart0
-
Connect the antenna to the IPEX antenna connector labeled "GPS" on the expansion board. The expansion board supports both active and passive GPS antennas.
-
Restart uConsole, and use the command
sudo minicom -D /dev/ttyS0 -b 9600
to view the GPS module output. If you are using the CM5, the command would besudo minicom -D /dev/ttyAMA0 -b 9600
. Under normal conditions, you should see output like the following:Welcome to minicom 2.8 OPTIONS: I18n Port /dev/ttyS0, 18:01:36 Press CTRL-A Z for help on special keys $GNGGA,100139.000,2307.73354,N,11322.65974,E,1,09,2.3,43.1,M,-6.8,M,,*6F $GNRMC,100139.000,A,2307.73354,N,11322.65974,E,0.00,0.00,040125,,,A,V*08 $GNGGA,100140.000,2307.73342,N,11322.65968,E,1,09,2.3,43.0,M,-6.8,M,,*6A $GNRMC,100140.000,A,2307.73342,N,11322.65968,E,0.00,0.00,040125,,,A,V*0C $GNGGA,100141.000,2307.73330,N,11322.65962,E,1,09,2.3,43.0,M,-6.8,M,,*64 $GNRMC,100141.000,A,2307.73330,N,11322.65962,E,0.00,0.00,040125,,,A,V*02 $GNGGA,100142.000,2307.73319,N,11322.65956,E,1,09,2.3,43.0,M,-6.8,M,,*6B $GNRMC,100142.000,A,2307.73319,N,11322.65956,E,0.00,0.00,040125,,,A,V*0D
Each line following the
N
(latitude) andE
(longitude) will show the current GPS coordinates. If the output is empty, please try again in an open outdoor area for better satellite reception.PPS (Pulses Per Second)
The GPS has a PPS output pin, which gets you to the next SI prefix in terms of accuracy (milli -> micro). And it's connected to GPIO6.
For more information about how to setup the PPS, go and check this link.
Meshtastic(LoRa)Setting
-
Add the following code to the
/boot/firmware/config.txt
file to enable SPI1 functionality:dtparam=spi=on dtoverlay=spi1-1cs
-
Connect the 433/915MHz antenna to the IPEX antenna connector labeled "LoRa" on the expansion board.
-
If you're using the Rex Bookworm image, you need to stop the
devterm-printer
service first, as the Devterm printer also uses SPI1 GPIO, which may cause conflicts. The command to stop the service is:sudo systemctl stop devterm-printer.service sudo systemctl disable devterm-printer.service
-
Use the following command to install the dependencies required for Meshtasticd:
sudo apt install libgpiod-dev libyaml-cpp-dev libbluetooth-dev libusb-1.0-0-dev libi2c-dev openssl libssl-dev libulfius-dev liborcania-dev
-
To download and install Meshtasticd, you can use the following command (You can obtain the latest version from the official MeshTastic GitHub page):
wget <https://github.com/meshtastic/firmware/releases/download/v2.5.18.89ebafc/meshtasticd_2.5.18.89ebafc_arm64.deb> sudo apt install ./meshtasticd_2.5.18.89ebafc_arm64.deb
-
To modify the LoRa module configuration in the
/etc/meshtasticd/config.yaml
file, update the configuration section to the following:Lora: Module: sx1262 # HackerGadgets RTL-SDR/LoRa extension board DIO2_AS_RF_SWITCH: true DIO3_TCXO_VOLTAGE: true IRQ: 26 Busy: 24 Reset: 25 spidev: spidev1.0
To enable the GPS functionality in Meshtasticd, first ensure you have completed the necessary GPS setup as described earlier. Then, in the configuration file
/etc/meshtasticd/config.yaml
, uncomment the GPS-related configuration section and modify it as follows:GPS: # change the path to /dev/ttyAMA0 if you are using CM5 SerialPath: /dev/ttyS0
-
To create the Meshtasticd service using this
sudo nano /etc/systemd/system/meshtasticd.service
,and fill in the follows content:[Unit] Description=Meshtastic Daemon After=network.target [Service] ExecStart=/usr/sbin/meshtasticd Restart=always User=root Group=root Type=simple [Install] WantedBy=multi-user.target
Reload systemd services to apply any changes:
sudo systemctl daemon-reload
Enable Meshtasticd to start on boot:
sudo systemctl enable meshtasticd
Start the Meshtasticd service:
sudo systemctl start meshtasticd
Check the status of the Meshtasticd service: This will show whether the service is running correctly or if there are any issues.
sudo systemctl status meshtasticd
If the service is not running as expected, view the log output for detailed error messages:
sudo journalctl -u meshtasticd -b
This command will show the logs related to meshtasticd since the last boot, helping you debug and fix any issues based on the error messages.
-
Meshtasticd has web server support starting with release 2.3.0, uncomment the web server related configuration section in the configuration file
/etc/meshtasticd/config.yaml
, and modify it as follows:Webserver: Port: 443 # Port for Webserver & Webservices RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
-
When you open the browser on uConsole and enter
https://localhost
, if you receive an SSL error, you can click on "Proceed to localhost (unsafe)" or "Continue to this website" depending on the browser.Once you bypass the SSL warning, you should be directed to the following interface (the exact details may vary depending on your setup, but it will generally look something like this):
-
To establish a new connection with Meshtasticd via the web interface, follow these steps:
a. Click on "New Connection".
b. In the IP Address field, enter
localhost
instead of using the defaultmeshstatic.local
. This is because, when the system is not connected to a network, the local hostname (meshstatic.local
) may not be resolvable.c. After entering
localhost
, click on "Connect".This should establish a connection to the Meshtasticd service running on your local device. If everything is set up correctly, you should now be able to manage and monitor your Meshtastic device via the web interface.
-
For first-time use, go to the LoRa tab under the Config menu in the left Navigation bar to set the LoRa region. Meshtastic adjusts the LoRa frequency band based on the region setting, and different regions cannot communicate with each other.
-
Then, you can click on the Messages menu in the Navigation bar to send and receive messages on the public channel or between individual nodes.
If you need to use other LoRa applications or perform custom programming, please refer to the SX1262 module information. The only thing to note is the pin connections for the SX1262 module, which are as follows:
SPI:SPI1 #Use SPI1 as the communication port with the chip select signal set to SPI1-CE0 (GPIO 18),
DIO2_AS_RF_SWITCH: true #Controlling the antenna transmit/receive switch with SX1262's DIO2
DIO3_TCXO_VOLTAGE: true #Power the TCXO with SX1262's DIO3
IRQ: 26 #GPIO 26
Busy: 24 #GPIO 24
Reset: 25 #GPIO 25