ESP32 reduce BLE connection distance

Viewed 406

i need to connect my phone to the esp32 with BLE(Bluetooth Low Energy). But only when you are close to just 1 meters. So, how can i reduce the meters? And also if you go far away from 1 meter, it has to disconnect. I would be happy, if you answer...

2 Answers

Connect if the RSSI more than 40 and keep updating the RSSI for 2 seconds, get the average if it's more than -30 then you're too close to the device.

Related