I am going to write a program in C that is going to open a connection through the serial port and "listen" to the incoming commands, then it will take some action and report the status.
The connection will be via RS232 (serial port), and I'm trying to figure out how to find out which port to open.
When using windows, if I plug in my USB serial device, I see that the Prolific USB-to-Serial Comm Port (COM4) is displayed in the device manager ... but on the Linux side I don't see any changes in the /sys/class/tty or /dev , I see ttyS0 through ttyS7 all the time (I assume that S stands for serial number based on what I read ).
So how do I know who to connect to?
EDIT
Although I am developing this in the OpenSUSE 12.1 kernel (3.1 kernel), the final program will run on uCLinux on the 2.4Linux kernel board, so I am looking for clean C solutions that will work on older kernels
FYI: the /sys file system, as indicated in the reply to this post , did not exist until the 2.6 kernel and my limitations force me to stick with things available in the 2.4 kernel.
Mike
source share