Serial interface into emonTx3

I’m able to open a serial monitor into the emonTx3 by the NL+CR line terminator is giving me trouble entering the config mode. I’ve tried minicom and I guess there is a way to configure it to issue the necessary EOL character sequence (Can't get emonTx to enter RF config mode - #18 by glyn.hudson)) but I havent been successful. I also see that pio has a serial monitor but my attempts to install pio have all failed:

pi@emonpi:~ $ pio
bash: pio: command not found
pi@emonpi:~ $ sudo pio
sudo: pio: command not found

Can anyone offer any suggestions?

Are you trying to set the line termination in Minicom?. Try the ‘A’ – Add line feed command, and/or ‘U’ – add carriage return. Forget that, it appears to add them to received lines. It appear you need to send “+++^m^j”. If it’s any consolation, I can’t get in with Minicom either, but I’m not familiar with it.
Looking at the manpage: https://linux.die.net/man/1/minicom and the code, it appear that Minicom issues “\n\r” (or maybe nothing?), whereas the emonTx is looking for “+++\r\n” strictly in that order.
Is it possible to set up a macro to send “+++^m^j”, I wonder? Note you have a limited time from “+++’ then [Enter] for config mode” appearing.

I use the Arduino IDE as I’m usually programming or testing, so it’s always available.

I recommend you stay that way. When I tried it years ago, it moved files and screwed my machine up, it took me hours to recover.

Thanks for the moral support Robert. There may be a way to do it in minicom but I don’t find the man page to be very helpful. I did find another utility picocom that has a target available for the Pi and supports the necessary CR → CRLF mapping:

e.g.

picocom /dev/ttyUSB0 --baud 115200 --omap crcrlf

CTRL-A then CTRL-Q to exit

Seems to work reliably.

I was using the Arduino IDE locally but I’m not aware of it having a command-line companion that I can run on the Pi. And I’m trying to work exclusively over the CL via ssh so I don’t need to walk all over creation to make modifications.

And thanks for the warning about pio, it hasn’t been very friendly to me either.

1 Like

:+1:
It works for me too, with your command line. And I’d already got it in my Ubuntu.