Bug 751166

Summary: udev rule does not include all FTDI devices
Product: [Fedora] Fedora Reporter: Canyon Bliss <canyon>
Component: libftdiAssignee: Lucian Langa <lucilanga>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 15CC: lucilanga, scottt.tw
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-25 07:55:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
suggested udev rule for libftdi none

Description Canyon Bliss 2011-11-03 18:06:06 UTC
Created attachment 531620 [details]
suggested udev rule for libftdi

Description of problem:
When developing a program that accesses certain FTDI devices, the user must be root. It is undesirable to develop as rool.
Even if the user is added to the group (plugdev), which is listed in the udev rule (99-libftdi.rules), some devices are still not accessible by the program.
The program fails at when it tries to open the device (ftdi_usb_open).

Version-Release number of selected component (if applicable):
0.18-5.fc15

How reproducible:
Every time

Steps to Reproduce:
1. Add $USER to plugdev group
2. Login
3. insert device
4. run program that accesses device
  
Actual results:
Program is unable to open USB device (returns -4).
If using the simple.c example provided with libftdi, you'll receive this error
"unable to open ftdi device: -4 (usb_open() failed)"

Expected results:
FTDI device is opened

Additional info:
The udev rule only covers devices with idProduct = 6010 . If you're not paying attention to detail, 6010 can look like 6001 when looking at the rules. Perhaps, specifying the devices above the rule would be helpful. See attached suggestion for rule.

Comment 1 Lucian Langa 2011-11-25 07:55:26 UTC
Thanks for the suggestion. However rule should be sent upstream instead.
Current code operates only (or mostly) on 0x0403, 0x6010. Current git repo contains code to handle 0x403, {0x6001,0x6011,0x6014}

Comment 2 Scott Tsai 2011-12-07 22:14:24 UTC
(In reply to comment #1)

Can we get a libftdi package update in Fedora with the new udev rules patched in?
I'm trying to use an FTDI 4232H based board:
http://opencores.org/or1k/Ordb2a-ep4ce22
and Fedora setting up the permissions correctly 

On a separate topic, as new devices get released in the future, manually adding their IDs to the udev rule seems suboptimal. Maybe upstream libftdi should list the supported device IDs in a machine readable file and auto generate the udev rule.

Comment 3 Lucian Langa 2011-12-08 09:39:26 UTC
The code to handle additional device 6001, 6011, 6014 is only on git repo.
There hasn't been a stable release yet.

Comment 4 Scott Tsai 2011-12-08 10:50:36 UTC
(In reply to comment #3)
Would you consider incorporating the 99-libftdi.rules change in a local Fedora patch?
Upstream libftdi releases seems quite infrequent.