I'm trying to test long range beacons with coded phy on the nrf52840 dongle, so I've set out to turn my nrf52840 DK into a beacon scanner that will spit out data over uart.
I've started with the ble_app_uart_c example and added the BLE_GAP_EVT_ADV_REPORT to the ble_evt_handler to pick them up.
I'm running into trouble actually changing to a coded phy for scanning, and the application seems to crash when I set the init_scan.p_scan_param.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static ble_gap_scan_params_t const m_scan_param_coded_phy =
{
.extended = 1,
.active = 0x01,
.interval = BLE_GAP_SCAN_INTERVAL_MIN,
.window = 10,
.timeout = 0x0000, // No timeout.
.scan_phys = BLE_GAP_PHY_CODED,
.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
};
static void scan_init(void)
{
ret_code_t err_code;
nrf_ble_scan_init_t init_scan;
memset(&init_scan, 0, sizeof(init_scan));
init_scan.connect_if_match = true;
init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
Not sure what's going on here at all, or if I'm at all doing the right thing!