BLE5 - periodic advertising

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

BLE5 - periodic advertising

Postby chegewara » Tue Apr 20, 2021 4:03 pm

Hi,
i am playing a bit with BLE5 features and i am wondering. I understand it is possible to miss some periodic advertising packets, but is it possible it may happen in such situation:
- environment: not very crowded
- periodic advertising every 1000ms
- both peer devices do nothing but advertising/scanning
- advertising device is updating 1 byte in advertising data every 1000ms, so it is a simple counter right now

Code: Select all

17:21:19.607 -> [ 29323][I][sketch_apr20b.ino:105] onReport(): data: 30
17:21:20.607 -> [ 30323][I][sketch_apr20b.ino:103] onReport(): periodic adv report, sync handle 1 data status 0 data len 11 rssi -35
17:21:20.607 -> [ 30323][I][sketch_apr20b.ino:105] onReport(): data: 31
17:21:21.575 -> [ 31323][I][sketch_apr20b.ino:103] onReport(): periodic adv report, sync handle 1 data status 0 data len 11 rssi -43
17:21:21.620 -> [ 31323][I][sketch_apr20b.ino:105] onReport(): data: 32
17:21:23.616 -> [ 33323][I][sketch_apr20b.ino:103] onReport(): periodic adv report, sync handle 1 data status 0 data len 11 rssi -38
17:21:23.616 -> [ 33323][I][sketch_apr20b.ino:105] onReport(): data: 34
17:21:24.599 -> [ 34323][I][sketch_apr20b.ino:103] onReport(): periodic adv report, sync handle 1 data status 0 data len 11 rssi -42
17:21:24.599 -> [ 34323][I][sketch_apr20b.ino:105] onReport(): data: 35
Another question i have is: why minimum periodic advertising is 4 bytes? I could not find any info in bluetooth documentation about it:
https://www.mouser.it/pdfdocs/bluetooth-Core-v50.pdf

When i setup like this:

Code: Select all


Thanks
static uint8_t periodic_adv_raw_data[] = {
        0x2, 0xff, 0x0
};
then i am getting this error:

Code: Select all

E (5090) BT_HCI: btu_ble_periodic_adv_report_evt, Invalid params, the adv len is to short.

Who is online

Users browsing this forum: No registered users and 150 guests