uConsole Mods: RF Toolbox Edition

So I’ve spent the last week working on my uConsole, and my hardware mods are done, just the software left so it’s time for show and tell…

I’ve modified my uConsole CM4 to internally add

  • Improved WiFi Antenna (Working much better!)
  • Realtime Clock (I2C, Working)
  • GPS Module (USB, Working)
  • RTL-SDR (USB, Working)
  • LoRa Radio Module (SPI, Not Working Yet)
  • CC1101 RF Module (SPI, Not Working Yet)

The RTC is connected to pads on the uConsole motherboard’s expansion port connector for i2c and is powered directly from one the 18650s. I often have my uConsole off for extended periods of time and don’t want to drain the button cell. It’s draw is in microamps so I’m not too worried about cell imbalance.

The GPS and LoRa module are connected via modifications to a uHub (created by @Vitaly). One of the external USB ports was removed and reassigned for my GPS. I was able solder connections to the edge header of the uHub for accessing, what I think is, the SPI bus and connecting that to the LoRa board. The LoRa and GPS boards are physically mounted to the top side of the uHub.

The RTL-SDR also gains it’s connectivity from the uHub, in this case the internal port header traces were used for connection the connection. The RTL-SDR is too large to be mounted to the uHub and I wish I had an easier way to disconnect them but so far nothing really good has inspired me. I consider these modifications permanent, so once things are done I shouldn’t need to ever remove the uHub.

The CC1101 is mounted below the battery on a small 3D printed standoff. It’s removed right now because it’s SPI and I don’t want to complicate things with a 2nd SPI device until I have 1 working.

If anyone has any experience getting SPI to work on a CM4 uConsole, please contact me. I feel like I’m bashing my head against a wall, but I’m still working on it…

Each RF Module has a corresponding antenna (GPS/WiFi) or jack (LoRa, RTL-SDR, CC1101) on a new custom “hat” that fits on the top of the uConsole.

And finally, the uHub, now with 1 less external USB port, required a new faceplate.

And the finished product (some software work not-withstanding)…

And once again, a plea for some help on SPI access. I’m running the Bookworm 6.6 uConsole image. If anyone has some experience or pointers please reach out…

Hope everyone likes show and tell day. I was really hoping to get this project done before Defcon and I think I’m almost there…

-Mike

5 Likes

I can’t help with the SPI but I did compile the drivers for the RTL-SDR and SDR++ for arm64 and are in the bookworm repo. it works better then the armhf compiled one.

2 Likes

@Rex by chance do your rtl-sdr drivers work with the v4 dongle? I know that those units require different drivers from the previous versions.

Actually you know my background so i won’t help you much. Maybye ;d
Hope you know that you can hook multiple devices to single SPI bus, right?

As for SPI in general, keep in mind that you’re rather using RPI in fancy shell than some exotic device.
There’s a SO question where dude points to two pieces of homebrew software to actually monitor GPIOs.
Also there’a link to example of driving port expander, or as i like it to say “a living tissue to vivisect” ; I’d run any software driving spi4.0 with known pauses between commands and would measure pin after pin looking for time signature. This would be MOSI.
Somewhere around should be MISO, SCK and possibly some CE lines. Again - look at the device tree, look at the overlays (this all can be checked in runtime by visiting /sys/firmware/device-tree, you can use regular shell commands (cd, find) to find these sweet sweet pins and with schematic to map them onto physical pads.

1 Like

Yes they work with RTL-SDR V4, that’s what i’m using with my uConsole.

I appreciate all your help last week!

I found a schematic somewhere (I looked through so much searching last week that I can’t cite a source showing a reference for SPI6 (Or SPI1, it’s ambiguous) on the expansion port along with CS0, 1 and 2. That same schematic correctly identified the i2c lines on the expansion connector so I based my install on that.

I found there is an overlay for spi6.1 and 6.2 in the overlays, but haven’t had much time to play with them. Now that my hardware is buttoned up for a while I hope to make some software progress.

I’m aware that multiple SPI devices can share the bus with only needing a unique CE line for each, but I still didn’t want to add extra complexity until I had 1 working. Plus is I accidentally blow something up it’s only 1 something and not 2…

I’m going to check into that python script they link, also adafruit has some libraries that might be useful troubleshooting.

I’d just love for someone with some experience to tell me I’ve got the right hardware…

Any updates on this project?

Unfortunately there are not. I’ve not been able to locate anywhere I can tap for working SPI bus. I’m quite saddened by this but it seems Clockwork Developers don’t monitor the forums, and nobody with more skill than me has been able to help.

-Mike

I’m working on something similar. RFM95w and GPS EXT. board.

In regards to the RFM95w SPI interface:
Looking at the official Raspberry Pi documentation on the Pi CM4 SODIMM module, pins 32 through 40 give access to SPI0: CE1, CE0, MISO, MOSI, SCLK, all of which are available on the mini_pciE EXT. board port.
That matches up with what is shown on the schematic PDF V3.14-V5 document on their Github.

For the GPS interface:
Mini_PCIE ports 26 and 28 (GPIO 32/GPIO 33) are TXD0 and RXD0, which could interface with a GPS module.

3.3v and 5v are also available on the EXT. board port.

I think you could probably fit LoRa, GPS and the RTC all on an EXT. board.

Page 6 has all the CM4 SODIMM pinouts that I believe should be available to us on the EXT. board port.

I tried those pins, and I had no luck accessing them with any of the provided overlay files for SPI.

If you do have any luck getting them to work please share, as I’ve pretty much given up… I’ve gotten the GPS, RTC and SDR all installed and working, but nothing seems to be able to talk to the LoRa board.