2006-10-29 20:46:29

by Brad Midgley

[permalink] [raw]
Subject: [Bluez-devel] hid flowchart workup

Hey

Hello from the plane! Just crossed Greenland.

I thought I would work up the HID flowchart while it was still fresh.
Found it's gone a bit cold already. Maybe Albert could pipe in with some
references for example code. Do we need code references for the methods
used before and after dbus changes to hidd?

This is what I pieced together:

1. Enumerate input devices
(is there a better method than scanning /dev/input/ for mouse*? what
about keyboard?)
2. Any present? Skip to end
3. Start hcid and hidd
4. HID -> HCI
(I can't put together from my notes what this HID->HCI step meant...)
5. Tell user to make devices discoverable
6. Enumerate input devices again
7. Inquiry (api details)
8. Connect to mouse (api details)
9. Connect to keyboard (api details)
10. Enumerate devices.
11. No devices present still? Jump to 5.
(Is it no devices or is the test for both keyboard and mouse present?)

Brad

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2006-10-31 18:18:26

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] hid flowchart workup

Marcel

ok... more details worked out and just a couple points missing. I added
details for if the user has a working input device but may want to
connect another bt device. This might be nice early in the install for a
bt mouse for example so keyboard shortcuts don't have to be used for the
whole install.

These are the steps an installer will need to fully install a Linux
desktop using a Bluetooth keyboard and mouse only. Every distribution
needs to implement this kind of workflow in their installer. When the
user is asked a question, it should be easy for them to use just the
keyboard or just the mouse (if only one is present) to answer.

1. Enumerate input devices (scan /sys/class/input), go to 3 if none.
2. Ask user if they need to pair any bluetooth input devices. If no, end.
3. Start hcid and hidd
4. run hid2hci to put any hid mode dongle in hci mode
5. Tell user to make devices discoverable
6. Enumerate input devices again
7. Inquiry (Call org.bluez.Adapter.DiscoverDevices())
8. Connect to mouse (api details)
9. Connect to keyboard (api details)
10. Enumerate devices.
11. No devices present still, including plain usb? Jump to 5.
12. Ask user if any remaining devices need to be paired. If yes, jump to 5
13. (Later) copy pairing info from ramdisk to the root of the new system

I think steps 8 & 9 change as we implement dbus pathways. Before dbus,
it would be done by executing
hidd --search
but eventually could be dbus signals to hidd to search for each type of
device.

Brad

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-10-30 09:37:00

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] hid flowchart workup

Hi Brad,

> I thought I would work up the HID flowchart while it was still fresh.
> Found it's gone a bit cold already. Maybe Albert could pipe in with some
> references for example code. Do we need code references for the methods
> used before and after dbus changes to hidd?

just to fill in the gap where this comes from. We were discussing what
is needed to make it possible to fully install a Linux desktop using a
Bluetooth keyboard and mouse only. So every distribution needs to
implement this kind of work flow in their installer.

> This is what I pieced together:
>
> 1. Enumerate input devices
> (is there a better method than scanning /dev/input/ for mouse*? what
> about keyboard?)

Don't know yet, but basically you look at /sys/class/input for the
information about attached input devices.

> 2. Any present? Skip to end
> 3. Start hcid and hidd
> 4. HID -> HCI
> (I can't put together from my notes what this HID->HCI step meant...)

These are HID proxy capable dongles. They can be either pretend to be a
Bluetooth USB dongle or a USB mouse/keyboard combo.

> 5. Tell user to make devices discoverable
> 6. Enumerate input devices again
> 7. Inquiry (api details)

Call org.bluez.Adapter.DiscoverDevices().

> 8. Connect to mouse (api details)
> 9. Connect to keyboard (api details)
> 10. Enumerate devices.
> 11. No devices present still? Jump to 5.
> (Is it no devices or is the test for both keyboard and mouse present?)

If you attach a USB keyboard or mouse in that time, then this is also
fine and will end this process.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel