Android / Linux USB Problems


We’re building an app for Structure on Android. The sensor works well most of the time but occasionally it fails to initialize. We tracked down the problem to the libusb_control_transfer call that happens when querying the sensor’s hardware version (see XnHostProtocol.cpp for the PS1080 Driver). The control transfer times out, but even if we patch XnLib to have libusb take as long as necessary it just hangs. It seems like the USB bus is stalled or something like that. Also we’ve seen the sensor properly initialize but the depth frame callback never gets called.

Do you guys have any insight into why this could be happening? It would greatly improve our UX if we could get the sensor to start up every time.

FYI: We’re using the OpenNI2 found at We’ve made a couple patches to OpenNI in order to work around some permissions issues that came up after upgrading to Android Lollipop, but we had these problems before we upgraded. We have sensors with firmware versions 1.0.2 and 1.1 and the behavior is the same.

Thanks in advance!


Are you using the “develop” branch? Also, could you share the patches via a pull request?


We have got the same problem with lollipop rooted and non rooted. Can you share a PullRequest? I hope that also occipital could give own support on thus!