8 Replies Latest reply on May 6, 2016 4:04 AM by Yacine85

    How do we use the host USB port ?

    Paul.Guermonprez

      Hi,

       

      I'm trying to connect a device to the host USB port.

      Here is the way I proceed:

       

      - SW1 on USB host position (in direction to the power supply connector)

      - booting Edison (serial connection and power supply 12V)

       

      Here is dmesg and lsusb. Everything sounds ok to me....

       

      root@edison_ipa_2:~# dmesg | grep usb

      [    0.203061] usbcore: registered new interface driver usbfs

      [    0.203159] usbcore: registered new interface driver hub

      [    0.203389] usbcore: registered new device driver usb

      [    0.758116] usbcore: registered new interface driver asix

      [    0.758208] usbcore: registered new interface driver cdc_subset

      [    0.758342] usbcore: registered new interface driver cdc_ncm

      [    0.761398] usbcore: registered new interface driver cdc_acm

      [    0.761520] usbcore: registered new interface driver usb-storage

      [    0.761714] usbcore: registered new interface driver usbserial

      [    0.761788] usbcore: registered new interface driver usbserial_generic

      [    0.761856] usbserial: USB Serial support registered for generic

      [    0.761926] usbcore: registered new interface driver pl2303

      [    0.761991] usbserial: USB Serial support registered for pl2303

      [    1.585500] usbcore: registered new interface driver usbhid

      [    1.585520] usbhid: USB HID core driver

      [    6.326654] usb0: MAC 36:a6:dd:d3:9d:fd

      [    6.326676] usb0: HOST MAC be:96:08:4e:b5:50

      [    7.474195] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

      [    7.474220] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

      [    7.474240] usb usb1: Product: xHCI Host Controller

      [    7.474259] usb usb1: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

      [    7.474277] usb usb1: SerialNumber: dwc3-host.2

      [    7.480694] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

      [    7.480718] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

      [    7.480739] usb usb2: Product: xHCI Host Controller

      [    7.480758] usb usb2: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

      [    7.480776] usb usb2: SerialNumber: dwc3-host.2

      [  11.254700] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

       

      root@edison_ipa_2:~# lsusb

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

       

      And sometimes, this line appears:

      root@edison_ipa_2:~# [  920.854828] hub 1-0:1.0: activate --> -108

       

      If I switch SW1 back to its original position:

      [  920.754214] usb usb2: USB disconnect, device number 1

      [  920.855043] usb usb1: USB disconnect, device number 1

       

      lsusb failed in that case, nothing surprising...

      unable to initialize libusb: -99

       

      ...but if I tried to connect different devices, Linux does not recognize any of them.

      - two generic keyboard (no change in lsusb and dmesg responses)

      - a mouse (the same...)

      - a MIDI controller (also nothing)

      The only device that looks powered up is the MIDI controller (LED on). Keyboard and mouse LED are off.

      Of course, nothing in /dev or /dev/input.

       

      Concerning MIDI, I added kernel modules for USB Gadget, ALSA and other keyboards and devices (I recompiled everything with Yocto, without extra warnings or errors). I'm porting a project that worked on Galileo.

       

      So, I guess either it is a power issue on the USB port or I missed something

       

      Thank you.

       

       

      Adding extra info:

       

      root@edison_ipa_2:/dev/input# ls /sys/module/
      asix coretemp hci_uart kernel nf_conntrack_ipv4      rfcomm soundcore usb_storage
      auth_rpcgss cpuidle hid keyboard nfs rfkill sparse_keymap usbcore
      bcm4334x devres hidp l2tp_core oprofile scsi_mod spidev usbhid
      bcm_bt_lpm dns_resolver i2c_algo_bit libcomposite otg sdhci spurious vt
      block drm input_polldev lockd pcie_aspm sg sr_mod workqueue
      bluetooth dwc3_intel_mrfl intel_idle loop printk sit stm xhci_hcd
      bnep dynamic_debug intel_mid mmc_core pstore snd sunrpc xz_dec
      brd ehci_hcd intel_mid_dma mmcblk pti snd_aloop sysrq
      bridge evbug intel_scu_watchdog_evo  n_gsm ramoops snd_pcm tcp_cubic
      cdc_ncm firmware_class intel_soc_dump          netconsole random snd_seq u_serial
      cfg80211 fuse intel_soc_pmu netpoll rcupdate snd_seq_oss uinput
      configfs g_multi ipv6 nf_conntrack rcutree snd_timer usb_f_acm


      root@edison_ipa_2:/dev/input# lsmod
      Module Size  Used by
      evbug 12581  0
      usb_f_acm 14335  1
      u_serial 18556  6 usb_f_acm
      g_multi 70540  0
      libcomposite 39245  2 usb_f_acm,g_multi
      bcm_bt_lpm 13676  0
      bcm4334x 574827  0

        • 1. Re: How do we use the host USB port?
          Mwalker

          I was able to use a powered USB hub with the correct switch position setting to see my USB devices.

           

          Powered hub: Gear Head USB 2.0 4 Port hub. It's about $10 at Microcenter.

           

          I've used this same type of hub in 3 different projects, it's pretty solid.

           

          Although, I did have to toggle the switch once while I was playing with hot plugging devices. 

           

          Booting the system with the hub powered on, and devices plugged in, did show all of the devices up and working.


          -Milt

          • 2. Re: How do we use the host USB port?
            Paul.Guermonprez

            Thank you for your answers,

             

            I tested with latest image and USB keyboard and mouse work.

            But it sounds like the yocto source you provide does not generate the exact same image...

            With this new version, I've got an issue about DFU, while booting on my own generated image...

            1 of 1 people found this helpful
            • 3. Re: How do we use the host USB port?
              mstsvetk

              Confirm. Latest image recognizes USB devices directly attached to the USB Host (SW1 switched to the 'host' position)

               

              It recognized my A4 Tech mouse and Plantronics USB audio:

               

              root@edison:~# dmesg | grep usb

              [    0.203976] usbcore: registered new interface driver usbfs

              [    0.204075] usbcore: registered new interface driver hub

              [    0.204285] usbcore: registered new device driver usb

              [    0.762985] usbcore: registered new interface driver asix

              [    0.763078] usbcore: registered new interface driver cdc_subset

              [    0.763212] usbcore: registered new interface driver cdc_ncm

              [    0.765973] usbcore: registered new interface driver cdc_acm

              [    0.766094] usbcore: registered new interface driver usb-storage

              [    0.766282] usbcore: registered new interface driver usbserial

              [    0.766355] usbcore: registered new interface driver pl2303

              [    0.766423] usbserial: USB Serial support registered for pl2303

              [    1.614973] usbcore: registered new interface driver usbhid

              [    1.614993] usbhid: USB HID core driver

              [    4.356719] usb0: MAC c2:3b:28:e4:b8:c6

              [    4.356740] usb0: HOST MAC ee:9d:1b:9a:e1:2d

              [    5.383953] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

              [    5.383977] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

              [    5.383997] usb usb1: Product: xHCI Host Controller

              [    5.384016] usb usb1: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

              [    5.384034] usb usb1: SerialNumber: dwc3-host.2

              [    5.387013] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

              [    5.387037] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

              [    5.387057] usb usb2: Product: xHCI Host Controller

              [    5.387076] usb usb2: Manufacturer: Linux 3.10.17-poky-edison+ dwc-xhci

              [    5.387094] usb usb2: SerialNumber: dwc3-host.2

              [    5.702981] usb 1-1: new full-speed USB device number 2 using dwc3-host

              [    5.730490] usb 1-1: New USB device found, idVendor=09da, idProduct=9066

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

              [    5.730542] usb 1-1: Product: USB Device

              [    5.730561] usb 1-1: Manufacturer: A4TECH

              [    5.740117] input: A4TECH USB Device as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.0/input/input2

              [    5.741341] hid-generic 0003:09DA:9066.0001: input,hiddev0,hidraw0: USB HID v1.11 Keyboard [A4TECH USB Device] on usb-dwc3-host.2-1/input0

              [    5.754202] input: A4TECH USB Device as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.1/input/input3

              [    5.754872] hid-generic 0003:09DA:9066.0002: input,hidraw1: USB HID v1.11 Mouse [A4TECH USB Device] on usb-dwc3-host.2-1/input1

              [    8.573255] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

              [  214.559025] usb 1-1: USB disconnect, device number 2

              [  223.593284] usb 1-1: new full-speed USB device number 3 using dwc3-host

              [  223.617254] usb 1-1: New USB device found, idVendor=09da, idProduct=9066

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

              [  223.617306] usb 1-1: Product: USB Device

              [  223.617324] usb 1-1: Manufacturer: A4TECH

              [  223.625756] input: A4TECH USB Device as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.0/input/input4

              [  223.626964] hid-generic 0003:09DA:9066.0003: input,hiddev0,hidraw0: USB HID v1.11 Keyboard [A4TECH USB Device] on usb-dwc3-host.2-1/input0

              [  223.635752] input: A4TECH USB Device as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.1/input/input5

              [  223.636508] hid-generic 0003:09DA:9066.0004: input,hidraw1: USB HID v1.11 Mouse [A4TECH USB Device] on usb-dwc3-host.2-1/input1

              [ 1406.660772] usb 1-1: USB disconnect, device number 3

              [ 1433.946961] usb 1-1: new full-speed USB device number 4 using dwc3-host

              [ 1434.212542] usb 1-1: New USB device found, idVendor=047f, idProduct=c01f

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

              [ 1434.212595] usb 1-1: Product: Plantronics C320-M

              [ 1434.212613] usb 1-1: Manufacturer: Plantronics

              [ 1434.212632] usb 1-1: SerialNumber: BFD6BE2EB0B89E4CA48981FD63CA09F7

              [ 1434.466854] input: Plantronics Plantronics C320-M as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.3/input/input6

              [ 1434.468074] hid-generic 0003:047F:C01F.0005: input,hiddev0,hidraw0: USB HID v1.00 Device [Plantronics Plantronics C320-M] on usb-dwc3-host.2-1/input3

              root@edison:~# lsusb

              Bus 001 Device 004: ID 047f:c01f Plantronics, Inc.

              Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

              Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

              1 of 1 people found this helpful
              • 4. Re: How do we use the host USB port ? (Yocto-generated image from provided sources ww33)
                Paul.Guermonprez

                Thanks for confirming it works from the posted image. I guess I should wait for an updated version of yocto source, to have my own generated image with usb support?

                Only then, I would be able to add MIDI modules and to validate my project...

                • 5. Re: How do we use the host USB port ? (Yocto-generated image from provided sources ww33)
                  mstsvetk

                  The same problem. Our hand-made WW33 custom build also doesn't see USB devices. We can't move forward too while Yocto-image build process has been fixed .

                  • 6. Re: How do we use the host USB port ?
                    Paul.Guermonprez

                    It sounds like week 35 image source package is the good one!

                    I ran the bitbake command four times to get my image (every time I got an error, I re-ran the command)

                    but now, I have all interfaces in /dev so it sounds good.

                    • 7. Re: How do we use the host USB port ?
                      SLK

                      Hi Paul, can you give me the link from where I can download the week 35 image?

                      Thanks in advance.

                      • 8. Re: How do we use the host USB port ?
                        Yacine85

                        Hi Paul, hi all,

                        For me the keyboard work only when choosing boot option (at the start) after the boot, the USB keybord don't work any more.

                         

                        keyboard_.PNG

                        Regards