USB errors w/ Orbbec

Not entirely sure if this is an Orbbec-specific issue but still want to check. I am trying to record with an Orbbec Femto Bolt camera, but when I try to actually use the camera, it doesn’t do anything. When I ran sudo dmesg, it shows me these errors:

[  140.023726] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 4 comp_code 1
[  140.023731] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc620 trb-start 000000042123c910 trb-end 0000000000000000 seg-start 000000042123c000 seg-end 000000042123cff0
[  140.023732] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc620 trb-start 00000003ca1cc000 trb-end 00000003ca1cc610 seg-start 00000003ca1cc000 seg-end 00000003ca1ccff0
[  140.023733] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 4 comp_code 13
[  140.023735] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc630 trb-start 000000042123c910 trb-end 0000000000000000 seg-start 000000042123c000 seg-end 000000042123cff0
[  140.023736] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc630 trb-start 00000003ca1cc000 trb-end 00000003ca1cc610 seg-start 00000003ca1cc000 seg-end 00000003ca1ccff0
[  140.023737] xhci_hcd 0000:02:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 4 comp_code 13
[  140.023739] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc660 trb-start 000000042123c910 trb-end 0000000000000000 seg-start 000000042123c000 seg-end 000000042123cff0
[  140.023740] xhci_hcd 0000:02:00.0: Looking for event-dma 00000003ca1cc660 trb-start 00000003ca1cc000 trb-end 00000003ca1cc610 seg-start 00000003ca1cc000 seg-end 00000003ca1ccff0
[  140.091980] usb 2-2: usbfs: process 2810 (OrbbecViewer) did not claim interface 3 before use

I am on Ubuntu 18.04. I have tried power cycling the PC, unplugging all USB devices, etc. and the errors still come up. Additionally, if I disconnect the device, I start to get these errors in dmesg and I’m not able to connect any device to that port:

[  610.962714] usb usb2-port2: attempt power cycle
[  611.888021] usb 2-2: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  616.987443] usb 2-2: device descriptor read/8, error -110
[  617.095283] usb 2-2: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
[  622.363439] usb 2-2: device descriptor read/8, error -110
[  622.676007] usb 2-2: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
[  627.739443] usb 2-2: device descriptor read/8, error -110
[  627.847254] usb 2-2: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
[  633.115433] usb 2-2: device descriptor read/8, error -110
[  633.234777] usb usb2-port2: unable to enumerate USB device

Does anyone know if this is necessarily a software issue or a hardware issue? I’m not sure what’s going on. I’m running Ubuntu 18.04 and have an ASRock B550M-C Motherboard. I’ve also tried with Femto Bolts with updated firmware (1.12) vs default (1.09) and the error persists. In the console, trying to run an Orbbec recording script stops after the devices initializes, and happens regardless of whether I use the Orbbec C++ SDK or Python SDK.

Any help would be appreciated. Thank you.

Have you tried the sample Recorder in the SDK? Anything wrong?

Yes, I have tried using the sample recorder- the example scripts in both the Python and C++ SDK don’t work properly. For reference, what ends up happening is:
[07/09 12:40:18.039580][info][12238][LinuxPal.cpp:32] createObPal: create LinuxPal!
[07/09 12:40:18.041164][info][12238][LinuxPal.cpp:143] Create PollingDeviceWatcher!
[07/09 12:40:18.041180][info][12238][DeviceManager.cpp:15] Current found device(s): (1)
[07/09 12:40:18.041185][info][12238][DeviceManager.cpp:24] - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8K14101ET, Connection: USB3.1
[07/09 12:40:18.041197][info][12238][Pipeline.cpp:15] Try to create pipeline with default device.
[07/09 12:40:18.041304][info][12238][FemtoBoltUvcDevice.cpp:23] FemtoBoltUvcDevice init …
[07/09 12:40:18.041359][info][12238][FemtoBoltUvcDevice.cpp:121] Create command start!
[07/09 12:40:18.042689][info][12238][MSDEConverterDevice.cpp:726] Succeed to load depth engine plugin
[07/09 12:40:18.708853][info][12238][AbstractDevice.cpp:117] - Firmware version: 1.0.9
[07/09 12:40:18.708865][info][12238][FemtoBoltUvcDevice.cpp:280] Create command done!
[07/09 12:40:18.708871][info][12238][FemtoBoltUvcDevice.cpp:401] init sensor map start!
[07/09 12:40:18.708885][info][12238][FemtoBoltUvcDevice.cpp:428] init sensor map done!
[07/09 12:40:18.709012][info][12238][FemtoBoltUvcDevice.cpp:284] Init depth process param start!
[07/09 12:40:19.053618][info][12238][MSDEConverterDevice.cpp:777] got nvram data succeed.

