Reading Bluetooth RSSI for BLE proximity profile in Android
Asked Answered
Z

3

4

I am currently developing Bluetooth Low Energy proximity profile for Android and I have stumbled upon an issue regarding RSSI.

In order to make proximity profile work I have to receive RSSI data with already connected device every short period.

As I did some research I understand it is possible to get Bluetooth RSSI during device discovery. That doesn't work for me as the slave device doesn't advertise after connection.

The other way round is digging down to HCI level and using BlueZ. It seems to be pretty low level. Has anyone had any experience with that?

Has anyone seen a proximity profile developed on Android?

Zincography answered 2/8, 2012 at 9:20 Comment(1)
Do you mean that you want the Android device to emulate a peripheral running the proximity profile, or that you want the Android device to connect to a device with the proximity profile?Itagaki
D
1

You can get the data & RSSI in device scan call back. Refer to the BluetoothLeGatt sample.

Deduce answered 22/8, 2014 at 5:49 Comment(1)
Resources in this link are not available anymore.Faveolate
L
1

you can use readRemoteRssi () method repeatedly after some time after connection. but it will not work well.because of pending flag error. another approch is you can start and stop blescan and get rssi value of scan device it will be better approach because in nexus 7 2013 device and some Samsung devices are not filter ble device and it will return ble device ones .

Locoism answered 23/8, 2014 at 17:33 Comment(0)
P
0
final Runnable runnable = new Runnable() {  
    @Override
    public void run() {
        // TODO Auto-generated method stub
        mBluetoothLeService.readRemoteRssi();
        mHandler.postDelayed(this, 1000);
    }
};

and add mHandler.postDelayed(runnable, 1000); Should work.
Phonate answered 31/3, 2015 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.