27 Replies Latest reply on May 12, 2020 8:26 AM by vladimirek

    USB 3.0 support for beagle bone AI.

    prathamesh12

      I want to use basler ace camera (acA1300-200um) with beagle bone AI board. It requires usb 3.0 host controller. As BB AI board provides only usb 2.0 , camera isn't working. Is there any way we can add usb 3.0 support to board? Like an external module with 3.0 support which can be further connected to AI board via UART....

        • Re: USB 3.0 support for beagle bone AI.
          gdstew

          The USB C connector used to power the AI is also connected to a USB 3 data interface on the SoC. The problem I've seen is that none of the power supplies

          for the AI make these signals available to use. You could possibly use a USB 3 breakout board to get to the USB 3 data signals on the power cable and make

          a USB 3 cable with the data and power connections for the camera. Using a breakout board may cause signal integrity problems with the high speed USB 3

          data interface especially if the twisted pair data wires are not handled properly (stay twisted right up to the breakout board connection) or if the cable is too

          long. Another possibility is a USB 3 C connector Y cable if they exist. I'm not sure if they do, and a quick google search did not find one. Signal integrity could

          also be a problem with Y cables which may be why I couldn't find one.

           

          The UART interface is way too slow to use for a USB 3 or even a USB 2  full speed interface.

          2 of 2 people found this helpful
          • Re: USB 3.0 support for beagle bone AI.
            clem57

            Hah! You need to supply higher current for the camera... The data can be USB 2.0 at a slower frame rate.

            • Re: USB 3.0 support for beagle bone AI.
              prathamesh12

              Hello,

              I have tried with a powered usb 3.0 hub (link). But Beagle-Bone can't detect it. Hub is working fine. I have checked it on my PC with c type connector.

              Now there may be this issue. As gdstew said back-powering is not possible. Kernel suspends usb if there is no enough power supply from host. This autosuspend functionality is default enabled on Debian image provided for BB-AI. It can be disabled but I could only find it out using Grub, which is not available for the kernel I m using.So any other way this can be disabled? Any other issue you guys can think of, other than this??

               

              --Thanks

              1 of 1 people found this helpful
              • Re: USB 3.0 support for beagle bone AI.
                shabaz

                If it is an option, you could also consider GigE camera since the BB-AI has a high-throughput interface for it (Gigabit Ethernet). Many of these cameras are available in GigE variants too.

                However, I'd just like to point out that it can be an uphill struggle getting the open source software running for GigE cameras on ARM. I didn't succeed in my limited tests, I had some runtime errors I never managed to get to the bottom of..

                Is your camera supplied with software, and have you been successful installing it or compiling it on ARM and trying to run it, and see what happens with USB 2.0? (i.e. deliberately configure for a much lower frame rate or resolution).

                  • Re: USB 3.0 support for beagle bone AI.
                    prathamesh12

                    Yep.GigE may be another option. But in that case I need to change camera itself which is not feasible for me.

                     

                    Basler cameras run on pylon software. I have successfully installed it (Basler have provided separate arm image with c/c++ support). They have provided python wrapper for it as well.

                    According to the company, USB 3.0 cameras will get detected on USB 2.0 ports but can't be used at all(There are different cameras with lower frame rate support for USB 2.0. One in the ACA category does not support it).

                    I can compile the codes using their software and it gives me error like "USB 3.0 compatible port required."

                     

                    I have tested that camera with same software on my linux pc. It works absolutely fine with USB 3.0 and gives same error as of arm for USB 2.0 port.

                  • Re: USB 3.0 support for beagle bone AI.
                    vladimirek

                    Hello,

                     

                    I mean I fall in this problem too with Basler USB 3.0  Dart camera.

                    Dart camera is able to run via BB-AI USB 2.0 with USB3.0 hub (unpowered) in middle.

                    Reduced data throughput in camera settings is necessary to get not corrupted data from camera. Speed is degraded as well - but it is working

                     

                    Now I want to put the camera directly to USB-C, but the port in host mode does not detect anything which I have in hand which need power from bus.

                    Only one device which I found is running perfectly is USB-C HP LCD Monitor. Then I can have Keyboard and mouse as well attached to monitor ports.

                    I ordered some powered USB-C hubs to test, but it will be nice run without a hub.

                     

                    How was you final solution? Thanks.

                     

                    -vladimirek-

                    1 of 1 people found this helpful
                      • Re: USB 3.0 support for beagle bone AI.
                        Christopher Stanton

                        Have you made sure that:

                        1. The USB chip is in the correct mode, and

                        2. You have drivers for the hardware you're connecting

                        • Re: USB 3.0 support for beagle bone AI.
                          vladimirek

                          Result with low cost USB3 powered HUB (AXAGON HUE-S2C):

                           

                          > root@beaglebone:/var/lib/cloud9# uname -a

                          > Linux beaglebone 4.19.94-ti-r42 #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020 armv7l GNU/Linux

                          > root@beaglebone:/var/lib/cloud9# /opt/scripts/boot/bbai_usb_host.sh

                           

                          case A:

                          - connect unpowered hub to AI

                          Result: - nothing (no logs in dmesg)

                           

                          case B:

                          - place power to hub

                          - connect hub to AI

                          Result: - nothing (no logs in dmesg)

                           

                          case C:

                          - place power to hub

                          - connect hub to Other USB-C device (in my case monitor with usb-c port connectod to laptop via USB-C)

                          - hub appear along with payload on notebook

                          - disconnect hub (power on hub remain !!)

                          - connect hub to AI

                          - devices appear, all is working as expected [1]

                          From this: point:

                          - remove power from hub => device is lost

                          - reboot => device is lost, but appear again afterbbai_usb_host.sh

                           

                          From my side it is "broken" somewhere: I have vision dedicated device without possibility to connect

                          USB3 camera.

                           

                          For now I do not have time to continue deeper investigating, but it remain open issue for me.

                           

                          -vladimir-

                           

                           

                          [1]:

                          [ 1419.390833] usb 2-1: new high-speed USB device number 10 using xhci-hcd

                          [ 1419.549820] usb 2-1: New USB device found, idVendor=0bda, idProduct=5411, bcdDevice= 1.04

                          [ 1419.549850] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

                          [ 1419.549871] usb 2-1: Product: 4-Port USB 2.0 Hub

                          [ 1419.549891] usb 2-1: Manufacturer: Generic

                          [ 1419.591666] hub 2-1:1.0: USB hub found

                          [ 1419.592305] hub 2-1:1.0: 4 ports detected

                          [ 1419.675078] usb 3-1: new SuperSpeed Gen 1 USB device number 5 using xhci-hcd

                          [ 1419.705592] usb 3-1: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.04

                          [ 1419.705621] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

                          [ 1419.705642] usb 3-1: Product: 4-Port USB 3.0 Hub

                          [ 1419.705661] usb 3-1: Manufacturer: Generic

                          [ 1419.736944] hub 3-1:1.0: USB hub found

                          [ 1419.737810] hub 3-1:1.0: 4 ports detected

                          [ 1419.942831] usb 2-1.2: new high-speed USB device number 11 using xhci-hcd

                          [ 1420.048297] usb 2-1.2: language id specifier not provided by device, defaulting to English

                          [ 1420.066424] usb 2-1.2: New USB device found, idVendor=7c9e, idProduct=a53a, bcdDevice= 1.00

                          [ 1420.066454] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

                          [ 1420.072673] usb-storage 2-1.2:1.0: USB Mass Storage device detected

                          [ 1420.079406] scsi host0: usb-storage 2-1.2:1.0

                          [ 1421.092113] scsi host0: scsi scan: INQUIRY result too short (5), using 36

                          [ 1421.092155] scsi 0:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0

                          [ 1421.095729] sd 0:0:0:0: Attached scsi generic sg0 type 0

                          [ 1421.101561] sd 0:0:0:0: [sda] 1473037696 512-byte logical blocks: (754 GB/702 GiB)

                          [ 1421.102039] sd 0:0:0:0: [sda] Write Protect is off

                          [ 1421.102067] sd 0:0:0:0: [sda] Mode Sense: a5 3a 7c 9e

                          [ 1421.102522] sd 0:0:0:0: [sda] No Caching mode page found

                          [ 1421.108745] sd 0:0:0:0: [sda] Assuming drive cache: write through

                          [ 1421.126620]  sda: sda1

                          [ 1421.136009] sd 0:0:0:0: [sda] Attached SCSI disk

                            • Re: USB 3.0 support for beagle bone AI.
                              Christopher Stanton

                              > [ 1419.675078] usb 3-1: new SuperSpeed Gen 1 USB device number 5 using xhci-hcd

                              > [ 1419.705642] usb 3-1: Product: 4-Port USB 3.0 Hub

                               

                              This sounds like it's working properly, no? With the USB3 hub detected, you're then connecting the camera to it?

                               

                              > connect hub to Other USB-C device (in my case monitor with usb-c port connectod to laptop via USB-C)

                               

                              To be clear, at the moment display output isn't supported via USB-C/USB3 on the BeagleBone AI.

                               

                               

                              1 of 1 people found this helpful
                              • Re: USB 3.0 support for beagle bone AI.
                                vladimirek

                                After while, I can test it again and continue with it.

                                 

                                I got charging USB hub. This one: https://www.trust.com/en/product/23331-dalyx-aluminium-7-in-1-usb-c-multi-port-adapter

                                 

                                Finaly it is working as expected, but I found a new issue, but this is probably addresed to the hub, not the beagle (i hope):

                                As the hub is powered and I have 5V in device I try to power the beagle via hub via USB-C power input.

                                I got a "some" cable (removed from car to USB-C adapter) and apply 5V to it.

                                The hub is not recognize it as a power source and not power on the beagle via USB-C.

                                When I try to swap the cable connector to 180 I found that some times the hub is send the power to the beagle, but it seems it only detect some glitches when plugged, because when I switch on the 5V supply it newer turn on.

                                Maybe another cable has not this issue. I have tested raspberry USB-C power adapter and it working fine. ( I did not expect this as I can not use this Raspberry USB-C power adapter to charge my Samsung cell phone...)

                                But the simple cable is sufficient enough to proper function (supply the Basler camera) after /opt/scripts/boot/bbai_usb_host.sh is run.

                                So I use to power the beagle via header pins.

                                 

                                For me this is closed as:

                                - For Run Basler USB3.0 camera via USB-C, you need USB-C charging hub and run /opt/scripts/boot/bbai_usb_host.sh

                                - Proper power input device (not simple cable) to this hub must be provided if you want to supply beagle via USB-C

                                 

                                 

                                For those who love pictures: Beagle in fine dust proof enclosure:

                                Setup.

                                 

                                have a nice day,

                                 

                                -vladimirek-