Problem Programming Serial Ports in Linux 7.2
Hello Everyone!
I am having a problem with Configuring/Reading/Writing Serial Ports under Linux 7.2. First of all, I have a total of 5 serial ports on my machine. They all are read/writable/configurable under Windows, so I know that they are not broken! Anyway, under Linux after doing a dmesg | more I find that the 5 serial ports are seen as follows:
Serial Port 1: /dev/ttyS0
Serial Port 2: /dev/ttyS4
Serial Port 3: /dev/ttyS5
Serial Port 4: /dev/ttyS6
Serial Port 5: /dev/ttyS7
Now, the good thing is that I can Configure/Read/Write Serial Ports 1, 2, and 3!!! However, for some reason (using the same code that worked for configuring Serial Ports 1, 2, and 3) does not work for Configuring/Reading/Writing Serial Ports 4 and 5.
When I do configure serial ports 4 and 5 for the standard 9600 Baud, 1 stop bit, no parity, 8 data bits, I get weird results like being able to write at 1200 baud instead of 9600 baud which the software is intending to program it to communicate at. In addition, there is no readback functionality on serial ports 4 or 5 at all. NOTE once again that this code works for serial ports 1, 2, and 3. I have flip flopped the device settings so that the port is configured by working code which worked for the other ports, but it does not work for ports 4 and 5. I know that it is not the code because it works for 3 out of the 5 other ports.
What can I do in Linux to check these ports and see that they are functioning properly and that I can read/write/and configure them properly for my system that I am currently working on? I think that since I am able to communicate with workable hardware and software for 3 out of the 5 ports that I have some sort of hardware problem when programming these ports in Linux. Thank you very much for all of your time and consideration!!!
Eric.
|