Hi Now I am developing the application to measure PER of each data rate of BLE.
For packet exchange, I use IPSP example in the latest nRF5 SDK version 15, s140.
I could change data rate to 2Mbps and 1Mbps, but I could not change to coded phy.
I add some part of ipsp accetor's code below
For Coded phy, in line 19,20, I use BLE_GAP_PHY_CODED only.
Thank you,
Elissa Park
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static void on_ble_evt(ble_evt_t const * p_ble_evt)
{
uint32_t err_code;
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_CONNECTED:
printf("BLE_GAP_EVT_CONNECTED\n");
APPL_LOG("Connected.");
LEDS_ON(CONNECTED_LED);
LEDS_OFF(ADVERTISING_LED);
if(p_ble_evt->evt.gap_evt.params.connected.role == BLE_GAP_ROLE_PERIPH)
{
printf("change phy as a periph\n");
ble_gap_phys_t const phys =
{
.rx_phys = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
.tx_phys = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
};