However no actual window emerges & no recording really takes place. (I’ve tried with different firmwares as well, neither works).

Could you find OrbbecPipeline.bag file in the same path after running the Recorder program? Does the depth_viewer work with your Femto Bolt?

For the xhci_hcd error, usually it comes from the kernel/usb driver.
Looks like the Femto Bolt is recognized by your computer, so you can skip setting up udev rules if you have done this.
Have you tried to run the programs with sudo? It looks like the authority issue to me.

Could you find OrbbecPipeline.bag file in the same path after running the Recorder program?

Nope, that didn’t work

For the xhci_hcd error, usually it comes from the kernel/usb driver.

Do you have any ideas on what might be the problem?

Looks like the Femto Bolt is recognized by your computer, so you can skip setting up udev rules if you have done this.
Have you tried to run the programs with sudo? It looks like the authority issue to me

Yep, even sudo OrbbecViewer gives me the same problems. I tried to run it in a root shell as well, still doesn’t work. I know the old Azure sensors were not very keen on some USB host controllers, but I don’t know if this is the actual problem since this worked stably for 4 months without causing me any issues…

Do you mean it’s working properly for the last 4 months? Did you perform any major update to your system?

I had updated to Ubuntu 22.04. However, I downgraded back to Ubuntu 18.04 with a fresh reinstall after the errors came up. Still getting problems…

@Bruce
I have one more odd update which I was hoping you could help me with. Namely, when I run the Pyorbbec examples, they not only work but also record at the ideal fps for me. These problems emerge when either running using the C++ SDK or when I create a project using the SDK. I’m confused about what this could be – any suggestions or thoughts?

Which example you are running with? Could you provide more details such as screenshots or files regarding the problem you have?

Yeah. If I run the example depth_viewer.py, I get this:

