I’ve been doing some playing about here. Of course it should be some simple debugging but like everything simple and software I started at 4pm and its 945pm now and things are not properly sorted.
I confirmed that it was still broken on the laptop (Debian 11)
I powered up the Raspberry Pi I have used before to drive my GPS. Can’t remember the static IP address it has so I can’t connect. It runs a turnkey app, connect Iridium modem power up Pi, wait 3 minutes and then you can connect to the access point with your phone and access the webserver to send spots. Find old phone with the links to the webpages, find IP address. Ah of course it was that.
Connect up laptop to Pi access point, plug in GPS, ssh to PI, read GPS help file I wrote back in 2016. Run commands and gpsbabel talks to GPS but wont write out file. Well that’s odd but I remembered that there was something else but never wrote it down. Idiot! See that gpsbabel is v 1.5.3 and we’re on gpsbabel v 1.7.0 on the laptop.
Right, I’ll get an old version and try that. No old versions packaged for Debian 11. Ponder why software development is as b-awful today as it was when I started in the late 70s. Nothing ever works or is simple.
Have a glass of Malbec, things look better.
I’ll build my own version and add some debug. Fire up Linux development machine. git clone … to get gpsbabel source. Try to figure out why website build instructions don’t work. Because “software development” that’s why the instructions are wrong. Hey who never added the extra command to his own notes?
Figure out you run the build_and_test script. Much activity till we get a build error. Install lisbusb-dev and restart. A few mins later same error. Install libusb-1.0.0-dev and restart. Different error Oh gawd have to install QT5. Big download and restart. Error about missing packages. Google for 10mins, add missing serial package and restart. It takes a few mins to build and fail. Add more QT packages, restart and build.
Stops with an error packaging. Hey who cares if I can make a package of this, did it build the damn program, gpsbabel. Yes it did. Does it run? Yes it does. Ah job done.
Nope. Connect gps to dev system (Dell microdesktop i5 Debian 11). Chech gps is found. Issue magic command “Can’t INIT /dev/ttyUSB0”. Try under sudo, still no dice. Now I remember using the Pi. You let it boot, then plug in the GPS, then remove the driver then issue the raw usb command.
gpsbabel -r -t -i garmin -f usb: -F myfile.gpx
Beep… “Transfer complete” appears on GPS and we’re done. No, no output file. Then I remember the missing step… use the alternative command line format
gpsbabel -r -t -i garmin -o gpx usb: myfile.gpx
Beep and we have a file on disk. It’s working.
Reconnect everything to Pi and get a shell on it and try second format command and it too works 100%.
So the file I built works. Copy it to the laptop. Plug in GPS, remove garmin_gps driver, issue new style command on my own built version does exactly the same as the packaged distro version.
I started to sob looking at how much time I had spent on this. But what it tells me is there is an issue with this laptop setup.
gpsbabel 1.5.3 on an old Debian 8 on a Raspberry Pi works perfectly.
gpsbabel 1.7.0 (selfbuilt) on Debian 11 on a Dell i5 works perfectly.
gpsbabel 1.7.0 (packaged version) on same machine works perfectly.
gpsbabel 1.7.0 (selfbuilt) on Debian 11 on the laptop fails
gpsbabel 1.7.0 (packaged version) on the laptop fails.
So it’s the laptop setup. I tried a few cables in case the laptop was being sniffy. It will be something in the permissions, setup of the laptop which is subtly different. But at least I know my version I built works. Shame I had to install about 200mb of QT5 rubbish to get here. Every other USB “thing” works on the laptop so I don’t know why this is such a pain.
Of course the only machine I want this to work on is the laptop.
I’ve been doing software development for a living since 1983 full time and I think I have some clue about it. It’s taken me 2 Sunday afternoons/evenings to get as far as knowing something in the laptop is broken. And I should point out I’ve been working professionally with USB drivers and USB semiconductor design since 2009.
If it’s taken me this long to get nowhere, how the hell is Joe Average User meant to do this?
I need a drink!