Just wrote the first version of serial port shell in Perl using AnyEvent::SerialPort and AnyEvent::ReadLine::Gnu.
The goal was to be able to send commands over serial port as easy or as "normal" as executing commands in bash shell. The code of sersh may also be a good example for async programming in Perl 5 and how easy is to actually make use of GNU Readline in Perl.
To install, first get Perl and cpanm
(for example by `sudo apt-get install cpanm` under Ubuntu/Debian) and then run
`cpanm --sudo App::sersh`. Afterward `sersh /dev/ttyUSB0` command is
available. For a list of options, use `sersh --help`:
Usage:
sersh --baudrate 19200 /dev/ttyUSB1
--baudrate [Int] - dft.: 19200
--parity [none|odd|even] - dft.: none
--databits [5,6,7,8] - dft: 8
--stopbits [1,2] - dft: 1
--handshake [none,rts,xoff] - dft: none