mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Formating, minor rewording
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
Notes about running picocom on BSD-based OSes
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
by Joe Merten (https://github.com/JoeMerten)
|
||||||
|
|
||||||
Test environment
|
Test environment
|
||||||
================
|
================
|
||||||
|
|
||||||
@ -10,17 +16,25 @@ Test environment
|
|||||||
- macOS 10.12 Sierra (native on Macbook Pro)
|
- macOS 10.12 Sierra (native on Macbook Pro)
|
||||||
- Kubuntu 16.04 (native on Macbook Pro)
|
- Kubuntu 16.04 (native on Macbook Pro)
|
||||||
- all above on Intel x86 64 Bit
|
- all above on Intel x86 64 Bit
|
||||||
- Cygwin 5.1 on Windows XP 32 Bit host
|
|
||||||
- Ftdi FT232R, max 1MBaud (chip can 3MBaud, but hw rs232 level shifter is specified for just 1MBaud)
|
|
||||||
- Prolific PL2303, max 230kBaud (chip can 12MBaud, but hw rs232 level shifter is specified for just 230kBaud)
|
|
||||||
- Unknown Asus onboard (16550 compatible?) uart chip, max 115kBaud.
|
|
||||||
Just minor testing with this uart, because it seems that it don't supports non standard baudrates.
|
|
||||||
|
|
||||||
For Cygwin, I'd just checked if it will build and ran `picocom -h`. I'd personally failed opening a serial port within Cygwin.
|
- Cygwin 5.1 on Windows XP 32 Bit host
|
||||||
Note that for Cygwin it needs to implement a `cfmakeraw()` replacement. See also:
|
|
||||||
https://cygwin.com/ml/cygwin/2008-09/msg00295.html
|
- Ftdi FT232R, max 1MBaud (chip can 3MBaud, but hw rs232 level shifter
|
||||||
https://sourceforge.net/p/ser2net/patches/9/
|
is specified for just 1MBaud)
|
||||||
https://sourceforge.net/p/ser2net/patches/_discuss/thread/8b87fdad/ed37/attachment/ser2net-2.2-cygwin.patch
|
- Prolific PL2303, max 230kBaud (chip can 12MBaud, but hw rs232 level
|
||||||
|
shifter is specified for just 230kBaud)
|
||||||
|
- Unknown Asus onboard (16550 compatible?) uart chip, max 115kBaud.
|
||||||
|
Just minor testing with this uart, because it seems that it don't
|
||||||
|
supports non standard baudrates.
|
||||||
|
|
||||||
|
For Cygwin, I'd just checked if it will build and ran `picocom
|
||||||
|
-h`. I'd personally failed opening a serial port within Cygwin.
|
||||||
|
Note that for Cygwin it needs to implement a `cfmakeraw()`
|
||||||
|
replacement. See also:
|
||||||
|
|
||||||
|
https://cygwin.com/ml/cygwin/2008-09/msg00295.html
|
||||||
|
https://sourceforge.net/p/ser2net/patches/9/
|
||||||
|
https://sourceforge.net/p/ser2net/patches/_discuss/thread/8b87fdad/ed37/attachment/ser2net-2.2-cygwin.patch
|
||||||
|
|
||||||
|
|
||||||
Accessing serial ports (examples)
|
Accessing serial ports (examples)
|
||||||
@ -51,16 +65,19 @@ Accessing serial ports (examples)
|
|||||||
Manual controlling handshake lines
|
Manual controlling handshake lines
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
All above listed Bsd variants (FreeBsd, OpenBsd, NetBsd, Dragonfly and even macOS) fail when trying to control the handshake lines
|
All above listed Bsd variants (FreeBsd, OpenBsd, NetBsd, Dragonfly and
|
||||||
(rts and dtr) using the `tcsetattr()` based default implementation. But they all basically work with the `ioctl()` based alternate code.
|
even macOS) fail when trying to reset the handshake lines (RTS and
|
||||||
So I changed that `#define USE_IOCTL` appropriate.
|
DTR) using `tcsetattr()` and setting the baudrate to zero. They all
|
||||||
But however, there are some issues regarding rts and dtr control for OpenBsd, NetBsd and Dragonfly (see details below).
|
basically work with the TIOCM[BIC|BIS|GET] `ioctl()`s. However, there
|
||||||
|
are still some issues regarding RTS and DTR control for OpenBsd,
|
||||||
|
NetBsd and Dragonfly (see details below).
|
||||||
|
|
||||||
|
|
||||||
Custom Baudrates
|
Custom Baudrates
|
||||||
================
|
================
|
||||||
Tested with 80000 baud.
|
|
||||||
Most Bsd variants (except NetBsd) worked well with Ftdi, but not with Prolific adapter (see details below).
|
Tested with 80000 baud. Most Bsd variants (except NetBsd) worked well
|
||||||
|
with Ftdi, but not with the Prolific adapter (see details below).
|
||||||
Linux and OSX / macOS still work with both adapters.
|
Linux and OSX / macOS still work with both adapters.
|
||||||
|
|
||||||
|
|
||||||
@ -69,30 +86,46 @@ Issues
|
|||||||
|
|
||||||
FreeBsd
|
FreeBsd
|
||||||
-------
|
-------
|
||||||
- Custom Baudrates work well with Ftdi adapter. But with Prolific adapter, baudrate switched silently to 9600 baud.
|
|
||||||
|
- Custom Baudrates work well with Ftdi adapter. But with Prolific
|
||||||
|
adapter, baudrate switched silently to 9600 baud.
|
||||||
|
|
||||||
OpenBsd
|
OpenBsd
|
||||||
-------
|
-------
|
||||||
- `term_get_mctl()` sometimes reports wrong values for rts and dtr state (after port open).
|
|
||||||
- `--lower-rts` works as expected, but `--lower-dtr` lowers both rts and dtr lines.
|
- `term_get_mctl()` sometimes reports wrong values for rts and dtr
|
||||||
Same for interactive toggle via `[C-t]` and `[C-g]`. Toggle rts via `[C-g]` works but toggle
|
state (after port open).
|
||||||
dtr via `[C-t]` also changes the state of rts (and `term_get_mctl()` reports wrong rts state afterwards).
|
- `--lower-rts` works as expected, but `--lower-dtr` lowers both rts
|
||||||
|
and dtr lines. Same for interactive toggle via `[C-t]` and
|
||||||
|
`[C-g]`. Toggle rts via `[C-g]` works but toggle dtr via `[C-t]`
|
||||||
|
also changes the state of rts (and `term_get_mctl()` reports wrong
|
||||||
|
rts state afterwards).
|
||||||
- Issues occurs with both Ftdi and Prolific adapters.
|
- Issues occurs with both Ftdi and Prolific adapters.
|
||||||
- Custom baudrates with Prolific adapter has the same issue as in FreeBsd.
|
- Custom baudrates with Prolific adapter has the same issue as in
|
||||||
|
FreeBsd.
|
||||||
|
|
||||||
NetBsd
|
NetBsd
|
||||||
------
|
------
|
||||||
- `term_get_mctl()` sometimes reports wrong values for rts and dtr state (after port open)
|
|
||||||
|
- `term_get_mctl()` sometimes reports wrong values for rts and dtr
|
||||||
|
state (after port open)
|
||||||
- Issue occurs with both Ftdi and Prolific adapters.
|
- Issue occurs with both Ftdi and Prolific adapters.
|
||||||
- Seems that there is no support for custom baudrates.
|
- Seems that there is no support for custom baudrates.
|
||||||
- With Ftdi adapter: "Cannot set the device attributes: Invalid argument".
|
- With Ftdi adapter: "Cannot set the device attributes: Invalid
|
||||||
- With Prolific adapter no error message but same behaviour as in FreeBsd.
|
argument".
|
||||||
|
- With Prolific adapter no error message but same behaviour as in
|
||||||
|
FreeBsd.
|
||||||
|
|
||||||
Dragonfly
|
Dragonfly
|
||||||
---------
|
---------
|
||||||
- Got "FATAL: cannot lock /dev/ttyU0: Operation not supported" on startup.
|
|
||||||
Need to pass `--nolock` or build with `#define USE_FLOCK` not set.
|
- Got "FATAL: cannot lock /dev/ttyU0: Operation not supported" on
|
||||||
- `term_get_mctl()` sometimes reports wrong state for dtr, e.g. when passing `--lower-dtr`.
|
startup. Need to pass `--nolock` or build with `#define USE_FLOCK`
|
||||||
- When exit via `[C+x]`, got "term_exitfunc: reset failed for dev /dev/ttyU0: Invalid argument".
|
not set.
|
||||||
- Custom baudrates with Prolific adapter has the same issue as in FreeBsd.
|
- `term_get_mctl()` sometimes reports wrong state for dtr, e.g. when
|
||||||
|
passing `--lower-dtr`.
|
||||||
|
- When exit via `[C-x]`, got "term_exitfunc: reset failed for dev
|
||||||
|
/dev/ttyU0: Invalid argument".
|
||||||
|
- Custom baudrates with Prolific adapter has the same issue as in
|
||||||
|
FreeBsd.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user