1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Arduino

Discussion in 'Support Area' started by HelenF, Apr 16, 2014.

  1. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    With a hub on the main USB port, the Uno and Leonardo appear as /dev/ttyACMx, and the Nano-compatible appears as /dev/ttyUSBx. I didn't have to install anything for them to do that.

    Connecting to the OTG port, the Uno works fine, the Leonardo appears in lsusb but doesn't create a serial port, and the Nano doesn't appear in lsusb. If I previously flashed the Blink program, they all run it correctly when plugged in.

    Any ideas what might be wrong here?
     
    Tags:
  2. Binky

    Binky Death's Steed Staff Member

    Joined:
    May 28, 2003
    Messages:
    6,648
    Location:
    16A (TO)
    Have you tried with a (possibly powered?) hub on the otg port?
     
  3. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Good idea. The Leonardo works on the OTG port with an unpowered hub. The Nano works with a powered hub and not an unpowered one, so that might be a power issue. (Can't test with the same hub, because the Pandora doesn't like my powered hub without its power supply.)
     
    Last edited by a moderator: Apr 16, 2014
  4. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    7,629
    Location:
    Somewhere off the coast of the EU
    I'm confused - in the OP you said the Leonardo, connected to the OTG port (directly, through an OTG adaptor I assume) doesn't create a serial port. But connected through an unpowered hub it works fine, including creating a serial port. Is that the case?
     
  5. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Exactly so - I can't imagine why. And that means the issue with the Leonardo is not about current limit.

    The Nano shouldn't need more current either, but it's an unofficial one so maybe it's not right. Is there any way to check whether it got shut down because of current? But actually, that can't be it, because it's still powered up and running its program.

    I guess if the voltage dropped a bit, that might stop the FTDI while the ATmega was still running. Might be able to test that.

    ...OK, probably not that. I'm measuring 4.83V, and the FT232R is supposed to work down to 4.0V. The ATmega328 is supposed to work down to 1.8V though.
     
    Last edited by a moderator: Apr 17, 2014
  6. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    7,629
    Location:
    Somewhere off the coast of the EU
    Probably something to do with USB negotiation. What surprised me when I started digging into USB is that it appears that USB hubs aren't transparent in the way that Ethernet hubs are. When you plug in the Leonardo to the hub, I suspect it does whatever handshaking is needed with the hub itself, which then proceeds to hand it down to the computer. It could be iffiness in this handshaking that the hub is able to handle, but the OS isn't, or at least that's my best guess at this juncture.
     
  7. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    The Leonardo is an odd one: the user program runs on the same processor as the USB, and during startup it breaks the USB connection and re-establishes it when switching from running the bootloader to the user program. It fails on my Windows computer the first time I plug it into a different USB port. On the Pandora OTG port, it does appear to be creating the serial port for the couple of seconds it's running the bootloader, and just the second one fails.

    It's a pity about the Nano - that one is meant to be small, so I wanted the connection to be small too.

    I received this board, which has the same USB chip as the Nano, and I'm glad to say is working fine on the OTG port.

    http://www.ebay.co.uk/itm/251353615134
     
    levi likes this.
  8. FBnil

    FBnil ¡sɥʇuoɯ oʍʇ uı ɐɹʎԀ

    Joined:
    Dec 14, 2012
    Messages:
    1,891
    Location:
    Yurp
  9. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Not sure what to list it as. The exact board I have is the product of a single Chinese eBay seller. It appears to use the PCB design from the old SparkFun board (or a modification of it), even though the description and linked Eagle file are from the new one.

    https://www.sparkfun.com/products/retired/9115

    They probably all work the same in practice, though we can't be sure without testing them all.

    It would be a "USB to serial adapter" on the compatibility list, though it also potentially has many other functions using libftdi. (I got the hello world working: open a connection and read the chip ID. But I don't have any more time for that at the moment.)
     
  10. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Does anyone have a genuine Gravitech Arduino Nano they could test on the OTG port? Or even another clone, since it might be different from mine.
     
    Last edited by a moderator: May 1, 2014
  11. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,773
    Just tried with the UNO on the latest Zaxxon, no tty* appears, powered HUB or not.

    Do I have to manually load some module ?
     
  12. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Updated my OS and the Uno still works for me, either with a hub on the main USB port, or on the OTG port.

    ----

    And I updated the wiki a while ago, but in case anyone else comes via this thread:

    The Leonardo actually does have a power issue - it wrongly declares 500mA.
    https://github.com/arduino/Arduino/issues/4691
    There must have been something odd about my old hub, such as claiming to be powered when it wasn't, but it broke so I can't check.

    For anyone wanting a small Arduino-compatible, the newer clone Nano with the CH340 USB chip is very cheap and easy to get, and works great either with a hub on the main USB port, or on the OTG port.
     
  13. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,773
    Can you paste lsmod and dmesg with the UNO please ?
     
  14. HelenF

    HelenF Member

    Joined:
    Jun 22, 2013
    Messages:
    338
    Location:
    UK
    Code:
    Module                  Size  Used by
    ehci_hcd               35053  0 
    aes_generic            28028  2 
    bluetooth             131410  0 
    arc4                    1005  2 
    g_cdc                  30359  0 
    wl1251_sdio             3945  0 
    wl1251                 67754  1 wl1251_sdio
    mac80211              204798  2 wl1251_sdio,wl1251
    cfg80211              150494  2 wl1251,mac80211
    bufferclass_ti          4414  0 
    omaplfb                 6391  0 
    pvrsrvkm              132975  2 bufferclass_ti,omaplfb
    snd_seq                41483  0 
    snd_seq_device          4435  1 snd_seq
    snd_pcm_oss            33554  0 
    snd_mixer_oss          13345  1 snd_pcm_oss
    ipv6                  227126  10 
    fuse                   56654  2 
    ads7846                 8678  0 
    
    
    [  116.763702] usb 1-1: new full-speed USB device number 2 using musb-hdrc
    [  116.914398] usb 1-1: device v2341 p0001 is not supported
    [  116.914611] usb 1-1: New USB device found, idVendor=2341, idProduct=0001
    [  116.914611] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
    [  116.914611] usb 1-1: Product: Arduino Uno
    [  116.914642] usb 1-1: Manufacturer: Arduino (www.arduino.cc)
    [  116.914642] usb 1-1: SerialNumber: 64938323231351F08160
    [  117.483398] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
    [  117.485595] usbcore: registered new interface driver cdc_acm
    [  117.485595] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    
    
    Module                  Size  Used by
    cdc_acm                13866  0 
    ehci_hcd               35053  0 
    aes_generic            28028  3 
    bluetooth             131410  0 
    arc4                    1005  2 
    g_cdc                  30359  0 
    wl1251_sdio             3945  0 
    wl1251                 67754  1 wl1251_sdio
    mac80211              204798  2 wl1251_sdio,wl1251
    cfg80211              150494  2 wl1251,mac80211
    bufferclass_ti          4414  0 
    omaplfb                 6391  0 
    pvrsrvkm              132975  2 bufferclass_ti,omaplfb
    snd_seq                41483  0 
    snd_seq_device          4435  1 snd_seq
    snd_pcm_oss            33554  0 
    snd_mixer_oss          13345  1 snd_pcm_oss
    ipv6                  227126  10 
    fuse                   56654  2 
    ads7846                 8678  0 
     
    Linux-SWAT likes this.
  15. Linux-SWAT

    Linux-SWAT Advanced Member

    Joined:
    Feb 13, 2010
    Messages:
    7,773
    Thank you, this is helpful.
    --- Double Post Merged, Feb 19, 2017, Original Post Date: Feb 19, 2017 ---
    Turns out that I had a cable problem. I can now connect my OP to my UNO on the OTG port, and without a hub.
    Thanks again.
     

Share This Page

Loading...