I use:
- pca10059, connectivity_4.1.1_usb_with_s140_6.1.1.hex
- nrf-ble-driver-4.1.1-win_x86_32
I am trying to scan BLE advertise. I have a problem that ALL packets that i recieve have <31 bytes of data. It is wrong, because i see more data from devices in nRF Connect.
In result i cant parse BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME or BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME from devices that use extended advertise. I get name only from scan response packets, but it takes a lot of time. How to get full packets?
Here is my scan config:
Fullscreen
1
2
3
SCAN_INTERVAL = 0x00A0,
SCAN_WINDOW = 0x00A0,
SCAN_TIMEOUT = 0x0
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
uint8_t scan_buffer_data[BLE_GAP_SCAN_BUFFER_EXTENDED_MIN] = { 0 };
ble_data_t mAdvReportBuffer = {
scan_buffer_data,
BLE_GAP_SCAN_BUFFER_EXTENDED_MIN
};
const ble_gap_scan_params_t mScanParam = {
1,
0,
1,
BLE_GAP_SCAN_FP_ACCEPT_ALL,
BLE_GAP_PHY_1MBPS,
(uint16_t)SCAN_INTERVAL,
(uint16_t)SCAN_WINDOW,
(uint16_t)SCAN_TIMEOUT,
{ 0 }
};
First start scan call:
Fullscreen
1
uint32_t error_code = sd_ble_gap_scan_start(adapter, &mScanParam, &mAdvReportBuffer);
Next scan call in event handler:
Fullscreen
1
errCode = sd_ble_gap_scan_start(adapter, NULL, &mAdvReportBuffer);