-
• #2
Chrome serial
Is his version of Chrome up to date? If it is then I think this could be a
udev
issue - I don't know enough about FreeBSD (or anything, actually) but I think on Linux chrome checks udev to figure out what it should display and what it shouldn't.Not sure if FreeBSD has udev or not, but you might be able to write a udev rule that sets the Espruino to be the correct class of device. udev rule for espruino on linux here if you need to see how to match it.
If you figure it out, please let me know - I can update the docs.
if you were to type hello, hell would appear. If you then typed !, the o would appear, but not the !.
Have you updated it to 1v80? This was a bug that got fixed in the most recent version :)
-
• #3
I'm fairly sure this was on 1v80 on the Pico we were using yesterday (as it was the one I've been working with on the ESP8266) but the one I gave him to keep might be a bit older. I'll get him to check.
Apparently updating Chrome didn't help. I'll pass these ideas along though, thanks!
-
• #4
This is with Chromium 45.0.2454.93 on FreeBSD 10.2-RELEASE #0 r286666
Running unpacked from github. I'm guessing it's FreeBSD not seeing the serial ports.
Which are:
crw-rw---- 1 root wheel 0xa3 28 Sep 01:06 /dev/ttyU0
crw-rw---- 1 root wheel 0xa4 28 Sep 01:06 /dev/ttyU0.init
crw-rw---- 1 root wheel 0xa5 28 Sep 01:06 /dev/ttyU0.lock
crw-rw---- 1 uucp dialer 0xa6 28 Sep 01:06 /dev/cuaU0
crw-rw---- 1 uucp dialer 0xa7 28 Sep 01:06 /dev/cuaU0.init
crw-rw---- 1 uucp dialer 0xa8 28 Sep 01:06 /dev/cuaU0.lockI'm in wheel and dialer but I'm guessing this is either compiled without serial support or just doesn't know which files to look at. I'll take another look shortly.
Error in response to serial.getDevices: TypeError: Cannot read property 'map' of undefined at Object.callback (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/EspruinoTools/core/serial_chrome.js:68:23) at Object.getPorts (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/EspruinoTools/core/serial_chrome.js:57:19) at getPorts (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/core/menuPortSelector.js:66:28) at createPortSelector (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/core/menuPortSelector.js:109:5) at HTMLAnchorElement.toggleConnection (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/core/menuPortSelector.js:47:7) at HTMLAnchorElement.jQuery.event.dispatch (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/libs/jquery-1.11.0.js:4624:9) at HTMLAnchorElement.jQuery.event.add.elemData.handle (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/libs/jquery-1.11.0.js:4292:28) 20 extensions::uncaught_exception_handler:8 Error in response to serial.getDevices: TypeError: Cannot read property 'map' of undefined at Object.callback (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/EspruinoTools/core/serial_chrome.js:68:23) at Object.getPorts (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/EspruinoTools/core/serial_chrome.js:57:19) at getPorts (chrome-extension://ejpbeoplhhjcdlbpihiaffkgdegfdmpj/js/core/menuPortSelector.js:66:28)
-
• #5
I note that this was 1.75, but I just flashed it to 1.80. It doesn't make any difference with screen and the one character behind issue - maybe that's just FreeBSD as well ?
Maybe I should set half duplex or some flow control or ...
-
• #6
Not sure, flow control is unlikely to be an issue, but it should be off. Frustrating as I know the one character thing was an issue on Windows and Chromebook initially and it seemed to have been fixed by a big USB rewrite in 1v80. I wonder if WireShark could tell you if the characters are actually being sent and received from USB (eg, whether it's Espruino's problem or the OS's).
Interesting about the crash in the Web IDE - thanks for posting that. In normal Linux, if there are no devices then an empty array is returned from
chrome.serial.getDevices
(and the chrome docs don't mention anything different), so looks like Chrome's serial port detection might be broken somehow?
I've given my best mate a spare Espruino Pico to play with. He's a FreeBSD user.
Anyway, apparently, in the Web IDE the popup to select serial port is just stuck there saying "Loading..." (or similar; not sure) and not displaying a list of choices. I tried doing the symlink trick of
cd /dev; sudo ln -s ttyU0 ttyACM0
just in case it was a pattern recognition thing, but no luck.Connecting via
screen /dev/ttyU0 9600
works to some extent, but the most recent character is not echoed; if you were to typehello
,hell
would appear. If you then typed!
, theo
would appear, but not the!
.I expect this is more to do with issues with FreeBSD's serial driver, the version of
screen
installed, and Chrome's serial code, than it is to do with Espruino per se, but on the off-chance that someone's used FreeBSD with the standard Espruino setup, I thought I'd ask on his behalf before we investigate much further.