Yes… but it is a big secret. Please don’t tell anyone…
Here is my /etc/rc.d/rc.local script that starts USB mouse and a few
daemons (the bottom part of it dealing with daemons can be removed, it
is not relevant to the USB mouse issue). Don’t forget to do chmod +x to
the file.
If you think it is too tricky, you’re right. That’s why it works…
— cut —
#!/bin/sh
#set -x
icfg=/etc/system/trap/input.${HOSTNAME}
pidin | grep uhci >/dev/null 2>&1
if [ $? -ne 0 ]; then
io-usb -duhci
fi
waitfor /dev/usb
typeset -i timeout=5
printf “Waiting for the USB bus to initialize”
while [ $timeout -gt 0 ]; do
usb | grep Device >/dev/null 2>&1 && break
timeout=$timeout-1
printf “.”
sleep 1
done
echo
usb | grep .ouse >/dev/null 2>&1
if [ $? -eq 0 ]; then
printf "USB mouse detected: "
echo $(usb | grep Vendor | awk ‘{print $4}’)
devu-mouse
cat <<@ >$icfg
devi-hirun kbd fd -d /dev/kbd msoft fd -d /dev/usbmouse0
@
else
test -f $icfg && rm $icfg
fi
daemons=“inetd portmap nfsd fs-nfs3”
for daemon in $daemons; do
pidin | grep $daemon >/dev/null 2>&1 && continue
$daemon
done
unset daemons daemon icfg timeout
— cut —
Enjoy your mouse.
– igor
Eugenio Yime wrote:
Hi everybody.
I’m trying to use my USB optical mouse under photon, but it didnt work.
these are my steps.
- io-usb -dohci -dehci -duhci &
- io-hid -dusb &
- devi-hid mouse &
And my mouse doesnt work.
I try again with:
1.- inetd &
2.- slay devi-hirun (this stop my keyboard and ps/2 mouse )
Using telnet I did:
3.- slay devi-hid &
( it prints an error message because devi-hid is not running ).
4.- inputtrap kbd fd -d/dev/kbd
Returning to photon (whithout ps/2 mouse enabled):
5.- inputtrap devi-hid mouse &
(nothing happens)
6.- inputtrap start
input driver devi-usb is not available (error code = -1).
(is devi-usb, not devh-usb)
And again I only had ps/2 mouse enabled.
Thanks,
Eugenio,