Checklist
How often does this bug occurs?
always
Expected behavior
When scanning with .limited set to true I don't expect to see advertisements that are general.
Actual behavior (suspected bug)
Advertisements of general discoverability are accepted.
Error logs or terminal output
No response
Steps to reproduce the behavior
In 9faf23c support for the observer role was added.
In that commit the following lines were added:
|
if (MYNEWT_VAL(BLE_ROLE_OBSERVER)) { |
|
/* Observer role is enabled; All adv reports regardless of |
|
* Flags AD Type need to be discovered. |
|
*/ |
|
return 0; |
|
} |
Since BLE_ROLE_OBSERVER is enabled by default, this basically breaks the limited flag (for which the test is just a few lines later).
|
if (ble_gap_master.disc.limited) { |
|
if (rc != 0) { |
|
/* The advertisement does not have Flags AD Type. Rejected */ |
|
return -1; |
|
} else if ((flags->length == 2) && !(flags->value[0] & BLE_HS_ADV_F_DISC_LTD)) { |
|
/* Limited flag is not set in Flags AD Type. Rejected */ |
|
return -1; |
|
} |
Maybe this is the intended behavior, but it is not clear from the description of the observer role flag that it should have an impact on the normal observation of the central. (At least it broke our unit tests)
Project release version
master
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Archlinux
Shell
ZSH
Additional context
No response
Checklist
How often does this bug occurs?
always
Expected behavior
When scanning with
.limitedset to true I don't expect to see advertisements that are general.Actual behavior (suspected bug)
Advertisements of general discoverability are accepted.
Error logs or terminal output
No response
Steps to reproduce the behavior
In 9faf23c support for the observer role was added.
In that commit the following lines were added:
esp-nimble/nimble/host/src/ble_gap.c
Lines 1783 to 1788 in ca6c617
Since BLE_ROLE_OBSERVER is enabled by default, this basically breaks the
limitedflag (for which the test is just a few lines later).esp-nimble/nimble/host/src/ble_gap.c
Lines 1795 to 1802 in ca6c617
Maybe this is the intended behavior, but it is not clear from the description of the observer role flag that it should have an impact on the normal observation of the central. (At least it broke our unit tests)
Project release version
master
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
Archlinux
Shell
ZSH
Additional context
No response