Garmin usb problem can't download tracks

Asked by SMF

When trying to use Gebabbel to download tracks from a Garmin GPSMAP96 I am receiving the error message:

"The original error message reported by gpsbabel was: Claim interfaced failed: could not claim interface 0: Operation not permitted"

My OS is Ubuntu 14.04 LTS running on a Samsung N150 plus.

The GPS shows that it is connected to the PC and recognises it has a network connection.

Any ideas about what might be the cause and what needs to done to download the track data from the GPS?
Many thanks for any thoughts or comments.

SMF

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Perhaps an access rights problem.
Are you member of the dialout group?

Revision history for this message
SMF (stephen-furner) said :
#2

I checked the groups for my account. dialout was not present so I added it. I then tried to download tracks from the Garmin GPSmap96 The same error message was returned by Gebabbel

SMF

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Have you logged out and logged in after adding the user to the group?

Revision history for this message
SMF (stephen-furner) said :
#4

Yes I shut down and restarted the PC before trying again.

I currently believe this is a permissions issue from the way ubuntu
implements root privileges. Running babel from the console window as a
sudo line command I can get it to dowload the traks from the GPS.
However, using the graphical user interfaces of gebabbel or viking I
just get error messages.

Sadly moving from text based line commands to a GUI has not in this
case improved ease of use on this installation.

Stephen

On Thu, May 12, 2016 at 12:23 PM, Manfred Hampl
<email address hidden> wrote:
> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Have you logged out and logged in after adding the user to the group?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

The document http://www.gpsbabel.org/os/Linux_Hotplug.html suggests some modifications

To allow the USB devices to be read and written by a non-privileged user, create a file named /etc/udev/rules.d/51-garmin.rules with the following contents:

SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"
or
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666", GROUP="plugdev"

(Check with the command lsusb what vendor and device IDs your Garmin device has and adapt the command if required).

What is the output of the command

lsusb
ls -l /dev/cu.* /dev/ttyUSB* /dev/ttyS*
lsmod | grep gps
dmesg | grep -i garmin

Revision history for this message
SMF (stephen-furner) said :
#6

The output from the commands was:

stephen@stephen-N150P:/$ lsusb
Bus 001 Device 004: ID 0ac8:c33f Z-Star Microelectronics Corp. Webcam
Bus 001 Device 003: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a5c:219c Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 091e:0003 Garmin International GPS (various models)
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

stephen@stephen-N150P:/$ ls -l /dev/cu.* /dev/ttyUSB* /dev/ttyS*
ls: cannot access /dev/cu.*: No such file or directory
ls: cannot access /dev/ttyUSB*: No such file or directory
crw-rw---- 1 root dialout 4, 64 May 11 13:39 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 May 11 13:39 /dev/ttyS1
crw-rw---- 1 root dialout 4, 74 May 11 13:39 /dev/ttyS10
crw-rw---- 1 root dialout 4, 75 May 11 13:39 /dev/ttyS11
crw-rw---- 1 root dialout 4, 76 May 11 13:39 /dev/ttyS12
crw-rw---- 1 root dialout 4, 77 May 11 13:39 /dev/ttyS13
crw-rw---- 1 root dialout 4, 78 May 11 13:39 /dev/ttyS14
crw-rw---- 1 root dialout 4, 79 May 11 13:39 /dev/ttyS15
crw-rw---- 1 root dialout 4, 80 May 11 13:39 /dev/ttyS16
crw-rw---- 1 root dialout 4, 81 May 11 13:39 /dev/ttyS17
crw-rw---- 1 root dialout 4, 82 May 11 13:39 /dev/ttyS18
crw-rw---- 1 root dialout 4, 83 May 11 13:39 /dev/ttyS19
crw-rw---- 1 root dialout 4, 66 May 11 13:39 /dev/ttyS2
crw-rw---- 1 root dialout 4, 84 May 11 13:39 /dev/ttyS20
crw-rw---- 1 root dialout 4, 85 May 11 13:39 /dev/ttyS21
crw-rw---- 1 root dialout 4, 86 May 11 13:39 /dev/ttyS22
crw-rw---- 1 root dialout 4, 87 May 11 13:39 /dev/ttyS23
crw-rw---- 1 root dialout 4, 88 May 11 13:39 /dev/ttyS24
crw-rw---- 1 root dialout 4, 89 May 11 13:39 /dev/ttyS25
crw-rw---- 1 root dialout 4, 90 May 11 13:39 /dev/ttyS26
crw-rw---- 1 root dialout 4, 91 May 11 13:39 /dev/ttyS27
crw-rw---- 1 root dialout 4, 92 May 11 13:39 /dev/ttyS28
crw-rw---- 1 root dialout 4, 93 May 11 13:39 /dev/ttyS29
crw-rw---- 1 root dialout 4, 67 May 11 13:39 /dev/ttyS3
crw-rw---- 1 root dialout 4, 94 May 11 13:39 /dev/ttyS30
crw-rw---- 1 root dialout 4, 95 May 11 13:39 /dev/ttyS31
crw-rw---- 1 root dialout 4, 68 May 11 13:39 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 May 11 13:39 /dev/ttyS5
crw-rw---- 1 root dialout 4, 70 May 11 13:39 /dev/ttyS6
crw-rw---- 1 root dialout 4, 71 May 11 13:39 /dev/ttyS7
crw-rw---- 1 root dialout 4, 72 May 11 13:39 /dev/ttyS8
crw-rw---- 1 root dialout 4, 73 May 11 13:39 /dev/ttyS9

stephen@stephen-N150P:/$ lsmod | grep gps
stephen@stephen-N150P:/$

stephen@stephen-N150P:/$ dmesg | grep -i garmin
stephen@stephen-N150P:/$

