Page 1 of 2

[SOLVED] can't connect to REPL

Posted: Fri Jul 17, 2020 12:39 pm
by vince
Hello everybody,

unfortunately I can't connect to REPL.
(my user is already in uucp and dialout groups)

if I try picocom /dev/ttyACM0, I get:

Code: Select all

picocom v2.2

port is        : /dev/ttyACM0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready

*EMRDY: 1
an that's it. No REPL.

Did I miss something?

Thank you in advance!
All the best,

Vince

Re: can't connect to REPL

Posted: Fri Jul 17, 2020 1:03 pm
by Roberthh
I use the baud rate 115200, but for the ACM0 device it may not matter.

Re: can't connect to REPL

Posted: Fri Jul 17, 2020 1:52 pm
by aivarannamaa
Did you try any of following:

* ENTER
* Ctrl+B
* Ctrl+C

?

Re: can't connect to REPL

Posted: Fri Jul 17, 2020 2:25 pm
by vince
I don't know how I did it, but now it works. :shock: :?:

What I do know:

Code: Select all

sudo picocom /dev/ttyACM0
then when "Terminal ready" is showing, press Enter several time to access to REPL.

Maybe it is the sudo and the many Enter press...

Re: can't connect to REPL

Posted: Fri Jul 17, 2020 2:33 pm
by Roberthh
I guess it is the sudo. Try adding your user name to the 'dialout' group. Then it should work without sudo.

sudo usermod -a -G dialout <your_user_name>

Re: can't connect to REPL

Posted: Fri Jul 17, 2020 3:08 pm
by dhylands
Note that you need to logoff and log back in again (or reboot) after changing groups.

You can use the id command to confirm your group membership.

Re: can't connect to REPL

Posted: Mon Jul 20, 2020 4:35 am
by jimmo
Rather than guessing which group (dialout, uucp, etc), just check. For me it's uucp:

Code: Select all

$ ls -la /dev/ttyACM0 
crw-rw---- 1 root uucp 166, 0 Jul 20 13:55 /dev/ttyACM0

Re: can't connect to REPL

Posted: Thu Aug 27, 2020 3:22 pm
by vince
Hi everyone,

now I still have the same problem again... (I don't know how I solved it last time and I don't know how it came back).
I'm in the dialout group, so everything should work actually.

If I start picocom WITHOUT sudo, I get:

Code: Select all

FATAL: cannot open /dev/ttyACM0: Device or resource busy
Any hint? :idea:

here my group(s):

Code: Select all

ls -la /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Aug 27 17:18 /dev/ttyACM0

Re: can't connect to REPL

Posted: Thu Aug 27, 2020 3:39 pm
by Roberthh
You can try accessing as sudo, or you have to add yourself as user to the dialout group.
There might also be another process still using the device.

Re: can't connect to REPL

Posted: Thu Aug 27, 2020 3:44 pm
by vince
Well, with sudo I don't get the error message, but I can't access to the REPL neither...
And I am in the dialout group.

:arrow: How can I figure out which process is using the device, and how to stop it?

Thanks in advance,

Vince