Unable to connect with my board

Posted on
  • I just got my Espruino board rev 1.3b and I'm not able to connect with it on a Linux system. Here is what I'm doing.

    When I connect it to my computer then all LED's are off. If I hold RST button then blue and red glow dimly. When I do the BTN1 + RST thing then the same lights flash for a second and blue light starts pulsing.

    At this point /dev/ttyACM3 shows up in the system so I start the WebIDE and try to flash it with this url: http://www.espruino.com/binaries/espruin­o_1v60_espruino_1r3.bin
    It asks for a serial port and says "Connection Failed" for ttyACM3.

    Then I try with the python script (firmware version 1v60/1r3) and it looks like it's uploading. After it's done I hit the RST button and again, all dark, and no devices added in /dev/.
    That is what I can see on the logs console just after connecting Espruino:

    Apr  9 16:41:42 laptop kernel: [32437.956178] usb 1-1: new full-speed USB device number 3 using uhci_hcd
    Apr  9 16:41:42 laptop kernel: [32438.129187] usb 1-1: New USB device found, idVendor=0483, idProduct=5740
    Apr  9 16:41:42 laptop kernel: [32438.129195] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Apr  9 16:41:42 laptop kernel: [32438.129201] usb 1-1: Product: STM32 Virtual COM Port
    Apr  9 16:41:42 laptop kernel: [32438.129206] usb 1-1: Manufacturer: STMicroelectronics
    Apr  9 16:41:42 laptop kernel: [32438.129211] usb 1-1: SerialNumber: 48E0864B3330
    Apr  9 16:41:42 laptop kernel: [32438.132326] cdc_acm 1-1:1.0: ttyACM3: USB ACM device
    Apr  9 16:41:42 laptop mtp-probe: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:1a.0/us­b1/1-1"
    Apr  9 16:41:42 laptop mtp-probe: bus: 1, device: 3 was not an MTP device
    Apr  9 16:41:45 laptop ModemManager[2522]: <info>  Creating modem with plugin 'Generic' and '1' ports
    Apr  9 16:41:45 laptop ModemManager[2522]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:1a.0/us­b1/1-1' successfully created
    Apr  9 16:41:45 laptop ModemManager[2522]: <warn>  Modem couldn't be initialized: couldn't load current capabilities: Failed to determine modem capabilities.
    Apr  9 16:41:45 laptop NetworkManager[2416]: <warn> (ttyACM3): failed to look up interface index
    Apr  9 16:41:45 laptop NetworkManager[2416]: <info> (ttyACM3): new Broadband device (driver: 'cdc_acm' ifindex: 0)
    Apr  9 16:41:45 laptop NetworkManager[2416]: <info> (ttyACM3): exported as /org/freedesktop/NetworkManager/Devices/­15
    Apr  9 16:41:45 laptop NetworkManager[2416]: <info> (ttyACM3): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
    Apr  9 16:41:45 laptop NetworkManager[2416]: <info> (ttyACM3): deactivating device (reason 'managed') [2]
    Apr  9 16:41:45 laptop NetworkManager[2416]: <info> (ttyACM3): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
    

    When I try with the 1v61/r3 from last night then it's a bit different. After resetting the board I have red and blue glowing dimly but again no extra devices is /dev/ and completely nothing on the logs console.

    Any ideas please?

  • OK so after trying multiple times with all different versions I kind of got it working, that is I'm able to upload 1v60 with a python script. New device ttyACM3 shows up and I can connect with a serial port terminal.

    WebIDE still says "Connection Failed" but I guess I can live without it for now.

  • Try opening and shutting the Web IDE 3 times.

    Stupid I know, but it occasionally happens on Linux for me - I think Chrome gets confused somehow.

  • Try opening and shutting the Web IDE 3 times.

    o_O three?

    When Chrome gets confused on Windows (and does the connect failed thing), you need to exit and restart not only the IDE, but Chrome and any other Chrome apps, as well as physically reconnecting the board. Those are things you might try on Linux, in case Chrome misbehaves in the same way there.

  • @DrAzzy - I have no idea why there is the issue - it appeared with the new serial API Chrome added for v33. Chrome doesn't need a restart - just sometimes you have to open and shut down the Web IDE 3 times first :/

  • @graf, are you using Chrome 34? Since you can see the device showing up, flash it from Python, but can't connect with the Web IDE, you might have landed this problem: http://forum.espruino.com/conversations/­532/#11558 (see post #8 down).

    Basically, if the device shows up in the Web IDE as "ttyACM3" and not "/dev/ttyACM3", there's a good chance this is your problem. See my last post in that thread (#15) for a workaround, but it requires a "dev install" from Github. Or use chrome-stable / 33.

  • @gadicc good spot. If someone else is having the problem as well I'll put a workaround in the new web ide version :)

    @graf, can you confirm if you're getting ttyACM3 and not /dev/ttyACM3?

  • That's correct, it is showing up as just ttyACM3. I'am away from my computer at the moment but later I will try this workaround and report back.

  • And by the way I am using chrome-stable from google repositories, 34 is out of beta now.

  • Strange... I've just updated the Web IDE with a hack for this - can you give it a try?

    You'll have to download from here: https://github.com/espruino/EspruinoWebI­DE
    (There are instructions on the page - you'll get a second icon for the Web IDE with a green banner saying 'Unpacked').

  • Confirmed, the GitHub version is showing the proper path and I can connect to my Espruino. Thank you.

  • Strange... I've just updated the Web IDE with a hack for this - can you give it a try?

    Oh, awesome! That will be quite a pleasure. Btw, according to the Chrome devs, "ttyACM0" (without leading /dev) is valid and the problem is actually that connect() can't connect to it. Apparently.

    @graf, thanks, didn't realize 34 was stable already. Hopefully that means this might get more attention, although it still quite rare. Would be great if you starred the following bug report, and commented with your distribution, kernel and udev details: https://code.google.com/p/chromium/issue­s/detail?id=354782

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Unable to connect with my board

Posted by Avatar for graf @graf

Actions