FireBLE/RSSI test app for android

来自Firefly wiki
跳转至: 导航搜索

Function Introduction

Major Functions of RSSI Test App:

  • Manage Connection. Focus on scan ,connect and disconnect functionality for BLE devices
  • RSSI Test. Read RSSI value of BLE devices and show a graph of RSSI value changing.

Manage Connection

Connection Manager.First,using startLeScan()and stopLeScan()methods to scan the BLE devices,and then using connectGatt() method to connect the BLE device and get BluetoothGatt object。Finally when you have no need to using the BLE devices,RSSI test app will invoke close()method to shut down the connection.

RSSI Test

Once Getting the BluetoothGatt object of the BLE device, RSSI test app will use readRemoteRssi() method to read the current RSSI value of the BLE device at regular intervals.After using readRemoteRssi() method,it can get the response from onReadRemoteRssi()method of the BluetoothGattCallback object. Then RSSI test app will collect the RSSI value and draw a changing graph base on these datas.
Rssi pic 1.jpg Rssi pic 2.jpg