Pyserial3 and miniterm

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Pyserial3 and miniterm

Post by marfis » Mon Oct 10, 2016 5:30 pm

For those who are using pyserial's miniterm... it took me a while to figure this out:

Since pyserial v3 the escape sequence are not processed by default. uPy makes heavy use of escape sequence so the repl is basically unusable - except you pass the

Code: Select all

-f direct
parameter to the miniterm call.

Thanks to the pyserial maintainer for this tip...

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: Pyserial3 and miniterm

Post by cefn » Tue Aug 22, 2017 5:52 pm

Curious if this is the same as the --raw flag which I use.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Pyserial3 and miniterm

Post by pythoncoder » Wed Aug 23, 2017 7:13 am

Thanks for that :D

[EDIT]
Later. Both these are an improvement but they aren't perfect, at least with my ESP32. Attempting to recall and edit a previously entered line doesn't work at all reliably.
Peter Hinch
Index to my micropython libraries.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pyserial3 and miniterm

Post by Roberthh » Wed Aug 23, 2017 7:49 am

Hi @pythoncoder. Why don't you use a serial terminal intended for that purpose, like picocom, minicom or even screen? I thought you did.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Pyserial3 and miniterm

Post by pythoncoder » Wed Aug 23, 2017 4:06 pm

I use rshell almost exclusively which I find awesome for MicroPython.

There are odd occasions when I need a dumb terminal. As miniterm is in Python I hacked it to do a few things like keyboard macros so I use it on occasion. But I'll use any terminal application available including screen.
Peter Hinch
Index to my micropython libraries.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Pyserial3 and miniterm

Post by dhylands » Wed Aug 23, 2017 5:30 pm

Under linux, I use usb-ser-mon.py when I don't use rshell: https://github.com/dhylands/usb-ser-mon ... ser-mon.py

Rather than specify a port (like /dev/ttyACM0) it uses attributes from the usb device, like the manufacturer name, etc to connect. The --list option will show all of your connected USB srial devices.

Kelly Petersen
Posts: 4
Joined: Thu Apr 19, 2018 7:10 am

Re: Pyserial3 and miniterm

Post by Kelly Petersen » Thu Apr 19, 2018 7:52 am

In working with macros, rshell is simply irreplaceable

Post Reply