1850778 Members
4186 Online
104055 Solutions
New Discussion

Re: how detect the mouse

 
Subbarao
New Member

how detect the mouse

Hi,
Is there any command or script which will tell whether mouse is connected to system(model 700 series) or not.
If the mouse is connected through USB port ioscan shows the info, but in case os ps2 I am not able get the status

Can any one help

Regards,
Subbarao
6 REPLIES 6
KapilRaj
Honored Contributor

Re: how detect the mouse

I am not sure if ioscan will report it but it is normally wired on to the key board in old systems

The new systems I think they have a USB port onboard

Kaps
Nothing is impossible
Subbarao
New Member

Re: how detect the mouse

Thanks for the response.
IS there any other way other than ioscan to detect mouse
Navin Bhat_2
Trusted Contributor

Re: how detect the mouse

Here is how I did it on my system other than ioscan.

root@meghna:[/dev]>lssf /dev/ps2mouse
ps2 card instance 0 first ps2 mouse at address 8/16/7 /dev/ps2mouse


Also you could look into the syslog to see

Feb 13 11:00:10 meghna vmunix: 8/16/7 ps2
means you have a ps2 mouse detected.


In syslog, if you do not have a PS2 keyboard and mouse attached you will
see the following:

May 19 01:59:47 hprtdu22 vmunix: 10/12/0 CentIf
May 19 01:59:47 hprtdu22 vmunix: ps2_readbyte_timeout: no byte after 500
uSec
May 19 01:59:47 hprtdu22 vmunix: ps2_readbyte_timeout: no byte after 500
uSec
May 19 01:59:47 hprtdu22 vmunix: 10/12/7 ps2

This is indicative for NOT having a PS2 keyboard/mouse attached
Charles Slivkoff
Respected Contributor

Re: how detect the mouse

For systems with USB ports:

ioscan -kfC usbhid

For systems with PS/2 ports, you can try reading from /dev/ps2mouse.



V. Nyga
Honored Contributor

Re: how detect the mouse

Hi,

maybe you can use this file (it's not a text file, I don't know whether the file transfer corruptes the file).
I use it to test whether devices are present, it also shows mouses.

Regards
volkmar
*** Say 'Thanks' with Kudos ***
Subbarao
New Member

Re: how detect the mouse

Thanks alot for the info

#lssf /dev/ps2mouse will give the same output when mouse connected and as well as disconnected

Can any one tell How to read the data from /dev/ps2mouse to check whether mouse is really connecte or not