Firmware upgrade issue using IOIODude from linux

109 views
Skip to first unread message

Mark z

unread,
May 16, 2014, 6:33:27 PM5/16/14
to ioio-...@googlegroups.com
 This is my first post and first off I want to thank all involved with the development of the IOIO board, this is a great product. Keep it going!

I'm running into an issue while trying to upgrade the stock firmware of Sparkfun IOIO OTG board from 3.30 that it ships with to the latest 5.0 and I'm not having any luck. This exact issue is mentioned in this post:

https://groups.google.com/forum/#!topic/ioio-users/RUHRBSnx1ys

Here are some more details of this issue. When connected as a device it shows up properly and gets mapped to /dev/IOIO0 and /dev/ttyACM0 but when connected in bootloader mode(boot pin shorted to ground) the OS goes into this endless loop of connecting /disconnecting the device. The key information from syslog is this line where things seem to go wrong:

linux modem-manager[1024]: <warn>  Couldn't probe for capabilities, probably not a GSM or CDMA modem

after this point a disconnect/reconnect occurs. Taking a wild guess at what might be going on here the boot loader code is presenting itself to linux differently than the non boot loader mode which works fine. This test is very repeatable. I've tested this on linux mint 15 and 16 both of which are Ubuntu derivatives. I'd be very curious to know if this is specific to Ubuntu based distros or is a kernel level issue effecting all or a host hardware issue.

Most likely there is no fix for this short of upgrading the bootloader code with a fix which is beyond most users capabilities. So I'm suggesting marking the docs accordingly so people are aware of this issue. Post thought: maybe some udev rules could work around this, I'm not very familiar with them.

Log dump for non bootloader mode that succeeds:

May 16 17:48:11 linux kernel: [  401.604142] usb 7-2: new full-speed USB device number 9 using uhci_hcd
May 16 17:48:11 linux kernel: [  401.784416] usb 7-2: New USB device found, idVendor=1b4f, idProduct=0008
May 16 17:48:11 linux kernel: [  401.784426] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 16 17:48:11 linux kernel: [  401.784433] usb 7-2: Product: IOIO
May 16 17:48:11 linux kernel: [  401.784440] usb 7-2: Manufacturer: IOIO Open-Source Project
May 16 17:48:11 linux kernel: [  401.786498] cdc_acm 7-2:1.0: This device cannot do calls on its own. It is not a modem.
May 16 17:48:11 linux kernel: [  401.786537] cdc_acm 7-2:1.0: ttyACM0: USB ACM device
May 16 17:48:11 linux mtp-probe: checking bus 7, device 9: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-2"
May 16 17:48:11 linux mtp-probe: bus: 7, device: 9 was not an MTP device
May 16 17:48:11 linux modem-manager[1024]: <info>  (ttyACM0) opening serial port...
May 16 17:48:23 linux modem-manager[1024]: <info>  (ttyACM0) closing serial port...
May 16 17:48:23 linux modem-manager[1024]: <info>  (ttyACM0) serial port closed
May 16 17:48:23 linux modem-manager[1024]: <info>  (ttyACM0) opening serial port...
May 16 17:48:29 linux modem-manager[1024]: <info>  (ttyACM0) closing serial port...
May 16 17:48:29 linux modem-manager[1024]: <info>  (ttyACM0) serial port closed

Log dump for bootloader mode (infinite loop):
May 16 17:46:33 linux kernel: [  303.912179] usb 7-2: new full-speed USB device number 3 using uhci_hcd
May 16 17:46:33 linux kernel: [  304.092375] usb 7-2: New USB device found, idVendor=1b4f, idProduct=0008
May 16 17:46:33 linux kernel: [  304.092385] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 16 17:46:33 linux kernel: [  304.092392] usb 7-2: Product: IOIO
May 16 17:46:33 linux kernel: [  304.092399] usb 7-2: Manufacturer: IOIO Open-Source Project
May 16 17:46:33 linux kernel: [  304.094452] cdc_acm 7-2:1.0: This device cannot do calls on its own. It is not a modem.
May 16 17:46:33 linux kernel: [  304.094491] cdc_acm 7-2:1.0: ttyACM0: USB ACM device
May 16 17:46:33 linux mtp-probe: checking bus 7, device 3: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-2"
May 16 17:46:33 linux mtp-probe: bus: 7, device: 3 was not an MTP device
May 16 17:46:33 linux modem-manager[1024]: <info>  (ttyACM0) opening serial port...
May 16 17:46:34 linux modem-manager[1024]: <info>  (ttyACM0) closing serial port...
May 16 17:46:34 linux modem-manager[1024]: <info>  (ttyACM0) serial port closed
May 16 17:46:34 linux modem-manager[1024]: <warn>  Couldn't probe for capabilities, probably not a GSM or CDMA modem
May 16 17:46:34 linux kernel: [  304.448172] usb 7-2: USB disconnect, device number 3
May 16 17:46:36 linux kernel: [  306.644163] usb 7-2: new full-speed USB device number 4 using uhci_hcd
May 16 17:46:36 linux kernel: [  306.824421] usb 7-2: New USB device found, idVendor=1b4f, idProduct=0008
May 16 17:46:36 linux kernel: [  306.824431] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 16 17:46:36 linux kernel: [  306.824439] usb 7-2: Product: IOIO
May 16 17:46:36 linux kernel: [  306.824445] usb 7-2: Manufacturer: IOIO Open-Source Project
May 16 17:46:36 linux kernel: [  306.826500] cdc_acm 7-2:1.0: This device cannot do calls on its own. It is not a modem.
May 16 17:46:36 linux kernel: [  306.826540] cdc_acm 7-2:1.0: ttyACM0: USB ACM device
May 16 17:46:36 linux mtp-probe: checking bus 7, device 4: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-2"
May 16 17:46:36 linux mtp-probe: bus: 7, device: 4 was not an MTP device
May 16 17:46:36 linux modem-manager[1024]: <info>  (ttyACM0) opening serial port...
May 16 17:46:36 linux modem-manager[1024]: <info>  (ttyACM0) closing serial port...
May 16 17:46:36 linux modem-manager[1024]: <info>  (ttyACM0) serial port closed
May 16 17:46:36 linux modem-manager[1024]: <warn>  Couldn't probe for capabilities, probably not a GSM or CDMA modem
May 16 17:46:36 linux kernel: [  307.176120] usb 7-2: USB disconnect, device number 4

Ytai Ben-Tsvi

unread,
May 17, 2014, 10:48:50 AM5/17/14
to ioio-...@googlegroups.com

What's weird is that the bootloader and app are using pretty much the same USB stack. Maybe there's a slight detail in the way they're configured that I've missed.
In any case, this issue seems specific to certain versions of Linux, so the practical workaround for the problem is to do the upgrade on a windows or OSX machine. BTW, can you compare lsusb -v for both modes?

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Mark z

unread,
May 17, 2014, 1:07:17 PM5/17/14
to ioio-...@googlegroups.com
 Hey Ytai,

lsubs -v outputs are identical although you have to catch the right moment where the bootloader mode shows up on lsusb since it's being connected/disconnected constantly.

Normal device:

Bus 007 Device 010: ID 1b4f:0008 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1b4f
  idProduct          0x0008
  bcdDevice            2.00
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

Bootloader mode:


Bus 007 Device 018: ID 1b4f:0008 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1b4f
  idProduct          0x0008
  bcdDevice            2.00
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

Mark z

unread,
May 18, 2014, 4:09:57 PM5/18/14
to ioio-...@googlegroups.com
Update:

I don't own any machines with a physical Windows OS installed so I tried windows 7 running in VMware but it won't expose the com port, tried everything including brute force attempts on com ports 1 -> 15

I next tried running a live cd of the latest Fedora (Fedora 20) with the same results although log messages are slightly different but same exact behavior: non bootloader mode works fine bootloader mode stuck in endless loop of connect/disconnect. If there is a known good linux distro that works please let me know and I'll try it.

