libftdi not finding ARM-USB-OCD

Hi guys, I’ve got here an ARM-USB-OCD and an LPC-P2106-B, and a Dell laptop running Gentoo 64bit kernel 2.6.22.1. When I plug in the OCD device, the kernel recognizes that it has been plugged in:

usb 3-1: new full speed USB device using uhci_hcd and address 3

usb 3-1: configuration #1 chosen from 1 choice

And it shows up in /proc/bus/usb/devices:

T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0

D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1

P: Vendor=15ba ProdID=0003 Rev= 5.00

S: Manufacturer=Olimex

S: Product=Olimex OpenOCD JTAG

S: SerialNumber=FTPXNTEB

C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=300mA

I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

However, it does not show up in lsusb. The output of lsusb is exactly the same before and after plugging:

Bus 001 Device 001: ID 0000:0000

Bus 001 Device 002: ID 413c:a005 Dell Computer Corp.

Bus 001 Device 006: ID 413c:8126 Dell Computer Corp.

Bus 001 Device 005: ID 0a5c:4500 Broadcom Corp.

Bus 003 Device 001: ID 0000:0000

Bus 004 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

Bus 005 Device 001: ID 0000:0000

And when I try to talk to it using OpenOCD, libftdi is unable to find the device:

Error: ft2232.c:1435 ft2232_init_libftdi(): unable to open ftdi device: device not found

Any ideas?

try running lsusb -v as root, there you will see it.

yaman:
try running lsusb -v as root, there you will see it.

That was the first thing I checked. /proc/bus/usb/*/* are root:usb mode 0664, and /dev/bus/usb/*/* are root:usb mode 0664 also. I added my username to the usb group and re-logged-in. The device does not show up when lsusb -v is run as root either.

The device shows up immediately in the graphical program “usbview”, and strace reveals that this is because usbview reads from the single file /proc/bus/usb/devices. lsusb on the other hand does a directory walk of /dev/bus/usb//, which apparently doesn’t contain a device node for it… hmmm… I’ll work on that for a few minutes…

yaman:
try running lsusb -v as root, there you will see it.

Well well well. I didn't catch this before, but lsusb is not showing my USB1.1 Logitech mouse either. Something bigger is afoot...

Kernel 2.6.21 → 2.6.22 potentially breaks this, depending on some other things.

http://www.mail-archive.com/linux-usb-u … 18894.html

There are several ways this can be fixed… either turn on kernel config option CONFIG_USB_DEVICE_CLASS (which is now deprecated in 2.6.22, which is why I had it turned off), or add some stuff to /etc/udev/rules.d/, or the third solution (the only one I tried, thus the only one I’ll guarantee works):

mount usbfs /dev/bus/usb -t usbfs -o rw,noexec,nosuid,devmode=0664,devgid=85

You should of course check that your usb group is gid 85 before running that.

Now my mouse shows up in lsusb as well as the ARM-USB-OCD, and OpenOCD runs quite happily. Yay! Now to get that config file set up exactly right…