1 2 3 Previous Next 36 Replies Latest reply on Mar 26, 2015 9:43 PM by shenli

    Intel Edison USB host mode

    valentin8251

      Hi,

       

      I'm using the Intel Edison for a project and need to make the Intel Edison a USB host.

       

      Following scenario: Edison on a mini-breakout board is connected as a host to an USB-Hub with external power supply.

      Attached to this hub is a flash drive.

      I want to access and mount the flash drive but it doesn't show up as a "sda" nor lsusb works ( error -99).

       

      I would really appreciate your help in setting that up. If it detects the flash drive as sda or something else I'm able to mount it on my own.

       

       

      Thanks,

        • 1. Re: Intel Edison USB host mode
          mhahn

          probably doesn't make much sense if nothing is shown in lsusb - otherwise I'd have suggested to run "udevadm monitor" and check whether anything gets triggered when you plug in the flash drive

          • 2. Re: Intel Edison USB host mode
            valentin8251

            Nothing shows up.

            Do you have to switch on something. In linux or change a jumper on the mini-breakout board?

            At least I've heard that on the other extension board for Arduino one has to switch a jumper to a different position. Although I couldn't find anything within the hardware guide. 

            • 3. Re: Intel Edison USB host mode
              mmi

              I disabled in /etc/network/interfaces the usb iface used for ethernet (192.168.2.15) because i don't need it. Could it be a reason for your problem (i'm not sure) ?

              • 4. Re: Intel Edison USB host mode
                valentin8251

                For some reason I don't have the network directory within etc.

                Did you install any external packages??

                • 5. Re: Intel Edison USB host mode
                  mhahn

                  I guess @mmi is talking about the Debian flavor. On the default Yocto image you'd find a service file somewhere in /usr/lib/systemd/system which would set the USB to 192.168.2.15 (don't have my Edison up and running right now so can't check the exact details)

                  • 6. Re: Intel Edison USB host mode
                    valentin8251

                    Thanks @mhahn

                    Unfortunately there is no service file in that directory.

                    Do i need to install any usb driver to make the Edison a host?  Because usually it acts as a slave when I plug it into my desktop pc. 

                    Screen Shot 2014-11-19 at 4.09.27 PM.png

                    Thanks,

                    • 7. Re: Intel Edison USB host mode
                      mhahn

                      so it's probably /lib/systemd/system

                      • 8. Re: Intel Edison USB host mode
                        valentin8251

                        okay i followed your instructions but it didn't change anything.. Im still not able to detect a flash drive!

                        Here's a screenshot of my /dev section. Maybe I'm just blind and can't find the drive.

                        Screen Shot 2014-11-20 at 4.10.06 PM.png

                         

                        Thanks,

                        • 9. Re: Intel Edison USB host mode
                          mweal

                          It looks like you have a bad USB micro adapter (I assume you have one of these between the edison and your flash drive) that does not ground the USB ID pin.  I've seen a lot of these in the past.

                           

                          The mini-breakout board breakout board uses the ID pin to select between host and device where the extension board for Arduino uses a switch.

                           

                          When you get a good cable you should also see usbmon1 and usbmon2 in the dev directory.

                           

                          I suppose as a hack you could just short the ID pin to ground at the USB micro connector.

                           

                          I have also seen it where the mini-breakout board breakout board does not detect the ID pin properly after a soft reset.  Try powering the Edison up with the device connected, or unplug and plug the microusb connector after the Edison has rebooted (I cant' remember the specifics of this problem).

                           

                          Hope this helps.

                          1 of 1 people found this helpful
                          • 10. Re: Intel Edison USB host mode
                            deium

                            I know that David_J_Hunt has accomplished an otg usb connection using the Mini Breakout board.

                            Perhaps his project can provide some insights

                             

                            First Intel® Edison project – DSLR Camera Controller

                            • 11. Re: Intel Edison USB host mode
                              valentin8251

                              Thanks for your answers.

                               

                              mweal I took a look at my USB adapter and the ID pin is indeed not grounded.

                              So I'll give that a try tomorrow and will report back.

                               

                              And I already took a look at David_J_Hunt project. He doesn't describe to way he connected the camera via USB.

                              But I also couldn't get his way of powering the Edison to work. He applied 5V at an input which is suppose to work with 7-12V.

                              • 12. Re: Intel Edison USB host mode
                                deium

                                From David's project page:

                                The USB OTG cable was needed for the connection to the camera, but the usual ones had a large usb connector on the end, into which you can plug another cable. That was too bulky ( and not very nice looking) for what I needed, so I split apart a couple of regular USB cables and made my own OTG cable by shorting pins 1 and 2 together. Much neater than an off-the-shelf solution.

                                from David's paragraph above the previous one:

                                For this initial prototype, I have a DC-DC converter in there to convert from the LiPo’s 3.7 v to 5V, so that I can feed in the power to the ‘external’ power input on the Edison board. The breakout board can take a battery directly, but then the USB port will not work in host mode, which I needed for connecting the DSLR. The DC-DC converter allows me to get around this limitation, and it still all fit into the small box.

                                His method was to short pins 1 and 2 together on a regular cable to create his custom cable, and he used to DC-DC converter so it would give enough power to power his OTG.  Answering both points.

                                1 of 1 people found this helpful
                                • 13. Re: Intel Edison USB host mode
                                  David_J_Hunt

                                  The Edison will show -99 for 'lsusb' when the host mode is disabled. This may be one of a couple of reasons:

                                   

                                  1. External power is not being used, i.e. you're using battery power. The board needs 5V or greater for usb host mode, so power via the 5v USB (but you want to use that for the camera, so no go there), or the 7-15v supply.
                                  2. You're not using a USB-OTG cable. i.e. one with pins 1 and 2 shorted. There's a gotcha here, in that I found some cables that looked like OTG cables, but were not, they were simply adapters without those pins shorted. Once I purchased a cable that said OTG on the packaging, the error -99 went away, as I was able to see my camera. I then made up a custom cable with the correct connectors on each end for my camera project to make things all nice and neat.

                                   

                                  So once you're using external power and a USB-OTG cable, you should be able to see external devices with lsusb.

                                  Rgds,

                                  Dav.e

                                  • 14. Re: Intel Edison USB host mode
                                    valentin8251

                                    Okay I just connected the ID-pin to ground.

                                    But error -99 is still showing up. Although my USB-hub now recognizes the Edison as a host. 

                                    Do I have to activate the host mode somewhere within Linux as well?

                                    I'm very new to developing with Linux so please excuse these questions.

                                     

                                    Thanks,

                                    1 2 3 Previous Next