RE: BlueZ question about HID profile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

Thanks a lot!
Assuming we have the input source and BlueZ working as a HID device,
what interface BlueZ will expose for us to send a key press to remote? /dev/xxx or function call?
In another word, how to transfer the key press from input device to BlueZ?

Best Regards,
Gilbert

-----Original Message-----
From: Luiz Augusto von Dentz [mailto:luiz.dentz@xxxxxxxxx]
Sent: Tuesday, January 27, 2015 12:13 AM
To: Gilbert Gao
Cc: Marcel Holtmann; linux-bluetooth@xxxxxxxxxxxxxxx
Subject: Re: BlueZ question about HID profile

Hi,

On Fri, Jan 23, 2015 at 12:10 PM, Gilbert Gao <Gilbert.Gao@xxxxxxxxx> wrote:
>
> Hi,
>
> I add KEYB to sdp:
> #sdptool add KEYB
>
> And HID service can be found and connected by a remote dongle on PC,
> From log, connect_event_cb() is called, but this function calls input_device_set_channel(), in which find_device() returns NULL, because the global variable "devices" is NULL, so the connection can not be established.
> I want to know how to modify here for successful connection as a keyboard.
>
> And I'm not very clear which interfaces should be called for HID device role to send data(such as a key press).
>
> Sicerely expect your advice! Thank you!

First of all, no top posting in the mailing list please, second the
sdptool shall not be used since you did not have any plugin to
implement it won't work, in order for this to work input plugin
probably needs changes, it just happens to connect because the PSM are
the same for both roles but since there is no actual record for the
host the plugin will never be initialize to work with the device
connecting thus the error you are seeing.

We could in theory enable HID device record but then input needs to
handle incoming connections and interface with some event input that
you might have to register over D-Bus, if you don't really have an
input device to be used as a source you could use uinput to emulate
one then bluetoothd would have to listen to the events, translate (not
sure if this step is really needed though) them to HID and then send
to the remote.

> Best Regards,
> Gilbert
>
>
> -----Original Message-----
> From: Gilbert Gao
> Sent: Tuesday, January 06, 2015 10:26 AM
> To: 'Marcel Holtmann'
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> Subject: RE: BlueZ question about HID profile
>
> Dear Marcel,
>
> Thank you very much!
> But now I'm not very clear about BlueZ HID implementation.
> Could you help to point out how to modify for a HID device role or any sample code?
>
> Best Regards,
> Gilbert
>
> -----Original Message-----
> From: Marcel Holtmann [mailto:marcel@xxxxxxxxxxxx]
> Sent: Tuesday, January 06, 2015 9:38 AM
> To: Gilbert Gao
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> Subject: Re: BlueZ question about HID profile
>
> Hi Gilbert,
>
>> Here is an emergent question about BlueZ feature:
>> I read the doc "supported-features.txt", which says BlueZ supports HID host.
>> And my question is whether HID device is supported?
>> Or can I use BlueZ HID profile to implement the Bluetooth HID device such as a Bluetooth mouse or keyboard?
>
> it should be pretty simple to implement a HID device role. There have been external projects in the past that did this. The reason why this is not in BlueZ is mainly due to the fact that we would need to get the input events from some kind of source. So if you have that figured out, then it should be simple to provided HID device role.
>
> Regards
>
> Marcel
>
>
> **********************Confidentiality Notice************************
> The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
Luiz Augusto von Dentz
**********************Confidentiality Notice************************
The opinions and views expressed in this e-mail are solely those of the author and do not necessarily represent our company and its affiliates. If this e-mail is not originally intended for you, or received by you in error, do not disclose its content to anyone and delete it immediately. This e-mail may contain information that is legally privileged, confidential or exempt from disclosure.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux