I am not able to start owserver without sudo on a LinkUSB with ftdi
addressing.
I have an udev rule that works for owserver and the LinkUSB, creating a
symbolic link to /dev/ttyUSB<n> and setting the group to 'owsrv' and the
mode to group can read/write /dev/ttyUSB<n> looking like:
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="FTDI",
ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A800bXHr",
GROUP="owsrv", MODE="0664", SYMLINK+="LinkUSB"
BUT since the owserver with ftdi addressing takes down ttyUSB<n>, like
syslog says:
/ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected
from ttyUSB0
ftdi_sio 3-1.1:1.0: device disconnected/
(btw: it does not have the courtesy to put it back afterwards either ;) )
So, a different interface has to be used by owserver with ftdi direct
communication and like Johan mentioned
"chown/chgrp some node in /dev/usb/something"
I check there first, but my /dev has no /usb directory, but it has a
bunch of 'usbdevX' which lsusb tells me that usbdev3.17 is my LinkUSB:
/lsusb
...
Bus 003 Device 017: ID 0403:6001 Future Technology Devices
International, Ltd FT232 USB-Serial (UART) IC
...
/
so, for test-purposes I changed the manually the group of usbdev3.17 to
'owsrv' and added 'rw' for the group
/ls -al /dev/usbdev3.17
crw-rw---- 1 root owsrv 189, 272 Aug 8 19:48 /dev/usbdev3.17
/
but still owserver gives me 'permission denied' in the debug
/DEBUG MODE
libow version:
3.2p1
DEBUG: ow_daemon.c:(170) main thread id = 3069509632
DEBUG: ow_inotify.c:(80) No configuration files to monitor
CONNECT: ow_dnssd.c:(81) Zeroconf/Bonjour is disabled since dnssd
library isn't found
CALL: ow_parsename.c:(104) path=[]
DEBUG: owlib.c:(77) Global temp limit 0C to 100C (for fake and mock
adapters)
DEBUG: ow_com.c:(47) Auto initialization of ftdi:s:0x0403:0x6001:A800bXHr
CONNECT: ow_ftdi.c:(213) [Permission denied] Failed to open FTDI device
with description 's:0x0403:0x6001:A800bXHr': -4 = usb_open() failed
DEBUG: ow_link.c:(328) Detecting ftdi LINK using 9600 bps
CONNECT: ow_ftdi.c:(213) [Permission denied] Failed to open FTDI device
with description 's:0x0403:0x6001:A800bXHr': -4 = usb_open() failed
/...
CONNECT: owlib.c:(216) Cannot open LINK bus master at
ftdi:s:0x0403:0x6001:A800bXHr
DEBUG: ow_link.c:(857) LINK_close called on already closed connection
DEFAULT: owlib.c:(52) No valid 1-wire buses found
Question is: *which device is to change permissions and group, so
owserver with a LinkUSB with ftdi addressing can be started without sudo?*
Next question ;) what would the udev rule look like?
Sidenote: the keys of udev seem to change rather often. What was SYSFS
years ago, seems now to be ATTRS.
I found, that a good way to check what udev knows about your device is:
/udevadm info -a -p $(udevadm info -q path -n ttyUSB0)/
the option -p expects a systempath, which I found rather hard to figure
out, until I found the above solution, where the path /$(udevadm info -q
path -n ttyUSB0) /rather cleverly is given by udevadm itself, which in
my case results in:
//devices/platform/sw-ehci.2/usb3/3-1/3-1.1/3-1.1:1.0/ttyUSB0/tty/ttyUSB0/
but I have no idea where in the system this path exists. Is that only in
udev-land or what?
I found the same info in
ls -al /sys/bus/usb-serial/devices/
...
lrwxrwxrwx 1 root root 0 Aug 9 19:36 ttyUSB0 ->
../../../devices/platform/sw-ehci.2/usb3/3-1/3-1.1/3-1.1:1.0/ttyUSB0
and again where does this symlink point to? I don't know where it resides...
Sidenote 2: to get the ttyUSB<n> back, once owserver took it down,
instead of getting up, walking over to the actual device un- and
re-plugging it, it is more efficient :) to unload and reload the
ftdi_sio module:
sudo /rmmod ftdi_sio
sudo modprobe ftdi_sio
/Martin/
/
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers