Bluetooth LE connectable unidirected advertisements' long intervals unreliable #1674

Open
opened 2024-03-18 16:11:36 -05:00 by matsobdev · 2 comments
matsobdev commented 2024-03-18 16:11:36 -05:00 (Migrated from github.com)

Values greater than approx. 100 ms are unreliable for connectable unidirected advertisements, ex. 150 ms equals more likely to 800 ms, 1280 ms - 6500 ms (with high variations). Non-connectable unidirected advertisements' intervals are reliable. BTstack it is not the root of the problem. It is the same with or without it - just HCI commands written by cyw43 driver. To reproduce, just use some BTstack example, like hog_mouse_demo.c:

// setup advertisements
uint16_t adv_int_min = 0x0030;
uint16_t adv_int_max = 0x0030;
uint8_t adv_type = 0;

adv_int_min and adv_int_max are values of intervals in number of time slots (0,625 ms). Min value is 32 (0x20), max 16384 (0x4000). adv_type of 3 will switch it to non-connectable unidirected. It seems to be more likely firmware or CYW43439 ROM for Bluetooth.

Values greater than approx. 100 ms are unreliable for connectable unidirected advertisements, ex. 150 ms equals more likely to 800 ms, 1280 ms - 6500 ms (with high variations). Non-connectable unidirected advertisements' intervals are reliable. BTstack it is not the root of the problem. It is the same with or without it - just HCI commands written by cyw43 driver. To reproduce, just use some BTstack example, like `hog_mouse_demo.c`: ``` // setup advertisements uint16_t adv_int_min = 0x0030; uint16_t adv_int_max = 0x0030; uint8_t adv_type = 0; ``` `adv_int_min` and `adv_int_max` are values of intervals in number of time slots (0,625 ms). Min value is 32 (0x20), max 16384 (0x4000). `adv_type` of 3 will switch it to non-connectable unidirected. It seems to be more likely firmware or CYW43439 ROM for Bluetooth.
peterharperuk commented 2024-10-25 06:40:19 -05:00 (Migrated from github.com)

What exactly is unreliable? Is it the connection to the device? I do see problems pairing to a hog mouse device when these values are high (10000). But I see the same problem when using the libusb port and a USB dongle. So I guess I need convincing that this is a specific issue with cyw43 that doesn't affect other controllers. Are you wanting to modify these values to save power?

What exactly is unreliable? Is it the connection to the device? I do see problems pairing to a hog mouse device when these values are high (10000). But I see the same problem when using the libusb port and a USB dongle. So I guess I need convincing that this is a specific issue with cyw43 that doesn't affect other controllers. Are you wanting to modify these values to save power?
matsobdev commented 2024-11-12 03:01:18 -06:00 (Migrated from github.com)

What is unreliable, is interval value between advertisements, when the value is set to "high" number of milliseconds. To be honest, it won't be a real world issue, maybe there is something wrong with Bluetooth firmware, I don't know. Spec allows broad range of values and just high ones doesn't seem to do what they are told to do. I see it a problem, when Pico W would be told specifically to advertise in wide intervals for whatever reason. So very edge case. Since radio is on for a short amount of time to TX and comparing to Pico W current draw, there won't be great power savings.

What is unreliable, is interval value between advertisements, when the value is set to "high" number of milliseconds. To be honest, it won't be a real world issue, maybe there is something wrong with Bluetooth firmware, I don't know. Spec allows broad range of values and just high ones doesn't seem to do what they are told to do. I see it a problem, when Pico W would be told specifically to advertise in wide intervals for whatever reason. So very edge case. Since radio is on for a short amount of time to TX and comparing to Pico W current draw, there won't be great power savings.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#1674
No description provided.