Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb_set_configuration in open_ec3 returned -16 : Device or resource busy #1

Open
eduardoaugustojulio opened this issue Mar 7, 2018 · 2 comments

Comments

@eduardoaugustojulio
Copy link

Hi!
I compiled whit success all project, and when i run

ec2test-any --port=USB --debug

i got the message bellow


  • WARNING: Auto detection of mode may cause initialisation sequence *
  • to differ significantly from the SiLabs IDE. *
  • In the case of problems specify --mode=C2 or --mode=JTAG *

ec2_GetDbgInfo(0x10c4,0x8044) 1
./ec2readflash:/home/eduardo/Downloads/ec2/src/ec2drv/ec2drv.c:2162:
usb_set_configuration in open_ec3 returned -16 : Device or resource busy
Exiting now
Disconnect done

running dmesg
[ 142.775927] usb 2-1.8: new full-speed USB device number 6 using ehci-pci
[ 142.886010] usb 2-1.8: New USB device found, idVendor=10c4, idProduct=8044
[ 142.886014] usb 2-1.8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 142.886016] usb 2-1.8: Product: USB Debug Adapter
[ 142.886019] usb 2-1.8: Manufacturer: Silicon Laboratories
[ 142.886021] usb 2-1.8: SerialNumber: EC3003B9CC9

[ 928.505306] usb 2-1.8: usbfs: interface 0 claimed by usbhid while 'ec2test-any ' sets config #1

@kaklik
Copy link

kaklik commented Mar 6, 2019

Hi,
I have exactly the same problem.

@povik
Copy link

povik commented Jul 21, 2019

Hi,

most likely the device is claimed by a kernel driver, which is what prevents you from talking to the device directly. I solved this by creating an udev rule:

SUBSYSTEM=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8044", MODE="0660", GROUP="plugdev", RUN="/bin/sh -c 'echo -n $id:1.0 > /sys/bus/usb/drivers/cp210x/unbind'"

Where the kernel driver I wish to dissociate is cp210x. In your case, @eduardoaugustojulio, the claiming driver seems to be usbhid.

Alternatively, see ec2drv.c:2151. There's a function call to release the device, but its compilation depends on a macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants