GPS for your Linux tablet aka hacking the $5 Delorne USB GPS Dongle

Librem-11 is a very cool flagship grade all Linux tablet, the Pinetab2(while it is still available to buy) is cheap and also all Linux from boot up to UI. These devices and laptops too have big map reading landscape; perfect for your air, sea, or land navigator to use when helping you find your way and the tablets use USB power which is easy to get form a cigar lighter port in even 60 year old vehicles. But Linux tablets and most laptops don’t have GPS…
I was going to try to make a bluetooth serial line hack for my Librem to pipe the NEMA data over to the GPS-less device with GPSD and the mapping program.
Then I remembered I had picked up a Delorne LT-40 GPS dongle they were buy-it-now selling for $5US on an auction site and they had hundreds around 2021. You can put these on the dash of your plane or car and the wire is long enough to jack into your 1.0 hub–>USB-USB-C adapter–>Linux tablet; no need to throw your phone up on the dash and get cooked in the sun or run down the battery. This receiver is well packaged in a tough case, it is yellow so easy to see even at night, and has an indicator LED for red pulsing = unconfigured green pulsing = unlocked, and geen steady = locked-on location and sending NEMA stream.
The problem is the cypress driver, we will need to do some edits and rebuild it as well as finding a cheap hub to knock our communications to USB 1.0 full speed(I have not tested a 2.0 hub) as USB 3.0 freaks out the Deloren dongle and cypress driver. Once I have this working well I will probably put a USB-C tip on the computer side of the cheap hub and solder the Delorne GPS cable permanently to the other end with or without the other USB ports left connected. I will have to go through my notes and make a nice report on how to DIY this as well as the DKMS script to perma-hack the driver. So far I have working proof of concept up through a correct gpsd location lock on my Ubuntu’ish AMD64 laptop and I need to get a working system on my Pinetab2, you all will have to report back on Pureos-Librem11 once I publish the steps and you find your own cheap Delorne LT-40 GPS dongle. FWIW it seems like this dongle only receives the US Air Force Navstar GPS, no Baidu, no GLONASS, and no Galileo.

Here is the issue:
The LT-40’s Cypress USB-to-serial chip (2005-era, full-speed 12Mbps) conflicts with modern xHCI controller transaction translators.

Device enumerates cleanly, attaches to /dev/ttyUSB0
~8 seconds after open, read interrupt URBs fail with -EPROTO (-71)
Driver’s cypress_set_dead() marks port permanently dead

The try at fixing the 6.8.0-138-generic ubuntu 24.04 cypress_m8.c driver:
Struct (after line 94): Added int read_retries;
Open (after comm_is_ok = !0): Reset priv->read_retries = 0;
Error handler (line ~1040, default: case): Retry EPROTO up to 20 times before calling cypress_set_dead()

Final fix hardware route:
External full-speed(USB 1.0) USB hub between dongle and laptop — bypasses xHCI TT and the famous USB 3.0 looping issues entirely, eliminates EPROTO errors completely

I have a working proof of concept on my laptop, it is unbelievable how much trouble gpsd and geoclue can be as well as trying to get puremaps, navit, and gnome-maps to just read the damn data! I finally got nailed down 5m CEP proof on a map comparing real world location by installing marble and marble-widget-data-gpsd and setting position tracking to gpsd and maps to openstreetmaps.

I hope to give this a try on my Pinetab2 running danctnix(arch based). Since Librem-11-PureOS has the gpsd and geoclue already ready to go from the librem phones there in theory just needs to be a ttyUSB configured as a source and to include the cheap hub inline to fix the xHCI TT incompatibility looping.

3 Likes