From what I understand the IOIO Manager Application can't be used with IOIO OTG correct? sounds like I need to get access to a windows or MacOs box at this point.

Log messages for Fedora 20 attached:

system log:
May 18 15:39:05 localhost kernel: usb 7-1: new full-speed USB device number 28 using uhci_hcd
May 18 15:39:05 localhost kernel: usb 7-1: New USB device found, idVendor=1b4f, idProduct=0008
May 18 15:39:05 localhost kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 18 15:39:05 localhost kernel: usb 7-1: Product: IOIO
May 18 15:39:05 localhost kernel: usb 7-1: Manufacturer: IOIO Open-Source Project
May 18 15:39:05 localhost kernel: cdc_acm 7-1:1.0: This device cannot do calls on its own. It is not a modem.
May 18 15:39:05 localhost kernel: cdc_acm 7-1:1.0: ttyACM0: USB ACM device
May 18 15:39:05 localhost mtp-probe[2637]: checking bus 7, device 28: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1"
May 18 15:39:05 localhost mtp-probe[2637]: bus: 7, device: 28 was not an MTP device
May 18 15:39:05 localhost kernel: usb 7-1: USB disconnect, device number 28
May 18 15:39:05 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (2)
May 18 15:39:05 localhost ModemManager[665]: <warn>  (Plugin Manager) (Cinterion) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial devic...or directory'
May 18 15:39:05 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (2)
May 18 15:39:05 localhost ModemManager[665]: <warn>  (Plugin Manager) (Via CBP7) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device...or directory'
May 18 15:39:05 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (2)
May 18 15:39:05 localhost ModemManager[665]: <warn>  (Plugin Manager) (Nokia) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device tt...or directory'
May 18 15:39:05 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (2)
May 18 15:39:05 localhost ModemManager[665]: <warn>  (Plugin Manager) (Generic) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ...or directory'
May 18 15:39:07 localhost ModemManager[665]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1': not supported by any plugin
May 18 15:39:08 localhost kernel: usb 7-1: new full-speed USB device number 29 using uhci_hcd
May 18 15:39:08 localhost kernel: usb 7-1: New USB device found, idVendor=1b4f, idProduct=0008
May 18 15:39:08 localhost kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 18 15:39:08 localhost kernel: usb 7-1: Product: IOIO
May 18 15:39:08 localhost kernel: usb 7-1: Manufacturer: IOIO Open-Source Project
May 18 15:39:08 localhost kernel: cdc_acm 7-1:1.0: This device cannot do calls on its own. It is not a modem.
May 18 15:39:08 localhost kernel: cdc_acm 7-1:1.0: ttyACM0: USB ACM device
May 18 15:39:08 localhost mtp-probe[2641]: checking bus 7, device 29: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1"
May 18 15:39:08 localhost mtp-probe[2641]: bus: 7, device: 29 was not an MTP device
May 18 15:39:08 localhost kernel: usb 7-1: USB disconnect, device number 29
May 18 15:39:08 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (19)
May 18 15:39:08 localhost ModemManager[665]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1
May 18 15:39:09 localhost ModemManager[665]: <warn>  (ttyACM0) could not open serial device (2)
May 18 15:39:09 localhost ModemManager[665]: <warn>  (Plugin Manager) (Cinterion) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial devic...or directory'
May 18 15:39:09 localhost ModemManager[665]: <warn>  (Plugin Manager) (Via CBP7) [ttyACM0] error when checking support: '(Via CBP7) Missing port probe for port (tty/ttyACM0)'
May 18 15:39:09 localhost ModemManager[665]: <warn>  (Plugin Manager) (Nokia) [ttyACM0] error when checking support: '(Nokia) Missing port probe for port (tty/ttyACM0)'
May 18 15:39:09 localhost ModemManager[665]: <warn>  (Plugin Manager) (Generic) [ttyACM0] error when checking support: '(Generic) Missing port probe for port (tty/ttyACM0)'
May 18 15:39:10 localhost ModemManager[665]: <warn>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1': not supported by any plugin

