문제

I need to develop a test program, which sends and recieves data from terminal to the serial port.
In order to do that I want to create virtual device file and work with it. I did that by using command:

mknod -m 666 ttyS32 c 4, 500

The device file was successfully created, however I can't write data to it. Both programmatical and terminal ways give the following error:

No such device or address

In C I used standard file I/O functions, and in terminal I used the 'echo' command. Do you have any ideas how to write data to serial port device file?

도움이 되었습니까?

해결책

That's right. You can write to the serial device using echo. Are you sure that the device (not the device file) exists and is properly handled by the driver?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top