Re: [PATCH 2/3] hog: re-enable HoG report notifications on HoG device reconnect

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

 



Hi Petri,

On Sat, Apr 18, 2015 at 1:00 AM, Petri Gynther <pgynther@xxxxxxxxxx> wrote:
> On HoG device reconnect, re-enable HoG report notifications every
> time by writing the client characteristic configuration attribute
> of each HoG report.
>
> Doing this on every reconnect:
> 1. ensures that HoG report notifications are always enabled
>    (e.g. lost report notification state in battery swap).
> 2. signals to HoG device that it can start sending HoG reports
>    (e.g. buffered keypresses while the reconnect is still pending).

Is that happening for a specific device? For 1 I suppose it would
loose the paring keys as well which means we would not be able to
connect at all as HoG mandates pairing, or does it loose only the CCC
configuration? Reason 2 is not necessary the behavior every device
would have, for example I don't expect a mouse to buffer anything and
even a keyboard may buffer only the last key pressed since it might
have very little memory to spend in buffering, anyway I suppose reason
1 is what you should really concentrate to tell us what is going on.

> ---
>  profiles/input/hog.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/profiles/input/hog.c b/profiles/input/hog.c
> index c55443c..690fd43 100644
> --- a/profiles/input/hog.c
> +++ b/profiles/input/hog.c
> @@ -842,10 +842,7 @@ static void attio_connected_cb(GAttrib *attrib, gpointer user_data)
>         for (l = hogdev->reports; l; l = l->next) {
>                 struct report *r = l->data;
>
> -               r->notifyid = g_attrib_register(hogdev->attrib,
> -                                       ATT_OP_HANDLE_NOTIFY,
> -                                       r->decl->value_handle,
> -                                       report_value_cb, r, NULL);
> +               enable_report_notification(r);
>         }
>  }
>
> --
> 2.2.0.rc0.207.ga3a616c
>
> --
> 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