Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get the actual name of a bluetooth low energy device?

I need to get the friendly device name from a ble sensor. I want to find the device and tell the user they are connected to "My Home Sensor" for example. I can find the device, but I don't know how to find that data.

In regular bluetooth, I believe I can use BLUETOOTH_DEVICE_INFO or winsock. Is there a bluetooth low energy equivalent to bluetooth's BLUETOOTH_DEVICE_INFO? If possible, could you please provide an example for how to get the information (i.e. device name)?

I'm using Windows 8.1, c++ and visual studio 2013. I've been referencing windows dev docs, but I haven't found anything useful yet.

Thanks!

like image 951
JustBlossom Avatar asked Feb 09 '23 19:02

JustBlossom


1 Answers

Assuming that you are able to get connected with the GATT Server, when you parse the GAP profile of the device, you will find an attribute for Device Name under Generic Access Profile (GAP).

This is a list of all the standard GATT Services and their UUIDs. UUID for GAP is 0x1800.
You can look for the list of all the standard Characteristics and their UUIDs. For the Device Name Characteristic, it is 0x2A00.
This explains that the Device Name characteristic is a part of the GAP.

like image 53
WedaPashi Avatar answered Apr 09 '23 14:04

WedaPashi