Device name

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ErVe_4649071
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked

Hello

Is there a way to get the name of the devices being scanned?

0 Likes
1 Solution

Hi ErVe_4649071 ,

If your device is a BLE Central / BT classic Master , then you can get the device name from the adv (if BLE) / inquiry response (if BT classic) data reported. However its optional for the peer device to add the device name in the adv / eir data. If the peer device is custom one which you develop, then you can make sure to add the device name in the adv / eir packet and hence you can ensure it will be reported in the adv data packet received by Central.

For example, in case of BLE Central , in scan result call back you can check if the adv data contains device name type using API wiced_bt_ble_check_advertising_data with parameter BTM_BLE_ADVERT_TYPE_NAME_COMPLETE ( refer hello_client implementation to check hello_sensor UUID )

Hope this clarifies your query. 

Regards,

Anjana

View solution in original post

5 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi ErVe_4649071

Could you please confirm which module / chip you are using ?

Also please confirm you are using BLE or BT classic

Regards,

Anjana

Hi AnjanaM_61

I am using CYBT-213043-02 module in ModusToolBox

I am trying to read the name of the Bluetooth devices that scan BLE or BT classic, I am looking to make it possible with both.

In the wiced_bt_ble.h library using wiced_bt_ble_scan_results_t I can only get Device address, LE Address type, Scan result event type and RSSI. But not Device Name of scanned devices

I hope and can support me

0 Likes

Hi ErVe_4649071 ,

If your device is a BLE Central / BT classic Master , then you can get the device name from the adv (if BLE) / inquiry response (if BT classic) data reported. However its optional for the peer device to add the device name in the adv / eir data. If the peer device is custom one which you develop, then you can make sure to add the device name in the adv / eir packet and hence you can ensure it will be reported in the adv data packet received by Central.

For example, in case of BLE Central , in scan result call back you can check if the adv data contains device name type using API wiced_bt_ble_check_advertising_data with parameter BTM_BLE_ADVERT_TYPE_NAME_COMPLETE ( refer hello_client implementation to check hello_sensor UUID )

Hope this clarifies your query. 

Regards,

Anjana

Hi AnjanaM_61

yes, that solves my question

thank you

Hi ErVe_4649071 ,

That's Great

Regards,

Anjana

0 Likes