LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2022, 11:58 AM   #1
Pasquale Ceres
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Rep: Reputation: 11
Smile Garmin Forerunner 205 working on Slackware 15 with gpsbabel 1.7.0


Hello to all,
I'm new to the forum: I apologize if I published my post in the wrong place.
I'm having been using Slackware for some time now on my private laptop. I've just upgraded to Slackware 15 64 bit, and I must say that is a big improvement with respect to 14.2: I find it more responsive and quick.
As I like running, I want to share the success in downloading GPX tracks from my (old) Garmin Forerunner 205 using GpsBabel. This activity was one of the very few that forced me to switch to Windows (on my wife's laptop), so that I could use Garmin Express to download the tracks and view them on the Garmin Connect website. In addition to having to use another pc, the connection with the Garmin was always tricky: I often had to spend a few minutes rechecking the electric contacts, resetting the Garmin, etc, in the hope that the pc (running Windows 10) could "see" the Garmin and synchronize.
I tried to look for other people in my situation, but I could not find many posts on this, so I list below what I did to successfully connect to my Garmin Forerunner 205 and upload the tracks on the website Garmin Connect, just as I did with the Garmin Express workflow. But all this from Slackware 15.

1) install the gpsbabel (1.7.0) packet for 14.2 (the new slackbuilds for 15.0 are not yet available). It seems that the 2 dependencies indicated (qt5 and libminizip) are already satisfied on Slackware 15.0, as the packed build compiled without problems

2) when I attached the Garmin to my laptop, I could check that the system autoloaded the kernel module garmin_gps. This means that the /dev/ttyUSB0 device is created. I started working as root to avoid permission problems for debugging, but even if I found several workarounds using the stty command, I was not able to have it working correctly. In the GpsBabel website I found this page ( https://www.gpsbabel.org/os/Linux_Hotplug.html ) pointing out that GpsBabel needs not the kernel module, as it can manage the USB connection by itself. In few words, if you use garmin_gps module, you'll have to use /dev/ttyUSB0 as input device, if you let gpsbabel do the work, just use usb: . For the latter option, which works for me and is suggested by GpsBabel developers, it is mandatory to remove the garmin_gps module, otherwise the resource will be busy. To do so, use the command
Code:
rmmod garmin_gps
You should see /dev/ttyUSB0 disappear, and the following command should work correctly as root (showing current GPS position):
Code:
gpsbabel -i garmin -f usb:
3) to prevent the garmin_gps module from being loaded automatically in the future, I created the file /etc/modprobe.d/blacklist.conf with the following text:
Code:
blacklist garmin_gps
4) to run gpsbabel as a normal user, I followed the indications here: https://docs.slackware.com/howtos:hardware:gps_devices
- I added the user to the plugdev group with the command
Code:
usermod -a -G plugdev <user>
- I created a new udev rule to allow user access to the members of group plugdev, by creating file /etc/udev/rules.d/51-garmin.rules with following content
Code:
ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", MODE="666", GROUP="plugdev"
5) at this stage, gpsbabel should be correctly communicating with the Garmin, and be able to download all the tracks stored in the device:
Code:
gpsbabel -t -i garmin -f usb: -o gpx,gpxver=1.1 -F track.gpx
-t limits operations to tracks (as apposed to routes and waypoints)
-i input stream is of type garmin (serial/USB protocol, see https://www.gpsbabel.org/htmldoc-dev...mt_garmin.html)
- f usb: input file is usb: (with garmin_gps module, you had to put -f /dev/ttyUSB0, but it never worked fully for me). In the manual, it says you could explicit the USB port such as -f usb:0 (or indicate -f usb:-1 to have the program list the available ports), but it works perfectly even without indicating the port, as I think it autodetects it.
- o gpx,gpxver=1.1 the output format is gpx, format 1.1 (the real output tipe is gpx, whereas gpxver=1.1 is an option that indicates the version to be used)
- F track.gpx output file that will contain ALL the tracks that are stored in the device, unless you explicitly delete them. Garmin Express automatically selects the tracks that have not been downloaded, whereas the command above downloads all the tracks, and you have to extract with another command the desired ones.

6) to extract the desired one, I exploited gpsbabel capability to manage gpx (and many other formats), after googling to learn some Bash scripting. For each track I extract the name and the date of the first track point, then I let gpsbabel filter the desired track and save it in another file track_XX.gpx:
Code:
# show list of available tracks (with name and timestamp of first point)
sed -n '/<name>/{:start /<time>/!{N;b start};/<time>/p}' track.gpx | grep "name\|time" | paste -sd ' \n'
printf "\nWhich track do you want to extract? (enter the name)"
read VARNAME

