Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Auto detect of PS2 Style Mouse: (5 Items)
   
Auto detect of PS2 Style Mouse  
We have an embedded system that we plug a keyboard and mouse into only when we need to debug.  The OS always detects the
 keyboard when it is plugged in.  However, plugging in the mouse always requires a reboot for Photon to detect it.

Is there any way we can get the PS/2 mouse auto detected without requiring a reboot?
Re: Auto detect of PS2 Style Mouse  
Hi Larry,

In your situation Photon restart is not required. You can simply restart
the Input manager. I would recommend you the following sequence:
-when you start Photon, run Input manager only for a keyboard. If you
use script ph then edit /etc/config/trap/input.$NODE file. It should
contain only:  kbd fd -d /dev/kbd
- connect mouse
- manually start Input manager for a PS/2 mouse by the following command:
 #Input ps2 -r kb -2 &
- disconnect mouse
- kill Input manger for mouse.

Attaching simple script. You can use it to automate start/stop/restart
of the Input manager for a PS/2 mouse (steps 3-5).

Regards,
Pavel

> We have an embedded system that we plug a keyboard and mouse into only when we need to debug.  
The OS always detects the keyboard when it is plugged in.  However, plugging in the mouse always requires a reboot for 
Photon to detect it.
>
> Is there any way we can get the PS/2 mouse auto detected without requiring a reboot?
>
>
>
> _______________________________________________
>
> QNX4 Community Support
> http://community.qnx.com/sf/go/post91838
>
>
Attachment: Compressed file mouse.sh.tar 10 KB
Re: Auto detect of PS2 Style Mouse  
Thank you very much Pavel.  Much appreciated.
Re: Auto detect of PS2 Style Mouse  
> We have an embedded system that we plug a keyboard and mouse into only when we
>  need to debug.  The OS always detects the keyboard when it is plugged in.  
> However, plugging in the mouse always requires a reboot for Photon to detect 
> it.
> 
> Is there any way we can get the PS/2 mouse auto detected without requiring a 
> reboot?

Hi Larry,

Pavel mentioned a way to do this, however I want to emphasize that PS/2 does _NOT_ hotplugging, and depending on the 
controller it is not unheard of for PS/2 controllers to become damaged due to hotplugging.

http://en.wikipedia.org/wiki/PS/2_connector#Hotplugging

You'd be far better off using a USB peripherals and the devu-mouse and devu-kbd drivers instead along with the Input 
driver.  You'd need to write a simple program or script that monitors for the presense of /dev/usbkbd0 and /dev/
usbmouse0 and then start the Input driver to run when those entries are present.  You'd have to write the program, 
however it would be far easier than replacing broken hardware should that ever happen.

Best regards,

Erick.
Re: Auto detect of PS2 Style Mouse  
Interesting ... we have had cases where when we do hot plug the keyboard it doesn't work as expected.  Sometimes you 
have to press each key twice.

Perhaps a PS/2 to USB adapter is in order ...

I will investigate.

Thanks very much for the advice.

Larry