USB keyboard udev rule

Pander pander at users.sourceforge.net
Sun Nov 16 11:17:13 CET 2008


Did anyone discover a way how to detect this? Perhaps after detection
that USB is connected but not charging, try host mode and have a look
what is connect. If it is no laptop/desktop/charger but a keyboard, stay
in this mode, otherwise, go back to client mode. This double check could
be made on very simple data like USB ID.

Alternatively, I'd like to white list the USB IDs (possibly ranges) of
my keyboards and the above described mechanism can detect that the
device can switch to host mode, and when to switch back on unplug.

Developing some rules like this would certainly easy using external
keyboard and promote plug and play.

Robin Paulson wrote:
> 2008/11/11 Alastair Johnson <alastair at truebox.co.uk>:
>> Pander wrote:
>>> Does anyone have a udev rule for USB keyboard that does the following.
>>> When no external USB devices are connected and a keyboard is plugged in,
>>> USB can switch to host mode and switch back when USB keyboard is
>>> unplugged. As far as I'm concerned, this would be a very welcome feature.
>> AFAIK we don't have a means of autodetecting whether we should be host
>> or device, and if we aren't in host mode we can't detect the keyboard
>> insertion. There may be a way of doing this using the ID pin but I don't
>> know how standard it would be.
> 
> would there be any adverse consequences to the neo always assuming
> it's in host mode (and thus supplying power also), unless a voltage is
> detected? i.e. as soon as any power disappears, it automatically
> switches back to device again?
> 
> from what i can tell from previous discussions, being provided with
> power while supplying it, doesn't damage the neo, as it automatically
> turns off the power when this happens
> 
> i'm not thinking just about keyboards here, but more about 'faking' a
> usb otg port, or at least something similar
> 
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community





More information about the community mailing list