HID host multiple connections

34 views
Skip to first unread message

Stéphane Lenclud

unread,
Oct 12, 2024, 2:49:17 AM10/12/24
to btstack-dev
Hi,

Should the HID host be capable of handle multiple connections?
I was not able to get it working.
If one device is connected other devices can't connect.
I didn't get any HID event corresponding to the second connection coming in.

Cheers,
S.

Stéphane Lenclud

unread,
Oct 12, 2024, 3:50:43 AM10/12/24
to btstack-dev
Ok I found this configuration option MAX_NR_HID_HOST_CONNECTIONS so I guess I should set it to something higher than one 😁
Does it need to match MAX_NR_HCI_CONNECTIONS? Should I also adjust other configuration option for best performance?
Could we get an event/notification when an incoming connection is denied because we have too many connection?

Matthias Ringwald

unread,
Oct 14, 2024, 5:10:10 AM10/14/24
to btsta...@googlegroups.com
Hi Stéphane

MAX_NR_HID_HOST_CONNECTIONS does not match MAX_NR_HCI_CONNECTIONS, but it would make sense if HID is your main application.
You also need 2 L2CAP Connections for each HID Device.

Interesting point about the reject. At the moment, no service emits an event, as the connection gets rejected.
What would you do in your application if you get an event about a rejected connection due to resource limitations?

Best
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 on the web visit https://groups.google.com/d/msgid/btstack-dev/875f9c06-ff8c-4f89-9b07-3bd968710795n%40googlegroups.com.

Stéphane Lenclud

unread,
Feb 1, 2025, 11:30:23 AMFeb 1
to btstack-dev
We could notify the user that too many devices are connected.

Matthias Ringwald

unread,
Feb 24, 2025, 5:04:02 AMFeb 24
to btsta...@googlegroups.com
Hi Stéphane

We have extended the HID_SUBEVENT_INCOMING_CONNECTION event with a status field and set it to ERROR_CODE_MEMORY_CAPACITY_EXCEEDED
if allocation fails on the develop branch.

Please let me know if this helps.

Cheers
Matthias
> To view this discussion visit https://groups.google.com/d/msgid/btstack-dev/aeb11739-4005-4461-a21e-302d8739d8fen%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages