3
votes

I'm trying to write a script to automate a file transfer over serial connection to a remote device. My intention is to write the script in Ruby running on Cygwin on my local computer.

To start off with, I need to get serial communication going to the remote device and for that, I assume that I would need to access the serial port via /dev/tty...

When I look in /dev/ in my Cygwin shell I only see the following:

$ ls /dev
fd  mqueue  shm  stderr  stdin  stdout

I don't see anything like a tty device.

When I check the device manager in Windows (Win7 Pro), it shows 3 com ports. There is one native com port (COM1) and two virtual com ports (COM5, COM6).

For now I'm just trying to get any kind of connectivity going..

Thanks.

1

1 Answers

5
votes

Even though they don't appear in the listing of /dev, they are there anyway. COM1 is /dev/ttyS0, COM2 is /dev/ttyS1, and so on. See the relevant bit of the manual for the full list of "hidden" devices.

[Upate] Starting with Cygwin 1.7.12, ls /dev actually does show all the devices that are present.