(orbbec) llorentelab@llorentelab-desktop:~/Desktop/pyorbbecsdk/examples$ python3 depth_viewer.py
[07/19 11:19:23.428976][info][17913][Context.cpp:68] Context created with config: /home/llorentelab/Desktop/pyorbbecsdk/config/OrbbecSDKConfig_v1.0.xml
[07/19 11:19:23.428986][info][17913][Context.cpp:73] Work directory=/home/llorentelab/Desktop/pyorbbecsdk/examples, SDK version=v1.10.8-20240604-d1671a3
[07/19 11:19:23.428997][info][17913][LinuxPal.cpp:32] createObPal: create LinuxPal!
[07/19 11:19:23.588122][info][17913][LinuxPal.cpp:143] Create PollingDeviceWatcher!
[07/19 11:19:23.588137][info][17913][DeviceManager.cpp:15] Current found device(s): (1)
[07/19 11:19:23.588142][info][17913][DeviceManager.cpp:24] - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8K14101JD, Connection: USB3.1
[07/19 11:19:23.588160][info][17913][Pipeline.cpp:15] Try to create pipeline with default device.
[07/19 11:19:23.588184][info][17913][FemtoBoltUvcDevice.cpp:23] FemtoBoltUvcDevice init …
[07/19 11:19:23.588231][info][17913][FemtoBoltUvcDevice.cpp:121] Create command start!
[07/19 11:19:23.589190][info][17913][MSDEConverterDevice.cpp:726] Succeed to load depth engine plugin
[07/19 11:19:24.254012][info][17913][AbstractDevice.cpp:117] - Firmware version: 1.0.9
[07/19 11:19:24.254028][info][17913][FemtoBoltUvcDevice.cpp:280] Create command done!
[07/19 11:19:24.254033][info][17913][FemtoBoltUvcDevice.cpp:401] init sensor map start!
[07/19 11:19:24.254051][info][17913][FemtoBoltUvcDevice.cpp:428] init sensor map done!
[07/19 11:19:24.254124][info][17913][FemtoBoltUvcDevice.cpp:284] Init depth process param start!
[07/19 11:19:24.595908][info][17913][MSDEConverterDevice.cpp:777] got nvram data succeed.
[07/19 11:19:24.861367][info][17913][FemtoBoltUvcDevice.cpp:358] setNvramDataStreamStopFunc succeed
[07/19 11:19:24.861420][info][17913][FemtoBoltUvcDevice.cpp:397] Init depth process param done!
[07/19 11:19:24.861992][info][17913][FemtoBoltUvcDevice.cpp:38] FemtoBoltUvcDevice init done!
[07/19 11:19:24.862005][info][17913][DeviceManager.cpp:150] Device created successfully! Name: Femto Bolt, PID: 0x066b, SN/ID: CL8K14101JD
[07/19 11:19:24.862026][info][17913][Pipeline.cpp:47] Pipeline created with device: {name: Femto Bolt, sn: CL8K14101JD}, @0x5FC1C6EA0610
[07/19 11:19:24.862601][info][17913][FemtoBoltUvcDevice.cpp:528] Depth sensor has been created!
[07/19 11:19:24.862636][info][17913][VideoSensor.cpp:384] Query stream profile! size= 14, SensorType=OB_SENSOR_DEPTH
[07/19 11:19:24.862643][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}
[07/19 11:19:24.862648][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 15}
[07/19 11:19:24.862653][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 1024, height: 1024, fps: 5}
[07/19 11:19:24.862657][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 30}
[07/19 11:19:24.862667][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 30}
[07/19 11:19:24.862671][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 25}
[07/19 11:19:24.862676][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 25}
[07/19 11:19:24.862681][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 15}
[07/19 11:19:24.862685][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 5}
[07/19 11:19:24.862690][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 320, height: 288, fps: 5}
[07/19 11:19:24.862695][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 30}
[07/19 11:19:24.862699][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 25}
[07/19 11:19:24.862703][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 15}
[07/19 11:19:24.862708][info][17913][VideoSensor.cpp:386] - {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 512, height: 512, fps: 5}
depth profile: <VideoStreamProfile: 640x576@15>
[07/19 11:19:24.862760][info][17913][Pipeline.cpp:188] Check and set config start!
[07/19 11:19:24.862767][info][17913][Pipeline.cpp:223] Check and set config done!
[07/19 11:19:24.863111][info][17913][Pipeline.cpp:288] Try to start streams!
[07/19 11:19:24.863149][info][17913][VideoSensor.cpp:646] start OB_SENSOR_DEPTH stream with profile: {type: OB_STREAM_DEPTH, format: OB_FORMAT_Y16, width: 640, height: 576, fps: 15}, Backend Format: OB_FORMAT_Y16
[07/19 11:19:24.863155][info][17913][MSDEConverterDevice.cpp:549] Start real profile,width:7680 height:434
[07/19 11:19:24.864573][info][17935][MSDEConverterDevice.cpp:67] Depth engine got nvram data size:492928
[07/19 11:19:24.864618][info][17935][MSDEConverterDevice.cpp:94] use dynlib load depthengine lib…
[07/19 11:19:24.979665][info][17935][MSDEConverterDevice.cpp:105] Depth engine init succeed!
[07/19 11:19:24.979812][info][17913][Pipeline.cpp:301] Start streams done!
[07/19 11:19:24.979819][info][17913][Pipeline.cpp:277] Pipeline start done!
[07/19 11:19:25.079930][warning][17913][Pipeline.cpp:377] Wait for frame timeout, you can try to increase the wait time! current timeout=100
center distance: 2584
center distance: 2582
center distance: 2583
center distance: 2582
center distance: 2586
center distance: 2582
And when I try to close the pipeline, I’m able to do so successfully:

