Skip to contentSkip to conversation

hidd and hidp

Bluez-users Fritz Code 2 participants 5 messages Jun 11, 2008 Bluetooth drivers

lore
Share & tools
lore

Fritz Code

author
#0 lore raw

Hi!

is it right that the two components hidd (the daemon) and the kernel module hidp (found in net/bluetooth/) work together in order to provide support for Bluetooth Keyboards and other HID devices?
As far as I know hidd has been replaced, if yes with what?
And which role plays the Input service which is also an own folder in the bluez-utils?

Anyway, the two components hidd and hidp provide HID support?
I took a look at hidd and hidp and found out that hidd listends for incoming connections, if it gets one it forwards this connection to the kernel modules hidp which adds it to its handlers. From there the kernel module serves the connection and uses the well known input function input_event to get the scancodes into the input system of linux.

So for a basic support of keyboards I only need hidd and hidp running?

Thanks...

Signature · 2 lines
Regards,
--Codefritz

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#1 lore raw

Am Mittwoch, den 11.06.2008, 09:10 +0200 schrieb Fritz Code:

Quoted 8 lines

Hi!

is it right that the two components hidd (the daemon) and the kernel module hidp (found in net/bluetooth/) work together in order to provide support for Bluetooth Keyboards and other HID devices? As far as I know hidd has been replaced, if yes with what? And which role plays the Input service which is also an own folder in the bluez-utils?

I dunno.

Quoted 8 lines

Anyway, the two components hidd and hidp provide HID support? I took a look at hidd and hidp and found out that hidd listends for incoming connections, if it gets one it forwards this connection to the kernel
modules hidp which adds it to its handlers. From there the kernel module serves the connection and uses the well known input function input_event to get the scancodes into the input system of linux.

I spent some time debugging my bluetooth mouse. (I was using the 2.6.25.4 kernel).

The hid traffic is done inside the kernel. I know there is some input_event codepath in hidp, but for my mouse, this codepath was NOT taken. there is an alternative codepath that forwards such bluetooth frames after some mangling to the generic hid driver, which parses the events, and uses register_event.

Therefore you need the generic hid implementation of the kernel, too. in 2.6.25.4, and possibly earlier 2.6er kernels, there is a generic hid driver core, that is used by the usb_hid driver and hidp. The generic core does the nasty stuff like parsing the usage tables, etc ...

Quoted 3 lines

So for a basic support of keyboards I only need hidd and hidp running?

i suspect that you need hcid as a prerequisite for hidd.
I found out that if you do a 'hidd --search', nothing is forked. might be wrong thou.

Quoted 17 lines

Thanks...

Signature · 11 lines
Regards,
--Codefritz



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________ Bluez-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-users
Signature · 12 lines
Thomas Ilnseher <[email protected]>


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
author
#2 lore raw

Thanks for your help so far.
I will take a look in detail concerning the functionality of hidp and its real prerequisites.
The thing is, I can only use Kernel 2.4.21.
It might be ok to port the module hidp to kernel 2.4 but if it also uses a generic HID Impl. of 2.6 which is total different to the one in 2.4 it might be too much work..
However, I've also tried bthid of Peter Klausler, it worked fine so far, but if the Keyboard goes in idle-mode and tries to reconnect, bthid crashes with a segmentation fault. So there seems to be a bug in the listen mode of bthid.

So I will still focus both strategies... we will see which one is better...
1. porting hipd, hidd to Kernel 2.4!
2. debugging bthid!

Any help, hints are welcome...

thanks,
Fritz

Quoted 73 lines · Thomas Ilnseher

Am Mittwoch, den 11.06.2008, 09:10 +0200 schrieb Fritz Code:

Quoted 8 lines

Hi!

is it right that the two components hidd (the daemon) and the kernel module hidp (found in net/bluetooth/) work together in order to provide support for Bluetooth Keyboards and other HID devices? As far as I know hidd has been replaced, if yes with what? And which role plays the Input service which is also an own folder in the bluez-utils?

I dunno.

Quoted 8 lines

Anyway, the two components hidd and hidp provide HID support? I took a look at hidd and hidp and found out that hidd listends for incoming connections, if it gets one it forwards this connection to the kernel
modules hidp which adds it to its handlers. From there the kernel module serves the connection and uses the well known input function input_event to get the scancodes into the input system of linux.

I spent some time debugging my bluetooth mouse. (I was using the 2.6.25.4 kernel).

The hid traffic is done inside the kernel. I know there is some input_event codepath in hidp, but for my mouse, this codepath was NOT taken. there is an alternative codepath that forwards such bluetooth frames after some mangling to the generic hid driver, which parses the events, and uses register_event.

Therefore you need the generic hid implementation of the kernel, too. in 2.6.25.4, and possibly earlier 2.6er kernels, there is a generic hid driver core, that is used by the usb_hid driver and hidp. The generic core does the nasty stuff like parsing the usage tables, etc ...

Quoted 3 lines

So for a basic support of keyboards I only need hidd and hidp running?

i suspect that you need hcid as a prerequisite for hidd.
I found out that if you do a 'hidd --search', nothing is forked. might be wrong thou.

Quoted 11 lines

Thanks...

--
Regards,
--Codefritz

Quoted 8 lines

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________ Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

--
Thomas Ilnseher <[email protected]>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

Signature · 12 lines
Regards,
--Codefritz

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
#3 lore raw

Am Mittwoch, den 11.06.2008, 11:33 +0200 schrieb Fritz Code:

Quoted 7 lines

Thanks for your help so far.
I will take a look in detail concerning the functionality of hidp and its real prerequisites.
The thing is, I can only use Kernel 2.4.21.
It might be ok to port the module hidp to kernel 2.4 but if it also uses a generic HID Impl. of 2.6 which is total different to the one in 2.4 it might be too much work..

It is very different to 2.4 'cause 2.4 has an integrated usbhid driver. i think bt was teh reason for the split in 2.6 ...

Quoted 4 lines

However, I've also tried bthid of Peter Klausler, it worked fine so far, but if the Keyboard goes in idle-mode and tries to reconnect, bthid crashes with a segmentation fault. So there seems to be a bug in the listen mode of bthid.

never heard of that.

Just to be curious: are you using some kind of hacked 2.4 kernel for some embedded system, or are there other reasons why you want to stay with 2.4 ?

Quoted 9 lines

So I will still focus both strategies... we will see which one is better...
1. porting hipd, hidd to Kernel 2.4!
2. debugging bthid!

Any help, hints are welcome...

Signature · 12 lines
Thomas Ilnseher <[email protected]>


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
author
#4 lore raw
Quoted 15 lines · Thomas Ilnseher

Am Mittwoch, den 11.06.2008, 11:33 +0200 schrieb Fritz Code:

Quoted 7 lines

Thanks for your help so far.
I will take a look in detail concerning the functionality of hidp and its real prerequisites.
The thing is, I can only use Kernel 2.4.21.
It might be ok to port the module hidp to kernel 2.4 but if it also uses a generic HID Impl. of 2.6 which is total different to the one in 2.4 it might be too much work..

It is very different to 2.4 'cause 2.4 has an integrated usbhid driver. i think bt was teh reason for the split in 2.6 ...

Quoted 4 lines

However, I've also tried bthid of Peter Klausler, it worked fine so far, but if the Keyboard goes in idle-mode and tries to reconnect, bthid crashes with a segmentation fault. So there seems to be a bug in the listen mode of bthid.

Quoted 5 lines

never heard of that.

Just to be curious: are you using some kind of hacked 2.4 kernel for some embedded system, or are there other reasons why you want to stay with 2.4 ?

yes thats right.

Btw, it seems Version 1.1 of hidp doesnt use the generiv HID input system but the traditional input system of linux (input/input.c).

Quoted 25 lines
Quoted 3 lines

So I will still focus both strategies... we will see which one is

better...

Quoted 7 lines

1. porting hipd, hidd to Kernel 2.4!
2. debugging bthid!

Any help, hints are welcome...

--
Thomas Ilnseher <[email protected]>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

Signature · 2 lines
Regards,
--Codefritz

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users