bluetoothrssinrf51

How to continuously get RSSI without connecting to the BLE peripheral device from BLE central device?


I use nrf51822 sdk130 (central device) and nrf51822 sdk110(peripheral device). I want to continuously get rssi value of the peripheral device using the central device without connection. Normally I start the scan_start function using button_handler function. Then connection establish occurs. But I dont want to do that. I want to Connect automatically device without press the button (without button_handler function). And I want the device not to reconnect until it leaves the bluetooth signal range.(think like KEYLESS GO - Mercedes). Is it possible?


Solution

  • it is possible to send non-connectable advertisement from the peripheral. This is intended to broadcast some information without being connected. using this central device can read the rssi of the peripheral's advertisement. The second part of your question is not very clear.if the application in the central does not see an advertisement it is possible to detect the absence of the peripheral.

    see passive scanning sequence below. enter image description here

    enter image description here

    see active scanning sequence below, the only requirement is that the active scanner should send at least one scan Request. enter image description here

    active vs passive scanning: enter image description here

    Once connection is established, RSSI can be read using following HCI command. enter image description here The relevant section for LE connection is as follows. enter image description here