cancel
Showing results for 
Search instead for 
Did you mean: 

BLE client retrieve device name and RSSI

brent239955
Associate
Posted on May 07, 2016 at 02:51

Hello,

I'm developing code for the BlueNRG-MS device, in a central role. I'm wondering what API allows me to retrieve the advertising devices name and the packet RSSI?  I've initiated a discovery with aci_gap_start_general_discovery_proc() and receive the  EVT_LE_ADVERTISING_REPORT event, but its not clear how to retrieve the ''Device Name'' and RSSI.

Thank you,

Brent

#ble #rssi #bluenrg-ms #bluenrg
1 REPLY 1
hardware
Associate II
Posted on May 25, 2016 at 23:58

You need to read the data section of the  EVT_LE_ADVERTISING_REPORT event for the device's name. Data section will look something like: 0201060508426C7565020A08 that should be read according to Bluetooth specs as follow:

02 = size, 01 = type = flag, 06 = value of flag

05 = size, 08 = short name, 426C7565 = Blue in ascii

02 = size, 0A = remote RSSI, 08 = value

Caution this is the remote RSSI meaning the value on the emitter side.

If you want the value on the receiver side, you'll need to use the RSSI section of the EVT_LE_ADVERTISING_REPORT event.

Hope this helps