HID over GATT auto reconnect

28 views
Skip to first unread message

Stéphane Lenclud

unread,
Feb 12, 2025, 2:36:32 PMFeb 12
to btstack-dev
I have a Logitech LIFT mouse pairing and connecting fine with a Pico 2 W.
However it won't reconnect without calling gap_connect and moving the mouse for some reason.
Is there no incoming connection workflow like with Classic HID?
Surely there must be a way for the mouse to initiate the connection right?

Stéphane Lenclud

unread,
Feb 12, 2025, 10:30:26 PMFeb 12
to btstack-dev
So looking into the specs relevant sections we have:
5.1.3. Device-Initiated Connection Procedure for Bonded Devices
and for our host part:
5.2.3. Device-Initiated Connection Procedure for Bonded Devices

This is telling use that basically the host should always be scanning for incoming connections.

Stéphane Lenclud

unread,
Feb 13, 2025, 5:44:11 AMFeb 13
to btstack-dev
I've implemented that scan as mentioned in the specs and it works well enough, the auto-reconnect works fine so far.
However my attempt at using that whitelist filtering does not seem to be working. I used gap_whitelist_add and passed 1 as last parameter to gap_set_scan_params but I'm still getting AD reports from every nearby devices for some reason.

gap_set_scan_params(0,2,18,1);

Matthias Ringwald

unread,
Feb 16, 2025, 12:32:24 PMFeb 16
to btsta...@googlegroups.com
Hi Stéphane

If you only scan with whitelist to re-connect a device, you can use the gap_connect_with_whitelist() command to connect to one of the devices in the whitelist.

Other than that, please send a HCI log for this. BTstack should stop scanning, update the scan parameters, and restart scanning with whitelist. Then, the Controller should only report devices with matching addresses.

Cheers
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to btstack-dev...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/btstack-dev/49d004c1-39a5-48c7-9bfa-ba383f0d5d52n%40googlegroups.com.

Stéphane Lenclud

unread,
Feb 18, 2025, 1:30:26 PMFeb 18
to btstack-dev
I'm not sure I understand how to use gap_connect_with_whitelist.
Do I still need to have a scan running for it to work?

Stéphane Lenclud

unread,
Feb 18, 2025, 1:31:22 PMFeb 18
to btstack-dev

I tried it without having a scan running and no reconnect was triggered.
Reply all
Reply to author
Forward
0 new messages