Re: [PATCH BlueZ 1/1] input/hog-lib: set notify bit on every connection

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

 



Hi Simon,

On Wed, Jul 25, 2018 at 11:07 PM, Simon Schubert <2@xxxxxxxx> wrote:
> At least the Microsoft Bluetooth Mobile Mouse 3600 does not persist
> the CCC.  To work around this bug, we check and process the CCC like
> we would do for an initial discovery.
> ---
>  profiles/input/hog-lib.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
> index d9ed80689..d3439b8ba 100644
> --- a/profiles/input/hog-lib.c
> +++ b/profiles/input/hog-lib.c
> @@ -1610,10 +1610,10 @@ bool bt_hog_attach(struct bt_hog *hog, void *gatt)
>         for (l = hog->reports; l; l = l->next) {
>                 struct report *r = l->data;
>
> -               r->notifyid = g_attrib_register(hog->attrib,
> -                                       ATT_OP_HANDLE_NOTIFY,
> -                                       r->value_handle,
> -                                       report_value_cb, r, NULL);
> +               if (r->type == HOG_REPORT_TYPE_INPUT) {
> +                       read_char(r->hog, r->hog->attrib,
> +                                 r->ccc_handle, ccc_read_cb, r);
> +               }

There is a task to convert bt_hog instance to use bt_gatt_client
instead of GAttrib, that would fix this problem since
bt_gatt_client_register_notify always write to the CCC for the first
subscription.

>         }
>
>         return true;
> --
> 2.18.0
>
> --
> 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
--
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