I have modified the Puppyserialdetect code a bit, to help up detect ALL kinds of mice and also (hopefully) to solve some of the serial-mice detection problems…

Please try running it and see how it works.

It should give output of the following form:

Code:

Type:PS2-mouse|Port:/dev/input/mice

Code:

Type:USB-mouse|Port:/dev/input/mice

Code:

Type:SERIAL-mouse|Port:/dev/ttyS0

(the modem output should remain as before)

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)._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mindLast edited by Dougal on Sun 12 Apr 2009, 05:40; edited 2 times in total

At first the same happened to me, but when I specified the full path (for me /root/puppyserialdetect-all-mice/puppyserialdetect) it worked correctly, showing the output

"Type:PS2-mouse|Port:/dev/input/mice"

for about three seconds.

You probably opened a terminal in the "puppyserialdetect-all-mice" directory then executed the script from there, just as I did: but then it's the old script with the same name that is called, which gives no screen output!
___________________________
When you feel very smart, get concerned: it's the distinctive symptom of all victims of stupidity.

I did a bit of tidying of the source code, reduced unnecessary code, fixed up the debugging statements, added a -d to command line.
Includes a normal binary, and a static linked one for initial ram disk functionality.
It should run from anywhere... fingers crossed that it does all the same stuff as what it did before, but I really expect it will.

SHS: what do you mean plugged in simultaneously? I wonder if it's listed in the file in /proc where the mouse is listed... but in any case you can only "detect" one mouse, so it doesn't matter...

Have you tried the USB alone? If then it isn't detected it's a problem.

Picture:

http://tinypic.com/4i6f1ow.png

The laptop is running 2.01r2 from the usb stick, with a usb cordless mouse plugged in beside it. The little red "eraser head" in the middle of the keyboard is the "Trackpoint" which acts like (and is detected as) a ps/2 mouse. Puppy responds to both.

(2.01r2 because 2.15CE is too big of a memory hog for this measly 256MB computer).

The laptop's screen shows a second instance, a picture of the rear of another computer, a tower, into which both a ps2 mouse and a usb mouse are plugged-in simultaneously. Puppy 2.15CE on that computer responds to both mice, and your puppyserialdetect detects only the ps2 mouse. If I boot this other computer into Puppy 2.15CE with only the usb mouse plugged in, then puppyserialdetect does not detect the mouse, it merely sends me back to the bash prompt.

Unfortunately I cannot open /proc in 2.15CE; Rox locks up.

I can check in 2.01r2 to see where both mice are listed, if you will clue me in on where to look.

Procedure:
--2.15CE live-DVD, first booted with puppy pfix=ram,
--then, Jesse's puppyserialdetect-1[1].1b.tar.gz unpacked to /tmp
--puppyserialdetect-static copied to (overwriting) /usr/sbin/puppyserialdetect...
--the machine was shut down, with creation of a new pup_save.2fs...
--powered off and rebooted for each mouse case, loading the pup_save:

Just an hour ago, when writing the new code for rc.local0, I noticed that in the past (when searching for a usb-mouse in /proc/bus/usb/devices), there were mice that were'nt named "mouse", but other things, so I went and looked at the code, since I remembered it only checked for "mouse" or "pad"... but since it checks /proc/input/devices I assumed it's ok.

Jesse: thanks for saving me the work...

i'll message MU to see what his file says._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Just an hour ago, when writing the new code for rc.local0, I noticed that in the past (when searching for a usb-mouse in /proc/bus/usb/devices), there were mice that weren't named "mouse", but other things...

Please examine the thread

http://murga-linux.com/puppy/viewtopic.php?t=17451

where within the last week I have been swinging wildly at the problem MStar is having with the menu in 2.15CE misbehaving (and mtPaint goes into an endless loop as well) with his Microsoft Wireless Optical Desktop 1000 usb keyboard and mouse. Now that the clue is before me that maybe it isn't an xorg.conf problem, but rather perhaps a puppyserialdetect problem...taking my hint from this thread, I requested over there that MStar post his /proc/bus/input/devices, and he has done so.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum