Reputation: 21
we succesfully manage USB to serial communication with a device with Putty on Windows 7 and GNU screen on LINUx but half fail to do so with Terminal / screen on MAC OS.
simple basic communication setup is required on the LINUX windows machine :
57600 bps, 8 bits , no parity, no flow control
the device mounts succesfully and is profiled as described here ( sorry in French) :
Identifiant du produit: 0x6160
Identifiant du fournisseur: 0x03eb (Atmel Corporation)
Version: 1.10
Vitesse:Jusqu’à 12 Mb/s
Identifiant de l’emplacement: 0x06200000 / 2
Courant disponible (mA):500
Courant requis (mA):0
a cu.usbmodem621 and a tty.usbmodem621 do appear in the list of ls /dev/tty* or ls /dev/cu*
we activate screen using the following screen command on terminal.app
screen /dev/tty.usbmodem621 57600
or
sudo screen /dev/tty.usbmodem 57600
initally no screenrc file existed, I eventually created one to marginally tune the terminal settings and make sure that there was no flow control :
defscrollback 5000
termcapinfo xterm* ti@:te@
defflow off
hardstatus alwayslastline "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
I have tried without specific drivers, then with the 2 following references
FTDI http://www.ftdichip.com/FTDrivers.htm
Prolific PL2303 http://osx-pl2303.sourceforge.net/
I have also copied and pasted all the settings listed on a stty -a as per the LINUX machine. Here they are :
speed 57600 baud; 92 rows; 145 columns;
lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc
iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel iutf8 -ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
In ALL cases, the device correctly receives and interprets all commands we send from the screen terminal window but screen fails to display any communication FROM the device.
I have tried Goserial as well a Zterm with the same result.
any hint of what is going on ?
Upvotes: 2
Views: 10758
Reputation: 21
Among the common pitfalls of serial communication are:
sudo lsof /dev/tty.usbmodem
)An alternative to using screen
would be to use picocom
/ setserial
or cu -l /dev/tty.usbmodem -s 9600
(for troubleshooting purposes).
To get a virtual serial port to troubleshoot screen
you may use something like:
socat GOPEN:/dev/ptyp0,ignoreeof TCP:10.0.1.93:10002
Make sure that no flow control (hardware or software) is being used.
For more information on "Setting up a Serial Console in Mac OS X" see here (e. g. .plist
file that starts getty
; screen /dev/cu.usbserial 115200 8N1
).
Upvotes: 2