usb at boot, and a daemon to monitor user button

Hi,

I am running debian linux kernel 2.6.29.

I have found that when I plug usb in then boot, then usb isn't working
at all. Instead I have to boot, then plug the usb in after booted.
When I do this, it confuses the bluetooth in debian so that it's
normal auto-connection for bluetooth keyboards doesn't work right. If
anyone has a better solution, I would like to know.

For now, I wrote a very simple c program which monitors the user
button on the beagle board and runs a command when pressed. This was
to resolve my issues of connecting a bluetooth keyboard.

I then put in my startup script (/etc/rc.local):

/usr/local/bin/beagleruncommand /dev/input/event0 "hidd --search"

This monitors /dev/input/event0 (user button), and runs "hidd
--search" whenever it's pressed (effectively connects to any available
usb hid device)

Source attached, please comment/improve on it!

Sean

beagleruncommand.c (1.04 KB)

Interesting approach - especially for mapping the user key to
something quite useful!

Personally when it comes to bluetooth keyboards, I prefer a dongle
that maps them to USB HID devices, allowing immediate use, which can
always be switched to hidd mode by udev/a monitoring script/etc

BTW, speaking of unusal approaches, here's something I do: run flite
in rc.local to remind me of the network settings (IP, GW, ...) in case
I can't access a headerless device. I then simply plug a speaker and
reboot - often very handy.