I have encountered serious problem while trying to write simple program for usb HID device. Whenever i call usbd_attach() it returns EBUSY.
Logs:
hidview:
HIDD v1.00, v1.00 DDK
Device Address : 0
Vendor : 0xffffffff (Legacy PS2 Keyboard)
Product : 0xffffffff (Keyboard)
Version : r1.00
Usage : Keyboard
Device Address : 1
Vendor : 0xffffffff (Legacy PS2/Serial Mouse)
Product : 0xffffffff (Mouse)
Version : r1.00
Usage : Mouse
Device Address : 2
Vendor : 0x08bb (Burr-Brown from TI )
Product : 0x29b2 (USB Audio CODEC )
Version : r2.00
Usage : Consumer Control
usb:
USB 0 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
Device Address : 1
Vendor : 0x0451 (Texas Instruments)
Product : 0x2036 (General Purpose USB Hub)
Class : 0x09 (Hub)
Subclass : 0x00
Protocol : 0x00
Hub Number Ports : 2
Hub Characteristics : 0x0004 (Ganged power, Compound, Global over-current)
Hub Power On->Good : 100 ms
Hub Power Requirements : 100 mA
Device Address : 2
Vendor : 0x08bb (Burr-Brown from TI )
Product : 0x29b2 (USB Audio CODEC )
Class : 0x00 (Independent per interface)
Device Address : 3
Vendor : 0x0403 (FTDI)
Product : 0x6001 (FT232R USB UART)
Class : 0x00 (Independent per interface)
USB 1 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
USB 2 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
USB 3 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
USB 4 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
I have found a solution on foundry27 to use io-hid command with igndev option. Ive tried it: system("slay io-hid"); system("io-hid -dusb igndev=0x0451:0x2036 &"); system("io-hid -dusb igndev=0x08bb:0x29b2 &"); However it doesn
t work for me.
Thanks