c - Create serial port device file -


I need to develop a test program, which sends and receives data from terminal to serial port. Do I want to make a virtual device file and work with it I did this by using the command:

mknod -m 666 ttyS32 c 4, 500

The device file was created successfully, although I can not write To do this, the following error occurs in both programmatic and terminal modes:

No such device or address

Standard file I / O in CI The function is used, and I used the echo command in the terminal. Do you have serial Have an idea about writing data in a port device file?

This is right You can write to serial device using echo Are you sure the device (not the device file) is present and is properly controlled by the driver?

Comments