Increased latencies when sending less often?

20 views
Skip to first unread message

Michael Przybilski

unread,
Feb 23, 2024, 2:49:55 AMFeb 23
to btstack-dev

On a Pico-W we are seeing that when we send fewer packets, the latency increases.
For example: 250 packets / second, the latency is
~6ms
With
125 packets / second, the latency goes up to an average of ~20ms
With
90 packets / second the latency goes to atrocious ~40ms

Has anyone else seen such behavior? Could this be some power-saving measure that is on by default?

Matthias Ringwald

unread,
Feb 23, 2024, 3:38:17 AMFeb 23
to btsta...@googlegroups.com
Hi Michael

I assume that this questions is for Bluetooth HID over Classic.

I haven't seen such behaviour and there's nothing in the Bluetooth spec that would explain this.

On "power saving measures", the main one is sniff mode. By default, sniff mode is turned off in the stack/the examples.

Some examples turn it on, e.g. the HID device ones. You can try to not turn it on there:
- remove the flag LM_LINK_POLICY_ENABLE_SNIFF_MODE from gap_set_default_link_policy_settings

There are also the hid_ssr_host_max_latency and hid_ssr_host_min_timeout fields that end up in the SDP record

Please see Appendix J: Sniff Subrating Example in the HID Spec v1.1
https://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/

It might be that these values, which are handled by the HID Host, can be used to optimize sniff mode (e.g. keep it on, but get a good latency as well)
Please check what other devices use for these and compare to the ones you're using currently.

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/f693fdec-50c2-4e55-90ea-818645c757d1n%40googlegroups.com.

Michael Przybilski

unread,
Feb 23, 2024, 5:06:35 AMFeb 23
to btstack-dev

Hi Mathias,

yes, this is classis BT HID.
We tried various values for hid_ssr_host_max_latency and hid_ssr_host_min_timeout, but that doesn't seem to make any difference. We also removed the LM_LINK_POLICY_ENABLE_SNIFF_MODE. Both, in the btstack_config.h of the host, as well as the client.
Could this be specific to the Pico?

Ciao,
        Michael
Reply all
Reply to author
Forward
0 new messages