Peter Hull
Peter Hull

Reputation: 7067

Using gnu screen to access serial port

I am trying to access a device which is attached to a USB-serial port. The settings are 57600 baud, 8 bit, 1 stop bit, no parity. The device outputs a status line every second and accepts typed commands.

I would like to use GNU screen to initiate 2 way communications, so I am using this command:

screen /dev/ttyS2 57600,cs8

However I just get a blank screen, nothing received from the device.

The communication is fine using teraterm, and I can also do this

stty -F /dev/ttyS2 57600 cs8
cat /dev/ttyS2

to see the status output from the device.

I've tried various combinations of ixon, ixoff, crtscts, and clocal but nothing makes any difference.

How can I determine what the correct command should be?

I am using Cygwin on Windows 10.

Upvotes: 5

Views: 2371

Answers (1)

Simon Fredriksson
Simon Fredriksson

Reputation: 77

I faced the same issue with gnu-screen, I started using plink.exe instead from the PuTTY suite. It's not optimal, but it does the job. In my case serial is just for recovery, not for everyday usage.

  1. Start PuTTY, create a profile with your serial connection.
  2. Name and save the connection.
  3. From cygwin, run: '/cygdrive/c/Program\ Files\ (x86)/PuTTY/plink.exe -load SerialProfile'

Upvotes: 1

Related Questions