- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am able to scan all nearby devices with RSSI but I want to fetch their local name of BLE. How can I get the local name?
Below is my code:
void scanResult(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data)
{
// uint8_t mfgLen;
// uint8_t* mfgData = wiced_bt_ble_check_advertising_data( p_adv_data,0xFF,&mfgLen);
WICED_BT_TRACE("Found device %d ",p_scan_result->rssi);
if(p_scan_result->rssi>-80){
uint8_t index=0;
int fieldLength=p_adv_data[index];
do {
for(int i=0;i<=fieldLength;i++)
WICED_BT_TRACE("%02X ",p_adv_data[index+i]);
index = index + fieldLength + 1;
fieldLength = p_adv_data[index];
} while(fieldLength);
}
WICED_BT_TRACE("\n");
}
Thanks in advance.
Regards,
Neeraj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get the BLE device name only if it is contained in the advertising packet or scan response packet.
If the slave doesn't broadcast the name in them, the master can't get it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get the BLE device name only if it is contained in the advertising packet or scan response packet.
If the slave doesn't broadcast the name in them, the master can't get it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have confirmed on the nRF Connect app. I can see a name on the nRF connect.
May I know which API function is available to fetch the scanned device local name.
Thanks and regards,
Neeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you check if the name is contained in the adv or scan response packet of the peripheral device? We can't get the name if they don't contain it.