[07/19 11:20:21.139349][info][17913][Pipeline.cpp:411] Try to stop pipeline!
[07/19 11:20:21.139387][info][17913][Pipeline.cpp:383] Try to stop streams!
[07/19 11:20:21.139422][info][17913][MSDEConverterDevice.cpp:620] Stop real profile,width:7680, height:434
[07/19 11:20:21.764458][info][17913][VideoSensor.cpp:734] Video sensor stopped, @OB_SENSOR_DEPTH
[07/19 11:20:21.764473][info][17913][Pipeline.cpp:396] Sensor stream stopped, sensorType=OB_SENSOR_DEPTH
[07/19 11:20:21.764480][info][17913][Pipeline.cpp:402] Stop streams done!
[07/19 11:20:21.764500][info][17913][Pipeline.cpp:443] Stop pipeline done!
[07/19 11:20:21.764523][info][17913][Pipeline.cpp:75] Pipeline destroyed! @0x5FC1C6EA0610
[07/19 11:20:21.764554][info][17913][FemtoBoltUvcDevice.cpp:42] ~FemtoBoltUvcDevice start!
[07/19 11:20:21.764605][info][17913][FemtoBoltUvcDevice.cpp:53] ~FemtoBoltUvcDevice done!
[07/19 11:20:21.764618][info][17913][VideoSensor.cpp:303] VideoSensor destroyed, @OB_SENSOR_DEPTH
[07/19 11:20:21.778270][info][17913][ObLibuvcDevicePort.cpp:70] uvc_close done.
[07/19 11:20:21.778278][info][17913][ObLibuvcDevicePort.cpp:71] ~ObLibuvcDevicePort done
[07/19 11:20:21.778474][info][17913][Context.cpp:84] Context destroyed

In contrast, if I run the C++ Depth Viewer example, here’s what happens:
[07/09 12:40:18.039580][info][12238][LinuxPal.cpp:32] createObPal: create LinuxPal!
[07/09 12:40:18.041164][info][12238][LinuxPal.cpp:143] Create PollingDeviceWatcher!
[07/09 12:40:18.041180][info][12238][DeviceManager.cpp:15] Current found device(s): (1)
[07/09 12:40:18.041185][info][12238][DeviceManager.cpp:24] - Name: Femto Bolt, PID: 0x066b, SN/ID: CL8K14101ET, Connection: USB3.1
[07/09 12:40:18.041197][info][12238][Pipeline.cpp:15] Try to create pipeline with default device.
[07/09 12:40:18.041304][info][12238][FemtoBoltUvcDevice.cpp:23] FemtoBoltUvcDevice init …
[07/09 12:40:18.041359][info][12238][FemtoBoltUvcDevice.cpp:121] Create command start!
[07/09 12:40:18.042689][info][12238][MSDEConverterDevice.cpp:726] Succeed to load depth engine plugin
[07/09 12:40:18.708853][info][12238][AbstractDevice.cpp:117] - Firmware version: 1.0.9
[07/09 12:40:18.708865][info][12238][FemtoBoltUvcDevice.cpp:280] Create command done!
[07/09 12:40:18.708871][info][12238][FemtoBoltUvcDevice.cpp:401] init sensor map start!
[07/09 12:40:18.708885][info][12238][FemtoBoltUvcDevice.cpp:428] init sensor map done!
[07/09 12:40:18.709012][info][12238][FemtoBoltUvcDevice.cpp:284] Init depth process param start!
[07/09 12:40:19.053618][info][12238][MSDEConverterDevice.cpp:777] got nvram data succeed.

Still not sure what your problem is.
While running the depth_viewer example, it will first detect the available devices connected to your computer then initialize the first available one.
After that, it will show some device information and then query the available depth profiles (width, height, and fps).
At the end, the program will start depth stream with the first profile.

The problem is that in the C++ SDK, nothing happens after the initialization step. No window shows up, no depth information, etc. etc. When I use the Python SDK however, that issue does not show up. When I try to debug the issues with the C++ SDK, I can see there are errors in the dmesg log, however with the Python SDK everything works as expected.

We are not able to reproduce the same phenomenon as you have.
The main issue is probably due to your USB driver. You might want to reset/upgrade your bios of your motherboard to rule out the xhci_hcd error first.
After that, making sure you are using the latest SDK from Orbbec.

Which versions of the OrbbecSDK and Python are you using? The Python wrapper calls the OrbbecSDK, so if the versions match up, there shouldn’t be any issues.