repeated Kinect plug/unplug from USB port causes K4W Security Control device to not install/start RRS feed

  • Question

  • Using SDK v1.7, if I am cruel in testing...and I plug and unplug repeatedly the Kinect for Windows from my USB 2.0 port, there are some cases where the 4 needed devices *do not* appear in the Device Manager and my app reports E_NUI_DEVICE_NOT_READY and/or E_NUI_NOTREADY.

    This is not in all cases, but it is reproducible maybe 1 out of 10 times. You don't even have to run an app. Just open Device Manager and watch for the needed 4 Kinect devices and repeatedly plug/unplug. Once the failure of K4W Security Control device occurs, the only solution to recover usage is to again unplug/plug the K4W.

    Clevo based laptop w/ i7-3720.
    Windows 8.1 x64 with current windows updates
    I am using the USB 2.0-only port which appears in device manager as an Intel 7 Series/C216 Chipset Family USB Enhanced Host Controller
    Kinect for Windows sensor
    Kinect SDK v1.7 installed

    Install all the above
    Open Device Manager and scroll so you can see the Kinect Device and its 4 children devices
    Unplug the Kinect from the USB 2.0 port
    Wait a few seconds
    Plug the Kinect into the USB 2.0 port
    Wait until all 4 (or 3) children devices appear

    Yes, this is extreme error handling. Yet, I am working w/ a client to handle failures of the Kinect Service to correctly startup and/or fail during use. Therefore, I am building error handling to catch these. And I found this.


    Thursday, January 9, 2014 12:18 PM

All replies

  • This is not a typical use case that is supported. When you enumerate the sensors with the SDK, how many of them appear in the available sensors list and what is their status? What is the normal use case scenarios that get the system into this state? I would be more concerned with why is the sensor getting continuously removed?

    I am assuming you are talking about surprise disconnects and not using the "Safely remove device" method from Windows? The only thing I can suggest is a forceful reboot cycle at the end of the day to ensure the system is in a clean state for operation.

    Carmine Sirignano - MSFT

    Thursday, January 9, 2014 7:32 PM
  • Yes, this is cruel extreme testing. Yet, I can get it to fail within about 10 plug/unplugs.

    I tweaked the app to get you the info you requested. I have the KinectStatusChange callback hooked and I can iterate the sensors. I output debug into to the console and therefore also get Windows debug output.

    Continue plugging and unpluging until the time you plug-in and the K4W Security Control Device does not appear in device manager. On this case, this is what appears in the debug console

    KinectStatusChange(hrStatus=3010001 , inst=USB\VID_0409&PID_005A\6&306E0DA4&0&2 , unq=(null))
    KinectStatusChange(hrStatus=83010015 , inst=USB\VID_0409&PID_005A\6&306E0DA4&0&2 , unq=USB\VID_045E&PID_02AE\A00364901868051A)
    Nothing else happens. Now I initiate an iteration of the sensors
    NuiGetSensorCount(1) hr=0
    NuiCreateSensorByIndex(0) hr=0
    pNuiSensor->NuiStatus() hr=83010015 aka E_NUI_NOTREADY

    The only recovery now is to unplug/plug-in the sensor. A reboot might also work but not tested.

    As before, this was found during my coding to handle sudden failures of the K4W hardware/service. One sudden failure is a spontaneous fail of the datastreams and the callback having an error code. Only recover there is plug/unplug. Another spontaneous failure case is an unplug which I describe above.

    I do feel important to share my feedback that "Safely remove device" is in practice deprecated by Windows. In Windows 8.1 (perhaps earlier versions), the tray icon management is set such that the Safely Remove Device icon/feature is only visible on notifications. Therefore, it is not available for Kinect users. It is not in the tray, or the tray popup for icons. The only way to reach it is the many click procedure to customize the tray, find the icon, change the behavior, etc.

    This is not typical use case. Instead, it is boundary testing along with stability testing.


    Friday, January 10, 2014 1:34 PM