libftdi Archives

Subject: Re: block usb device from module assignment

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 11 May 2014 11:06:17 +0800
On Sun, May 11, 2014 at 6:36 AM, gobo <gobo770@xxxxxxxxx> wrote:
> i have a breakout board with an FT232RL.  when the board is
> attached to ubuntu 12.04lts, udev (i think) grabs it and
> assigns the ftdi_sio module.
>
> udevadm info --attribute-walk --name=/dev/ttyUSB0
> was used to get the attributes for the device.
>
> with that, wrote the following rule:
> SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
> ATTRS{serial}=="A800f3Pu", OPTIONS+="ignore_device"
>
> that rule does not work.  after much research, found
> http://lwn.net/Articles/364728/:
> udev 148
> ========
>
> The option "ignore_device" does no longer exist. There is no way to
> ignore an event, as libudev events can not be suppressed by rules.
> It only prevented RUN keys from being executed, which results in an
> inconsistent behavior in current setups.
>
> that statement suggests there is not a way to block an action.
> blacklisting i suppose.  but if i blacklisted ftdi_sio, then no
> ftdi device could be used.
>
> i'm searching for a way to keep one specific board/chip from being
> assigned a module so i can work with it in bitbang mode.
>

You can use udev rules to unbind the kernel driver for a specific
device. But it is said to be not 100% reliable.

Ref:
1) 
http://libusb.6.n5.nabble.com/Automatic-detach-of-a-HID-device-using-udev-Re-How-to-dump-HID-report-descriptor-under-Linux-td3330260.html

2) http://libusb.6.n5.nabble.com/open-device-exclusively-td4524397.html

-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread