Problem loading USB mouse dynamically

Is there any way to load USB mouse dynamically?
In these two threads:
openqnx.com/PNphpBB2-viewtopic-t1349-.html
openqnx.com/PNphpBB2-viewtopic-t50-.html
the people there described how to add an USB mouse.

With an input.localhost inside /etc/system/trap (overrided command), I can get the keyboard, my ps2 mouse (trackpad+trackpoint) and USB mouse to work simultaneously with the following inside:
kbd fd -d/dev/kbd ps2 mousedev msoft fd -d/dev/usbmouse0

The problem I have is that depending on where I am working I won’t always have the usb mouse connected. When there is no usb mouse, the photon bootup screen hangs at login with a moving sliding window claiming “searching for input device”.

So, my question, as stated above, is if it is possible to load the mouse driver dyanmically (like some way to detect the usb insertion and then load the driver?)

Any suggestions / hints /solutions would be very much appreciated.

You should be able to do this. You’ll need to modify the ph script (in /usr/bin). Search for the line that contains “PHINPUT”, and there you’ll see where inputtrap is called. You can dynamically create the inputtrap file (the one you already are using to get your USB mouse working) if you can see the /dev/usbmouse0 device, otherwise delete the inputtrap file., and then proceed to the line that calls “inputtrap start”.

According to my testing usb-mouse will not register the name /dev/usbmouse0 unless the mouse is plugged in.

Note that this will only work so long as you plug in the USB mouse before starting the machine (it is not dynamic).

Thanks for letting me know what the solution is. Having the need to plug the mouse before starting the machine is not a big problem for me.
For archival purposes (to help others) I’ll post the solution here:

In the /bin/sh/ph I added the following:

[code]
+if test -e /dev/usbmouse0; then

  • cp /etc/system/trap/inputfile /etc/system/trap/input.localhost
    +else
  • rm /etc/system/trap/input.localhost
    +fi

if test -z “$PHINPUT”; then
phin -TPK -q && inputtrap start
else
phin -TPK -q && $PHINPUT
fi[/code]

Hi flav2000

I’m a new user of N.6.2.1. and having the same problem with “any” mouse but would like to get my usb mouse going. Tried serial mouse but can’t get that to work either. So, have no mouse when QNX starts and unable to complete configuration as seems to be NO hotkeys to activate menus - except for print screen. Argh.
So, the above file you mention do I replace it with the Code you showed or is it added to this file? The file? Something!??
Is it possible to boot with a floppy that would add mouse control?
At a loss - just too new to this QNX.

Thanks,
TFidler