howto monitor i386 serial-port pins?
I want to use the buttons of an old serial mouse (rewired direct to DTR, RTS) to operate some software, independently of the main mouse. I was able to do this in a DOS program (under Win98) using the "Powerbasic" function inp(766) where 766 is 02FE, the actual pins of COM2, accessed via the BIOS.
So far, the nearest I've got in Linux is using "apcupsd", the daemon to monitor APC UPS which, in "dumb" mode, monitors specific pins to activate four scriptable options. Unfortunately (a) it monitors CD and RI, not in a mouse cable, and (b) it only polls every 5 secs. The sources are very complex to patch. It uses many different ioctl() functions, and "#include <sys/iocotl.h>" which I don't have.
Does anyone here know of another monitoring program which could be used to pick up the status of the actual pins? Some "soft LED" monitors seem to pick up carrier-detect (CD, pin 1 of 9) independently, but I can only find X11 ones at present. I could rewire to CD and RI if necessary.