1 Reply Latest reply on Mar 22, 2017 1:22 PM by user_49271930

    Detecting USB disconnection (self powered)


      Hi, I'm a bit new to USB device design and have a fairly straight forward question about connection state. 


      My application is a keyboard style piece of hardware that has custom buttons, USBFS with three HID end points for keys, mouse and volume control. It's always powered and always connected to an Embedded X86, running Windows 10 or similar. The OS will reboot many times during the users day, because Windows is like that, and each time, my device will stop working, requiring a full power cycle to bring us back.


      I need to detect the USB disconnection by host... right now I'm using USBFS_1_bGetConfiguration, and clearly it is returning a != 0 value even after the OS has shut down. 


      Should I be using isConfigurationChanged()? This would let me see the OS come up, then I'd reInit the USBFS, use USBFS_1_bGetConfiguration to confirm a connection and load each end point? I'm working on this now with no success yet.




      Thanks, Brent.