|
From: | Fulup Le Foll |
Subject: | Re: [gpsd-dev] Another release seems called for |
Date: | Wed, 24 Jul 2013 21:37:12 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Gary
Naming of device is not a question of timeout but a question of availability of the path. Typically this is what's happen and why behaviour may seems to depend on timeout.
The only system I found to bypass this issue is to provide fix
alias name with a udev script. Creating a device with a name
base on its USB slot with "SYMLINK="gps-$env{ID_PATH}" work
pretty well on any distribution. This method works even if you
have multiple USB/serial adaptors with the same vendor/product
id. One possible alternative could be for gpsd to check if
/dev/ttyUSB0 exist before trying to open it. I never check this,
but file existence API may only impact directory and thus not
lock the path. Fulup Le 24/07/2013 19:32, Gary E. Miller a écrit : Yo Fulup! On Wed, 24 Jul 2013 10:22:47 +0200 Fulup Le Foll <address@hidden> wrote:If you plug/unplug an active USB device on Linux. Usually the device change name and move for example from ttyUSB0 to ttyUSB1.Depends on how long. For me if I wait more than about 30 seconds I'll get ttyUSB0 again. I depend on that behavior.I commented this Linux feature long time ago on http://lists.berlios.de/pipermail/gpsd-users/2009-June/003785.html Might also be useful to highlight that by default last versions of Ubuntu does not grant "dialout" group to basic users, when acces to /dev/tty* require access to "dialout" group.Ouch. So ubuntu is 'dialout' and not the conventional 'uucp' group? I'd like to add a configure option to allow forcing the group gpsd uses after dropping priviledges, then I could completely sidestep udev which is non-portable. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701 address@hidden Tel:+1(541)382-8588Fulup Le 23/07/2013 19:42, Jeroen Massar a écrit :On 2013-07-23 19:37 , Gary E. Miller wrote:Yo Eric! On Tue, 23 Jul 2013 08:24:01 -0400 (EDT) address@hidden (Eric S. Raymond) wrote:I'd like to ship a bugfix release next week.Maybe another bug to look at before a release: If I unplug a USB GPS, then plug it back in, then gpsd can no longer access the device: gpsd:INFO: reconnection attempt on device 0 gpsd:INFO: opening GPS data source type 3 at '/dev/ttyUSB0' gpsd:ERROR: device open failed: Permission denied - retrying read-only gpsd:ERROR: read-only device open failed: Permission denied gpsd:ERROR: /dev/ttyUSB0: device activation failed. I assume because priviledges dropped.Depending on platform, if on Linux you can teach udev to set the permissions so that gpsd can access it. Greets, Jeroen -- Tel: 0972.235.723 Mail: address@hidden http://www.sinagot.net |
[Prev in Thread] | Current Thread | [Next in Thread] |