Entity not found when disconnecting from USB device

433 views
Skip to first unread message

dejan...@gmail.com

unread,
Apr 23, 2014, 9:56:31 AM4/23/14
to usb4...@googlegroups.com
Greetings.

I have an annoying issue that arises when I try to disconnect from the device I am communicating (USB CDC ACM device, which doesn't support V.250 command set). When I physically connect the device for the first time or when I physically disconnect and reconnect the device and Linux kernel automatically assigns the USB CDC ACM drivers and run my application, it works without any issues except when I try to close the interface and exit my application. 

I close both input and output pipes and when I try to release the interface I get the following error: javax.usb.UsbPlatformException: USB error 5: Unable to release interface: Entity not found. The interesting part happens when I force stop my application and rerun it. After initialization procedure I start to communicate with the device and now when I close the interface I do NOT receive the same error. In fact, it shuts down without any errors whatsoever. This error only occurs when I unplug the device and replug it back OR when I plug the device in for the first time. 

You can see both my initialization function and USB close function in the attached file.

Thank you very much for your assistance in advance.

Best regards,

Dejan Volk

P.S: I'm running Ubuntu 12.04 LTS, using usb4Java version 1.2.0.

sample.java

rstoe...@prozesstech.com

unread,
Jul 7, 2015, 4:28:27 PM7/7/15
to usb4...@googlegroups.com
I am having a similar problem.

First time after a re-boot our code fails when attempting to release the "claim", gettings a "UsbPlatformException: USB error 5: Unable to re-attach kernel driver: Entity not found" exception. The code enters a state where it cannot release the claim to the interface, and yet cannot claim it either.

After stopping our program and then re-starting it, it works just fine from then on.
Reply all
Reply to author
Forward
0 new messages