ENTRY

[ESC]
17d684 words1 reply

So I spent a week trying to fix the inconsistency on getting a fix on my new USB GPS module and I finally found a fix. I think the findings were quite fascinating and I'd like to share my findings.

The Project.

So I created a Raspyjack. A quick tl;dr on what this awesome project is: "Small offensive network toolkit for Raspberry Pi (Zero)". It consists of a stacked battery + Waveshare Ethernet Adapter + 1.44 LCD screen. In order to take advantage of this project's features, you usually want an additional wifi dongle and sometimes a GPS module (for wardriving).

The GPS

So after putting together my Raspyjack, I got my wifi and this GPS dongle. I found the same module on Aliexpress which revealed that this is a u-blox Neo-M8N). Multiple users in the Raspyjack discord reported that this dongle was able to quickly connect to a satellite within 20 seconds out of coldboot, some of them even without a direct line-of-sight from the sky.

Great! So the dongle arrives through amazon and I plug it in...and I get subpar results. The device would never connect from inside my house. Not even next to the window facing the sky. I took the GPS on car rides facing the windshield in hopes of getting a fix. If I was lucky, I would get a fix after 15-30 minutes. But other times, even an hour drive wouldn't get me a fix. Even after a 15 mile bikeride with the Rspyjack and GPS in a cloth mesh pack wouldn't get a fix. I was left dissappointed and started looking into another well-regarded GPS module (which I will definitely use for my future projects) called the ATGM336h which works amazingly well on my Cardputer ADV's GPS HAT. By the end of the week, I was ready to abandon this module and move on...

The Fix

I did one last AI assisted search. One sentence (without sources) suggested that maybe it was radiated emissions coming off of the USB port of the Pi. So as a last ditch effort, I got myself a USB Extension cable and plugged the GPS module in.

And it worked as advertised! I got a fix within 20 seconds from my car. Waving the extended GPS near my window got me a fix within 5 seconds! I was shocked that I had wasted so much time and effort and the fix ended up being a simple USB cable!

Root Cause

But why? I didn't want to just accept the cable as a fix. I wanted to know why so I could avoid this in the future. I also wanted to understand why so I can help other users in the future running into the problem as no one else in the online community (let alone AI results) were able to properly diagnose my issue.

So I decided to search for scholarly articles on "USB, interference, and GPS"

I immediately found several articles. These stood to me:

Basically, USB (particularly USB 3.0) creates enough radiated emissions that it interferes with GPS. Do note that the Waveshare HAT I used has 2.0 ports. But with all that is going on on the Pi0w, I imagine there was a lot of interference coming out of my device.

If I had the proper tools, I'd love to measure and figure out how long I need the GPS module away from my device for it to work optimally. I imagine a bit of shielding and/or stick antennae (or IPX cable extension) could have done the job. But in my case, the built in module's ceramic antenna and USB extender was enough. Morale of the story, use proper isolation techniques to separate the GPS signal from the radiated emissions on your hardware!

1 reply

Log in to read the replies and join the conversation