# extrack track matching the name in VARNAME
echo "Extracting track track_XX.gpx"
gpsbabel -i gpx -t -f track.gpx -x track,name=${VARNAME} -o gpx,gpxver=1.1 -F track_${VARNAME}.gpx
In the above call, I use as input the track.gpx file that was downloaded in advance from the Garmin, and I apply a filter (-x track,name=<track name>). It is MANDATORY to use the gpx version 1.1 here, as the output file track_XX.gpx must be in the GPX format 1.1. I first used the simple gpx output format (without expliciting the version 1.1), and the Garmin Connect web page was unable to upload the track correctly

7) now you just have to upload the new file track_XX.gpx file to the Garmin Connect page. You can reach by clicking on the upper right part of the page, on the icon of the cloud, and click on "import data". You're done, you'll have the track exactly as you would have had by synchronize your Garmin Forerunner 205 using Garmin Express on Windows.


I was astonished at seeing how stable the connection and communication between my laptop and the Garmin is! After using the usb: input device, I never ever lost one single download, whereas using Garmin Express I often lost 5 or 10 minutes desperately trying to have the communication start.

I hope that my tutorial can be useful for other people, and I would be glad of course if other users will give suggestions, improve the scripts, etc.
 
Old 03-06-2022, 12:22 PM   #2
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware, Debian
Posts: 7,351

Rep: Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750
Welcome to the official Slackware forum here on LQ! Excellent first post!
 
1 members found this post helpful.
Old 03-06-2022, 01:47 PM   #3
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,686

Rep: Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801Reputation: 1801
this should be written in SlackDocs https://docs.slackware.com/
 
1 members found this post helpful.
Old 03-07-2022, 10:51 AM   #4
the_penguinator
Member
 
Registered: Jan 2009
Location: Canada
Distribution: slackware, OpenBSD, OSX
Posts: 233

Rep: Reputation: 25
Very nice work. And it looks like I may be able to get my TomTom training watch working with this as well. Thx for some inspiration on a rainy day!
 
Old 03-07-2022, 11:55 AM   #5
giomat
Member
 
Registered: Jul 2017
Posts: 341

Rep: Reputation: 241Reputation: 241Reputation: 241
I'm not a garmin user and i'm sorry if this is not related, but i found this cool project sometime ago that deals with garmin tracks exports and works on linux
https://www.zombietrackergps.net/ztgps/index.html
perhaps it can be of interest for you
 
Old 03-12-2022, 04:27 AM   #6
Pasquale Ceres
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by giomat View Post
I'm not a garmin user and i'm sorry if this is not related, but i found this cool project sometime ago that deals with garmin tracks exports and works on linux
https://www.zombietrackergps.net/ztgps/index.html
perhaps it can be of interest for you
Thank you for your suggestion! I was curious to test this sw as well, so I installed it from source ZombieTrackerGPS (ver 1.10).

I can say that graphically it is very pleasant (see the attached image). I explored a little the sw by importing the tracks I had exported using gpsbabel.
The big problem is that it wasn't able to detect my Garmin Forerunner 205 device to extract the tracks, so I would say that up to now the best workflow is:
  1. export tracks from the device: gpsbabel
  2. analize the tracks (show on map, compare, etc.): ZombieTrackerGPS or upload to Garmin Connect website

I'm not sure, to say the truth, if I missed some configuration, so I opened an issue on the project website to ask for clarification, or propose the integration.
Attached Thumbnails
Click image for larger version

Name:	ZombieTrackerGPS.jpg
Views:	37
Size:	251.6 KB
ID:	38577  
 
Old 03-17-2022, 12:13 PM   #7
Quercus ruber
Member
 
Registered: Mar 2004
Location: Bocholt, Germany
Distribution: Slackware
Posts: 135

Rep: Reputation: 24
I am a Polar user. I would really appreciate a way to get my Polar m430 and Verity Sense working with Slackware. I'm now feeling motivated to investigate further :-)
 
Old 03-27-2022, 08:43 AM   #8
Pasquale Ceres
LQ Newbie
 
Registered: Feb 2022
Posts: 4

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by Quercus ruber View Post
I am a Polar user. I would really appreciate a way to get my Polar m430 and Verity Sense working with Slackware. I'm now feeling motivated to investigate further :-)
I gave a quick look at the gpsbabel documentation, but could find no mention to the models you indicated. Maybe they are supported anyway, but you have to give a try.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GPSBabel not recognizing Garmin Nuvi-260w panorain Linux - Software 4 10-02-2019 12:54 PM
Linux application to access Garmin Forerunner 305 data jonbvgood Linux - Software 1 09-23-2007 03:54 PM
So I just installed gpsbabel ... WHERE IS IT? lumix Linux - Newbie 9 07-18-2007 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration