Hello!
i´m enable ble long range like central for scanner beacons, i can see long range beacons, but only one time, then i need to restart my DK: i use to do this ble_uart_c example adding all of this:
on main:
static ble_gap_scan_params_t const m_scan_param =
{
.active = 0x00,
.extended = 0x01,
.interval = NRF_BLE_SCAN_SCAN_INTERVAL,
.window = NRF_BLE_SCAN_SCAN_WINDOW,
.timeout = 0x0000, // No timeout.
.scan_phys = BLE_GAP_PHY_CODED , //BLE_GAP_PHY_AUTO ,
.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
};
static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_EXTENDED_MIN]; /**< buffer where advertising reports will be stored by the SoftDevice. */
/**@brief Pointer to the buffer where advertising reports will be stored by the SoftDevice. */
static ble_data_t m_scan_buffer =
{
m_scan_buffer_data,
BLE_GAP_SCAN_BUFFER_EXTENDED_MIN
};
----------------------------------------------------------------------------------------------
on ble_evt_handler:
case BLE_GAP_EVT_ADV_REPORT:
printf("\r\n MAC: [%02x:%02x:%02x:%02x:%02x:%02x]",
adv->peer_addr.addr[5], adv->peer_addr.addr[4], adv->peer_addr.addr[3],
adv->peer_addr.addr[2], adv->peer_addr.addr[1], adv->peer_addr.addr[0])
break;
-----------------------------------------------------------------------------------------------
on start_scan:
ret = sd_ble_gap_scan_start(&m_scan_param, &m_scan_buffer);
------------------------------------------------
on sdk_config:
// <o> NRF_BLE_SCAN_SCAN_PHY - PHY to scan on.
// <0=> BLE_GAP_PHY_AUTO
// <1=> BLE_GAP_PHY_1MBPS
// <2=> BLE_GAP_PHY_2MBPS
// <4=> BLE_GAP_PHY_CODED
// <255=> BLE_GAP_PHY_NOT_SET
#ifndef NRF_BLE_SCAN_SCAN_PHY
#define NRF_BLE_SCAN_SCAN_PHY 4
#endif
i forgot something? or misconfigured?
thanks!