The crash in the office really was the driver's fault. The handling of TIOCMIWAIT seems in place, but it never wakes up because the corresponding call to wake_up_interruptible() is missing. The code seems to be copied from some "tiny tty" example code. The second thing is that TIOCMIWAIT does not work. I can't check until I'm back in the office on monday. I don't know for sure but I think it crashed a machine in the office I was working on from home. While the driver looks promising, it seems unstable. I guess I was a little quick with my enthusiasm. You may need to fix the file permissions to be able to use the devices. The devices are /dev/tnt0 to /dev/tnt7 where tnt0 is connected to tnt1, tnt2 is connected to tnt3, etc. When the module is loaded, it creates 4 pairs of serial ports. Just insert a few lines at the top of the module/tty0tty.c source (after the includes): #ifndef init_MUTEX On a recent kernel you may get compilation errors. It even implements TIOCMGET/TIOCMSET and TIOCMIWAIT iotcl commands! The best thing about it is that is also emulates the hardware pins (RTC/CTS DSR/DTR). I don't know why it only got thumbs down on sourceforge, but it works well for me. It is a simple kernel module - a small source file. There is also tty0tty which is a real null modem emulator for linux.
0 Comments
Leave a Reply. |