lsusb of non bootloader mode:

[liveuser@localhost mark]$ lsusb -v -d 1b4f:

Bus 007 Device 030: ID 1b4f:0008 
Couldn't open device, some information will be missing

Ytai Ben-Tsvi

unread,
May 19, 2014, 11:59:32 AM5/19/14
to ioio-...@googlegroups.com
I've previously tested on Ubuntu. Not sure which version, probably 12.
Another thing you might try is oscillator recalibration (described on the IOIODude wiki page). Otherwise, yes you'll probably need a Windowns / OSX machine for this process.
Let me now if recalibration helped, because several users have had a similar problem.


--

Mark z

unread,
May 19, 2014, 9:38:53 PM5/19/14
to ioio-...@googlegroups.com
I ran the test with oscillator recalibration with no improvement in condition. I reset the calibration twice once for a test connecting in bootloader mode and once for non bootloader. These tests were done with latest firmware (5.0) as I managed to get access to an OSX machine yesterday and upgraded the firmware.

Ytai Ben-Tsvi

unread,
May 20, 2014, 2:34:01 AM5/20/14
to ioio-...@googlegroups.com
Thanks for the test!
There's no configuration wipe in app mode. Are you sure you went through the correct procedure? Did you get the fast blinking light when powering the IOIO without a USB connection after the wipe?
Sorry to nag, but it would be really cool if we could undoubtedly eliminate this as a possible cause.


Mark z

unread,
May 20, 2014, 1:00:48 PM5/20/14
to ioio-...@googlegroups.com
Here's the process. I hooked up the board to a 5v adapter after connecting boot pin to Gnd and pin1 to Gnd simultaneously. I observed the stat led flash rapidly, I then disconnected everything jumpered boot pin to gnd and connected via usb cable to linux box.

For the second test I repeated the reset process but connected the board as is without anything jumpered. Don't think there was any merit in this test but I did it anyway and linux identified device properly.

I was thinking if there is absolutely no difference in the code that establishes the handshake to the PC then maybe somehow the timing of manually removing the boot pin jumper by hand after connection is causing an issue. I'm going to try another test where I put the board into boot loader mode using the 5v adapter, remove the jumper and then connect the usb cable while the wall charger keeps the board awake.

Ytai Ben-Tsvi

unread,
May 20, 2014, 9:18:08 PM5/20/14
to ioio-...@googlegroups.com

Good idea! Let me know how that goes.

--

Mark z

unread,
May 26, 2014, 1:21:59 AM5/26/14
to ioio-...@googlegroups.com
I just tried that test and it makes no difference, still stuck in connect/disconnect.

I think the next thing to try is to load up a bare bones firmware that is as nearly identical to the bootloader as possible and go from there. I haven't read up on firmware coding so this problem is quickly moving out of my league.

Ytai Ben-Tsvi

unread,
May 28, 2014, 11:48:53 AM5/28/14
to ioio-...@googlegroups.com
Thanks for the data! I'll definitely use it when it's time to fix this issue. For now,it does not seem like a huge problem, as it seems to be specific to a small number of Linux versions.


--

Adam Newman

unread,
Nov 30, 2015, 12:16:13 AM11/30/15
to ioio-users
I see this had been dead for over a year, but it ranks first in Google for me. If you are reading this now, you probably didn't see the modem manager blacklist steps here https://github.com/ytai/ioio/wiki/Using-IOIO-With-a-PC#connecting-the-ioio-as-a-serial-port 

The system is trying to probe this as a modem and at some point it sends a command that causes the IOIO bootloader to disconnect and reconnect.

Ytai Ben-Tsvi

unread,
Nov 30, 2015, 12:20:53 AM11/30/15
to ioio-...@googlegroups.com

Thanks for pointing this out!
Since you probably have a setup that needs this extra udev step, can you please try to check whether there is any set of rules we can add to the stock rules files to make it work without having the user do this explicitly, and then we can remove this ugly step from the wiki?
Thanks again!

Reply all
Reply to author
Forward
0 new messages