Please try running it and see how it works.
It should give output of the following form:
Code: Select all
Type:PS2-mouse|Port:/dev/input/mice
Code: Select all
Type:USB-mouse|Port:/dev/input/mice
Code: Select all
Type:SERIAL-mouse|Port:/dev/ttyS0
Note1: Yes, I know ps/2 shows "input/mice" and not "psaux" like Barry uses in the rc.local0 file, but linking input/mice worked with my ps/2 mouse! (it might show a different port for ps/2, but in my case it was input/mice)
Note2: I tried booting my computer with a serial mouse with the old puppyserialdetect and it detected it fine, but when I tried running puppyserialdetect again in a terminal it returned nothing!
So if you encounter such behaviour, it's not unique to my version.
Note3: If you don't have a serial mouse, you should not put my version into /usr/sbin, as any non-serial mice will be mis-detected by your current rc.local script!
Technical info:
- I have enabled the USB and ps/2 code that Barry skipped, since we are now using a 2.6 kernel (…).
- I have moved the serial-mouse detection out of the mouse_detect function and into the serial_detect function -- I put it before the modem-detection.
Advantages:
1) Running the USB and ps/2 scan code can be done before the serial devices (no dependency on results of serial_detect).
2) The serial-mouse code is run before the serial-modem code! I have evidence of at least one case where running puppyserialdetect with a certain modem took nearly 2 minutes! This way we can hopefully detect the mouse before puppyserialdetect is killed at the timeout limit.
- I have commented out some code in the serial_detect function (just before Barry's "bkspeed") which doesn't seem to look for anything we're interested in. (this can be uncommented for recompiling and shouldn't affect any of my other changes)
Disclaimer: I don't know C, so don't complain about my dirty code… (theoretically we could change the mouse_detect code to not need that whole array of info about serial-devices, as it doesn't detect them anymore… it just seems a lot of work with no real gain.)
Below are tarballs with the binary and the modified source.
Ps - Maybe we should rename this app? It's not just serialdetect anymore… I also thought of enabling USB modem detection, but it doesn't find the device (just port=USB) so I didn't know if it would be very helpful).