Skip to content

Tag: serial-port

Serial port hangs on close()

I developed this simple kernel module, which emulates a serial port by using a FIFO queue and a timer (read from hardware : out from the queue, write to hardware : insert in the queue). Source code is shown next. Then, I wrote a simple test-application which configures the port settings (baud rate, parity, st…

How do you check if a serial port is open in Linux?

How does one check if a serial port is already open in Linux using Posix/C functions? I want to check the status of the serial port to check if the serial port is open or not. I would like to know what methods work for: Checking the file descriptor to see if the serial port is open and Checking the