-
• #2
As suggested here: http://www.espruino.com/Quick+Start for linux run:
sudo adduser _YOUR_USERNAME_HERE dialoutand then try again (if that doesn't already solve it, which for me it didn't) do this:
sudo chmod ugo+rw /dev/ttyACM0
and then try again, note that if that solves it for you, you'll have to run this everytime you reconnect the board (so it should only be used as a temporary solution)
-
• #3
Shoot, the dialout step is what I needed. Sorry about that!
-
• #4
Thanks for your help NoUsername, glad you guys got it sorted out. AndrewK, did you need the chmod?
If you need any other help, just let me know.
-
• #5
Just to let you know, i've tried it on linux Fedora 20 (in a VM), and I needed too the chmod command. Plus, if I go to bootloader mode for firmware update, or if i press reset, connections to espruino then fails, even after quitting IDE, logout or reboot. But I entered the chmod command again after bootload mode or reset, and it worked.
-
• #6
If you don't disconnect cleanly, or reset into bootloader without disconnecting, the ide will nor reconnect until you exit not only the ide, but all chrome web browser windows (at least on Windows). I switched to Firefox because of this on my dev machine...
-
• #7
@DrAzzy, I develop mainly on Linux and it seems that Linux machines don't have this problem (at least the Ubuntu ones I've been using).
@pango My guess is you're having problems because you're running in a VM (under Windows?) and it may be windows' USB support that is causing you problems rather than Linux itself...
-
• #8
Actually the VM is on a Mac (with old osx snow leopard), with Virtual Box. But you're certainly right, I didn't try on a "real" Linux. :)
-
• #9
My issue was a different one, but this seems to be the right place to consolidate.
- I pick the correct port, click the connect button, and get "Connect Failed".
- I am in the dialup group, and
picocom --baud 9600 --flow n /dev/ttyACM0
works great - After a while, the red LED comes on and stays lit. But this makes no difference to 1 & 2.
In my case, I found that the problem went away when downgrading from Chrome Beta (34.0.1847.60-1) to Chrome stable (33.0.1750.152-1). Relevant parts from the debug log:
[14715:14715:0315/082109:INFO:CONSOLE(65)] ">>> Connecting", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_status.js (65) [14715:14715:0315/082109:INFO:CONSOLE(185)] "Set Slow Write = true", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_serial.js (185) [14715:14715:0315/082109:INFO:CONSOLE(58)] "Unable to open device (connectionInfo=undefined)", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_serial.js (58) [14715:14715:0315/082109:INFO:CONSOLE(65)] ">>> Connect Failed.", source: chrome-extension://bleoifhkdalbjfbobjackfdifdneehpo/js/espruino_status.js (65)
It turns out, that this is because in chrome beta/34, the device names are being reported without
/dev/
. An easy fix, if you want to run beta, is to use the dev version of Espruino IDE (from github, installed as unpacked), right-click on the port name, inspect the option element, and change the value to include/dev/
. As best I can tell, it's a chrome bug, so probably not worth working around this in EspruinoIDE until we know more (according to the API,getDevices()
should return paths that can be used inconnect()
, and that doesn't seem to be true at the moment). Possibly related to chromium #334698. - I pick the correct port, click the connect button, and get "Connect Failed".
-
• #10
Great, thanks! Thanks for reporting it on that Chrome Bug as well (I'd seen the updates but had assumed it didn't affect me!)
It seems to be a bit of a cat and mouse game at the moment - I just get something working and then Google change Chrome and break it :(
-
• #11
Haha, yeah, I know the feeling :) Actually I'd love you to check if this does in fact affect you in chrome-beta / 34, and also what distribution/kernel/udev you're on.
-
• #12
Hmm... Works fine for me on 34.0.1847.45 beta...
$ uname -a Linux 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
-
• #13
See? Your luck is improving. Now my luck is the problem :)
Can you also give the output of
dpkg -l udev
?
Thanks :) -
• #14
ii udev 175-0ubuntu9.4 rule-based device node and kernel event manager
-
• #15
Thanks... this is the "latest" bug report I opened on the issue :) https://code.google.com/p/chromium/issues/detail?id=354782
I just wanted to update on an "easyish" workaround for the new IDE. It updates the port list every second, so it's a bit hard to inspect the element and make the changes by hand. But one can open up a JavaScript console and use this code to change/open the port after clicking on the connect icon:
$('ul.port-list').find('[data-port]').eq(0).data('port', '/dev/ttyACM0').click();
As before, this requires using an unpackaged version of the Chrome App (e.g. from github), but it's still more comfortable than editing the source on each new release.
Hello,
Just got my Espruino today and I'm having trouble connecting with the Web IDE. I am running Ubuntu 12.04
At first I thought I had the wrong USB port (I have lots) but I notice that when Espruino is not connected and I refresh, /dev/ttyAMC0 disappears, so I assume that is the correct one.
When Espruino is connected, there is a red solid light. But I get "connect failed" from the web IDE when trying to access AMC0. I tried a different USB port, and a different microUSB cable!
I am from an academic group that are sharing a few boards, so this board may or may not have been tinkered with already since it arrived.