GeeekPi RPi 4G Hat for RAKwireless RAK5146 USB

In 2021 I started playing around with the SX1303 based RAKwirless RAK5146 USB LoRaWAN concentrator in mini-PCIe form factor ( 1, 2 ). Back at the time I used the RAK2287 Pi Hat which - even though the website states otherwise ("Note: RAK2287/RAK5146 Pi HAT is compatible only with the SPI version of the RAK2287 and RAK5146 LPWAN concentrators.") is actually compatible with the USB version of RAK5146. In the second post I even want so far to hack the RAK2287 and bridge the PPS (Pulse Per Second) output of the included GPS onto the RPi GPIOs so that I could turn the RPi into a precise GPS NTP server - and I even added an I2C/"poor-mans-QWIIC connector" to it.

While all these hacks were successful and the balenaOS backed RPi 3 LoRaWAN concentrator was still working (with regular updates) in 2024, I finally wanted to streamline my overall IT setup: I had an WD My Cloud Mirror Gen2 NAS I updated to Debian 11 in 2022, the LoRaWAN concentrator/NTP server/Room sensor RPi 3 and an very old Medion Laptop was I was abusing as the main "server" - it was time to unify those systems and move on.

Luckily, I had gotten a TuringPi 2 and Turing RK1 SBCs which were a powerful combination: My plan was to use one RK1 in Node 3 position on the TuringPi 2 which did give the SBC one NVMe slot, a PCIe attached Dual Port SATA bridge and the additional USB 2.0 port which could be switched to any Node on the board. With the RK1 as a way more powerful CPU (in contrast to the old AMD 1 GHz Dual Core on the Medion Laptop...) and the Dual Port SATA bridge I already got Server and NAS functionality solved. But what about LoRaWAN and the other functionalities?

Well, as I bought the RAK5146 USB (with LBT and GPS), I could just use the RAK2287 to plug a cable from the Micro USB cable into the additional USB 2.0 port of the TuringPi 2 - and this was done. However, what about the GPS and PPS input to allow for an NTP server? And did I really wanted to install the RAK2287 into an ugly box - or leave it open for further projects?

Thats when I realized I still had the GeeekPi RPi 4G Hat at hand, an RPi "Hat" I bought back then when I thought that might be the cheaper alternative, but went out of my way to also buy the RAK2287 and never really tested it.

The GeeekPi is just an ordinary hat, well - lets say it does not even has any connection to the RPi, just an USB C port - not even some GPIO connection - its basically just an "USB LTE Modem in mini-PCIe to USB breakout" in the shape of an RPi Hat.

Looking at the SIM Card Slot I had some mixed feelings and hoped that it would not interfere with the RAK5146 - so I rechecked the pinout:

Luckily it turned out that the RAK engineers thought about this and marked the SIM Card Slot connectors as NC/not connect. With this, this card could be inserted into any Laptops WWAN slot or an SBC like the balenaFin. Neat!

After the pinout situation was clear, there was just one thing left: Soldering the needed connections directly to the mini-PCIe connector:

The needed pins were GND, PPS, PI_UART_TX and PI_UART_RX which I broke out onto a 2.54mm female header and fixed them into place with a bit of hotglue as strain relief:

Then I just needed to add an FTDI USB UART to the mix and connect these pins:

  • GND to GND
  • PPS to DCD
  • PI_UART_TX to TX
  • PI_UART_RX to RX

Afterwards I just needed to install the RAK5146 and the LoRaWAN and GPS antennas before powering up the unit via the USB C port of the Hat and connect the FTDI UART USB as well.

And the end I also broke out the RESET_GPS and STANDBY_GPS pins just for good measure, but as they are active low I did not need to pull them to any potential. But then again, it could come in handy in the future.

With those changes I can now use the RAK5146 directly over an USB connection and still get the GPS data and PPS signal for use in gpsd. I ended up printing an enclosure for the overall construction, added an 4 port USB hub and connected one of my RAK11300 breakouts as a Meshtastic node and another Waveshare RP2040 Zero as an environmental sensor which terminates a BME280 and an Amphenol Telair T6713 CO2 sensor to measure the room climate. I also rewired the USB 2.0 Hub to an USB C connector and now everything has its place - and I still have my empty RAK2287 board lying around in case I where to get another RAK5146 for other jobs ;).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.