On Fri, May 13, 2016 at 8:08 AM, Manfred Hampl
<email address hidden> wrote:
> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> The document http://www.gpsbabel.org/os/Linux_Hotplug.html suggests some
> modifications
>
> To allow the USB devices to be read and written by a non-privileged
> user, create a file named /etc/udev/rules.d/51-garmin.rules with the
> following contents:
>
> SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"
> or
> SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666", GROUP="plugdev"
>
> (Check with the command lsusb what vendor and device IDs your Garmin
> device has and adapt the command if required).
>
> What is the output of the command
>
> lsusb
> ls -l /dev/cu.* /dev/ttyUSB* /dev/ttyS*
> lsmod | grep gps
> dmesg | grep -i garmin
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

For testing purposes you could try changing the protection on the device file for the Garmin appliance (I assume /dev/ttyS0 but I might be wrong).

sudo chmod 666 /dev/ttyS0

Revision history for this message
SMF (stephen-furner) said :
#8

There seems to be something in addition to just the file access
privileges for the data bus - in this case I'm using the USB. When I
changed them it changed the error message it did
not resolve the problem as was expected.

I used the following CHMOD command to change the access privileges
for the usb files

chmod 666 /dev/bus/usb -R

On 13 May 2016 21:13, "Manfred Hampl" <email address hidden>
wrote:

> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> For testing purposes you could try changing the protection on the device
> file for the Garmin appliance (I assume /dev/ttyS0 but I might be
> wrong).
>
> sudo chmod 666 /dev/ttyS0
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/293560/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

As already written in my previous message, it was a guess that the Garmin might use /dev/ttyS0 as device file. Apparently I was guessing wrong.

You have to find out the name of the device file(s) that your Garmin gadget is using when connected to Ubuntu and check the access rights settings for it.

Revision history for this message
SMF (stephen-furner) said :
#10

It was the access privileges. Read/Write was not sufficient. Once I
included Execute it worked

With the Garmin plugged into the PCs USB the following with give correct
access permissions to enable Gebabbel or Viking to download from the GPS.

sudo chmod 777 /dev/bus/usb -R

Stephen
On 14 May 2016 18:32, "Manfred Hampl" <email address hidden>
wrote:

> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> As already written in my previous message, it was a guess that the
> Garmin might use /dev/ttyS0 as device file. Apparently I was guessing
> wrong.
>
> You have to find out the name of the device file(s) that your Garmin
> gadget is using when connected to Ubuntu and check the access rights
> settings for it.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/293560/+confirm?answer_id=8
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

setting all usb device files to 777 is probably more than necessary and might be insecure.

Anyhow, if you are satisfied with the current solution, you might set this question thread to "solved".

Revision history for this message
SMF (stephen-furner) said :
#12

The chmod is I think an emergency patch to get working. Turn off the PC and
the usb access privileges revert.

The solution is to get a rule to run at start up to set the correct access
privileges for the device.

Stephen
On 14 May 2016 19:37, "Manfred Hampl" <email address hidden>
wrote:

> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> setting all usb device files to 777 is probably more than necessary and
> might be insecure.
>
> Anyhow, if you are satisfied with the current solution, you might set
> this question thread to "solved".
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/293560/+confirm?answer_id=10
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

/etc/udev/rules.d/51-garmin.rules with the following contents:

SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="777"

might help. (restart the udev demon or reboot after a change to activate the new rules.)

Revision history for this message
SMF (stephen-furner) said :
#14

Yes adding the rule is the way to go. I've modified it to take account
of the change to the XFS file system by Ubuntu since the original
version of the rule was written.

ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", MODE="666"

This I put in a text file called 51-garmin.rules which I then placed
into the directory /etc/udev/rules.d

This will set the correct access permissions for the garmin gps to be
accessed via its USB during the system startup.

So far I have not seen any problems with this rule in my installation
of Ubuntu 14.04 LTS when used to download from a Garmin GPSmap 96.

I think this solves my problem. Many thanks for your help and patience
in reading my postings and responding. I will change this thread to solved.

Stephen

On Sat, May 14, 2016 at 9:22 PM, Manfred Hampl
<email address hidden> wrote:
> Your question #293560 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> /etc/udev/rules.d/51-garmin.rules with the following contents:
>
> SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="777"
>
> might help. (restart the udev demon or reboot after a change to activate
> the new rules.)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/293560/+confirm?answer_id=12
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/293560
>
> You received this question notification because you asked the question.

Revision history for this message
SMF (stephen-furner) said :
#15

The solution is given in post #14

Revision history for this message
SMF (stephen-furner) said :
#16

This is not solved. It needs a fix to hotplug in the Ubuntu distribution. The current problem has been present for past 10 years and is a constant source of technical support requests to the Gpsbabel support team. Their view when I told them about the solution for my system was:

"Until they fix their packaging, it's not solved. YOUR system is solved, which is understandable, but they're continuing to ship a configuration that doesn't work. They seem think this is OK because I've answered these questions for the last ten+ years.

Please mark this "not solved" until you can download a .deb or .rpm whatever that actually includes a fix instead of you having to manually fix it.

Sorry to sound grumpy, but I've been totally unable to get them to accept responsibility for generating support traffic for me while shipping my software and cutting off my pleas for help with the project, removing my doc and update checks, etc."

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

If you are able to specify what has to be changed, please create a bug report, that the developers implement these changes.

Note, there are already udev rule files for garmin devices in the packages garmin-forerunner-tools and garmin-plugin.

Revision history for this message
SMF (stephen-furner) said :
#18

I tried to report this as a bug but there is currently one already open that reports the same problem. Bug #991652 reported by Blown2bits on 2012-04-30

Stephen

Can you help with this problem?

Provide an answer of your own, or ask SMF for more information if necessary.

To post a message you must log in.