USB OTG host mode, unable to get BOS descriptor

enbyted
enbyted New Member Posts: 9

Hi all!

My setup:

  • up2 with N4200 8GB ram
  • Ubuntu server with GUI installed
  • 2x Kinect v2 (USB3.0 device, consumes almost full 5Gbps bandwidth)

I'm working on a project that involves using two Kinect v2 sensors. I found that USB3 lines in N4200 chip share bandwidth, however it appears that OTG is on separate controller which would be perfect.

The Kinect is properly enumerated in OTG port, however when I try to open it (with libusb) it fails.
In dmesg there is only one message: usb 1-1: unable to get BOS descriptor

It should be mentioned that the library that I'm using (libfreenect2) resets the device before actually opening it.

Any idea how can I fix it?

Comments

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @enbyted ,

    Try to follow the steps for Ubilinux/Ubuntu from UP Wiki:
    https://wiki.up-community.org/Serial_console#USB3.0_OTG_port_in_device_mode

    These steps should let you connect to USB OTG port.

    Cheers!

  • enbyted
    enbyted New Member Posts: 9

    Hi @ccalde ,

    I need the USB3.0 OTG in host mode, the link that you've provided is about device mode.

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    Hi @enbyted ,

    The link that I provided you says for UPSquared:
    "The functionality should work out of the box from BIOS version 2.1. No bios settings modification are needed."

    So, that looks like you can use it automatically, as the port should normally be able to detect which mode is needed depending on what type of cable and device is plugged in.

  • enbyted
    enbyted New Member Posts: 9

    Whops, totally missed the "BIOS version 2.1" part, it appears that I have version 1.8 - I'll try the update tomorrow and see how it goes.
    BTW. The forum won't send email notifications about replies :(

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭

    hi @enbyted ,

    Yes please, a BIOS up to date is important to work normally.

    About the email notifications, check your preferences in your profile: Home › Profile › Notification Preferences

    Cheers!

  • enbyted
    enbyted New Member Posts: 9

    Sorry for the delay.

    I've updated the BIOS to 3.3 and still have the same issue.

  • ccalde
    ccalde New Member Posts: 348 ✭✭✭
    edited October 2018

    Hi @enbyted ,

    With the latest BIOS 3.3, did you change to host mode in the BIOS settings (Chipset > South Bridge) and do you still get the same dmesg message??

  • enbyted
    enbyted New Member Posts: 9
    edited July 2019

    Oh, I've totally forgetten about this thread... Until I ran into the same issue again and found it through google.

    So, now I've got BIOS 4.0, I don't see option to change the USB port to host mode, but it works with every device I've tried except for kinect. I've been bypassing this issue by using exteral USB 3.0 controller (on PCIe), but I would really like to bet rid of it.

    I've got kernel 4.10 currently, but I'll try upgrading in upcomming days. Though this doesn't look like a driver issue.

    EDIT:
    Just tested with 5.0 kernel - still the same issue.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    You might need to enter the password for admin access to the BIOS, please read the instruction on the wiki: https://wiki.up-community.org/Bios_Update#Engineering_BIOS_password

  • enbyted
    enbyted New Member Posts: 9

    This enabled "CRB" menu, but still, I don't see anything about USB 3.0 controler mode/OTG mode/anything like that.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    Under CRB you can try:
    CRB Advanced -> USB Configuration -> disable USB mass storage driver (used by OTG)
    CRB Chipset -> South Cluster Configuration -> USB Configuration -> disale USB HW Mode AFE Compa

    Have you tried all the 3 USB3.0 ports? The controller is the same but the bandwidth shouldn't be shared, I don't know where you read that.

  • enbyted
    enbyted New Member Posts: 9
    edited July 2019

    I'll try these in a minute.

    Have you tried all the 3 USB3.0 ports? The controller is the same but the bandwidth shouldn't be shared, I don't know where you read that.

    I did try all, even an external usb 3.0 card. But linux always reports that there is not enough bandwidth when I try to open second Kinect.

    EDIT:

    The configuration is as follows: One kinect is connected to top port of doubole USB3.0 ports. The other I'm trying to connect to different ports

    OTG port

    Dmesg when connecting Kinect to OTG port:

    [  544.718319] usb 1-1: new high-speed USB device number 5 using xhci_hcd
    [  544.866869] usb 1-1: unable to get BOS descriptor
    [  544.867646] usb 1-1: New USB device found, idVendor=045e, idProduct=02c4, bcdDevice= 1.00
    [  544.867655] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
    [  544.867661] usb 1-1: Product: Xbox NUI Sensor
    [  544.867665] usb 1-1: Manufacturer: Microsoft
    [  544.867670] usb 1-1: SerialNumber: 374184134147
    

    When trying to open(both) nothing happens in dmesg, but libusb i/o error when trying to submit bulk transfers. The error happens when trying to open kinect when other is already open, no matter the order of openning.

    Another internal port

    Dmesg when connecting to internal port:
    [ 573.500998] usb 2-4: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd [ 573.522001] usb 2-4: New USB device found, idVendor=045e, idProduct=02c4, bcdDevice= 1.00 [ 573.522010] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=4 [ 573.522016] usb 2-4: Product: Xbox NUI Sensor [ 573.522021] usb 2-4: Manufacturer: Microsoft [ 573.522025] usb 2-4: SerialNumber: 374184134147

    When trying to open(both), i'm getting this is dmesg:
    [ 584.215534] usb 2-3: Not enough bandwidth for new device state. [ 584.215594] usb 2-3: Busted HC? Not enough HCD resources for old configuration. [ 584.241777] usb 2-3: USB disconnect, device number 2 [ 584.242258] usb 2-3: Not enough bandwidth for new device state. [ 584.242311] usb 2-3: Not enough bandwidth for altsetting 1 [ 584.437835] usb 2-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd [ 584.459878] usb 2-3: New USB device found, idVendor=045e, idProduct=02c4, bcdDevice= 1.00 [ 584.459887] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=4 [ 584.459892] usb 2-3: Product: Xbox NUI Sensor [ 584.459896] usb 2-3: Manufacturer: Microsoft [ 584.459900] usb 2-3: SerialNumber: 177232634647 [ 584.460642] usb 2-3: Not enough bandwidth for new device state. [ 584.460759] usb 2-3: can't set config #1, error -28

    External port (PCIE usb3.0 card)

    Connect:
    [ 912.822386] usb 2-4: USB disconnect, device number 3 [ 919.115311] usb 4-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd [ 919.141908] usb 4-1: New USB device found, idVendor=045e, idProduct=02c4, bcdDevice= 1.00 [ 919.141918] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=4 [ 919.141924] usb 4-1: Product: Xbox NUI Sensor [ 919.141929] usb 4-1: Manufacturer: Microsoft [ 919.141934] usb 4-1: SerialNumber: 374184134147

    When trying to open(both) nothing happens in dmesg, but libusb i/o error when trying to submit bulk transfers. The error happens when trying to open kinect when other is already open, no matter the order of openning.

    EDIT2:

    Any combination of provided two settings doesn't change anything

  • enbyted
    enbyted New Member Posts: 9

    Ummm, I've posted a reply on July 19th but it's gone. I've attached some dmesg logs there, which I don't have at the moment. If it's somewhere hidden in moderation or something maybe you can recover it? If not I'll collect them again tomorrow or day after.

    Have you tried all the 3 USB3.0 ports?

    Yes, I tired all combinations of internal ports and ports on external pcie -> usb 3.0 card.

    The controller is the same but the bandwidth shouldn't be shared, I don't know where you read that.

    I think it was stated somewhere in "Intel Pentium and Celeron Processor N- and J- series datasheet". I'm not sure of that though. Nevertheless linux always reports "Not enough bandwith" when trying to open second Kinect, no matter the order of opening and which ports are used.

  • DCleri
    DCleri Administrator, AAEON Posts: 1,213 admin

    from your message above it seems that also the combination with the external USB controller via PCIe doesn't work well and you get errors.

    I cannot find information on the datasheet that mention the shared bandwidth between USB ports.

    I have also found many issues of incompatibility for the kinect with other USB3.0 controllers, and someone reported issues on some NUC device, not clearly specified.

    Do you also have any USB2.0 device connected to the board like keyboard or mouse?

    If so, can you try to connect those to a different controller (e.g. the external USB) or the USB2.0 port on the micro10 pin header on the side (you might need an adapter from our shop)?

  • enbyted
    enbyted New Member Posts: 9

    Okay, so I've resolved the not enough bandwidth issue. The root cause of that problem was that by default linux uses 16MB usb transfer buffer and it's too small to sustain multiple kinects. I've bumped it up to 64MB and it works like a charm (using echo 64 > /sys/module/usbcore/parameters/usbfs_memory_mb).

    However this only works when using one internal USB 3.0 port and one external (PCIE) USB 3.0 port. This does not work when both kinects are connected to any combination of inernal ports (especially the OTG port - the BOS descriptor error).
    I've also tried with only kinects connected to USB ports (no keyboard or mouse) - same behavior.

    I cannot find information on the datasheet that mention the shared bandwidth between USB ports.

    I've tried looking for that but couldn't find it, maybe I've imagined it. Nevertheless the problem exists, maybe that's not the root cause.

    I have also found many issues of incompatibility for the kinect with other USB3.0 controllers, and someone reported issues on some NUC device, not clearly specified.

    Yeah, they're terrible as far as hardware support is concerned, but that doesn't seem to be an issue here - when openned individally they work, it's just the case when trying to open 2 at the same time.

Privacy Policy