cancel
Showing results for 
Search instead for 
Did you mean: 

BLE Additional beacon feature does not work

koteeq
Associate II

Calling "aci_gap_additional_beacon_start" first works successfully, but calling "aci_gap_set_discoverable" after that returns "0x0C Command disallowed".

If I swap these instructions and set up the main advertisement first, I get the same 0x0C error trying to set up an additional beacon.

Please find the code example here: https://github.com/flipperdevices/flipperzero-firmware/blob/zlo/additional_beacon_test/firmware/targets/f7/ble_glue/gap.c

Main advertisement initialization is contained in the "gap_advertise_start" function. Beacon initialization is inside "beacon_start".

Radiostack versions used: 1.13.3 Lite, 1.14.1 Lite

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

Hello,

I checked your code and I think I found the root cause of your issue, to support advertising and additional beaconing feature, you should have at least to support 2 links. To do this, change the value of the following define in app_conf.h file:

#define CFG_BLE_NUM_LINK            2

Best Regards

View solution in original post

5 REPLIES 5
koteeq
Associate II

Update: I also tried 1.14.1 Lite, but no luck.

Remy ISSALYS
ST Employee

Hello,

Are you using P-NUCLEO-WB55 Nucleo board or a custom board? Did you try to start from an example of STM32CubeWB package for example BLE_p2pServer?

Best Regards

koteeq
Associate II

Hi @Remy ISSALYS​!

I am using a custom board, namely a Flipper Zero device. Unfortunately, I don't have a Nucleo board, and I'm not experienced enough to compile bare BLE_p2pServer for Flipper Zero.

However, all BLE advertising initialization code can be found here, including the attempt to use additional beacon: https://github.com/flipperdevices/flipperzero-firmware/blob/zlo/additional_beacon_test/firmware/targets/f7/ble_glue/gap.c

Remy ISSALYS
ST Employee

Hello,

I checked your code and I think I found the root cause of your issue, to support advertising and additional beaconing feature, you should have at least to support 2 links. To do this, change the value of the following define in app_conf.h file:

#define CFG_BLE_NUM_LINK            2

Best Regards

Thank you, Remy, this helped.