Hi.
I want to advertise switching 1Mbit PHY and CodedPHY every 5 seconds.
I designed it like this based on nrf52 ble app uart long range example.
advertising_start(coded)-->5s-->BLE_GAP_TIMEOUT_SRC_ADVERTISING{advertising_start(1MbpsPHY)}-->5s
-->BLE_GAP_TIMEOUT_SRC_ADVERTISING{advertising_start(coded)}-->....
The code is as follows.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define APP_ADV_TIMEOUT_IN_SECONDS 5
void advertising_start(void)
{
static ble_gap_adv_params_t adv_params = {0};
adv_params.properties.connectable = 1;
// Setting up the scan response packet is currently not supported when using CODED phy
adv_params.properties.scannable = 0;
adv_params.properties.legacy_pdu = 0;
adv_params.p_peer_addr = NULL;
adv_params.fp = BLE_GAP_ADV_FP_ANY;
adv_params.interval = APP_ADV_INTERVAL;
adv_params.duration = APP_ADV_TIMEOUT_IN_SECONDS * 100;
if(adv_coded){
adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;
adv_coded = false;
}
else{
However, in my Xperia it was not displayed at 1Mbps PHY.
Is there anything else I need to change?
thanks