How to Increase get beacon RSSI rate on ESP-32S

www933303
Posts: 2
Joined: Tue Jan 08, 2019 12:24 pm

How to Increase get beacon RSSI rate on ESP-32S

Postby www933303 » Tue Jan 08, 2019 12:30 pm

Hi, now i do some thing that is i using ESP-32S as scanner to get Beacon RSSI, but i have trouble that ESP-32S getting RSSI with once per second is faster i don't know how to code sketch to increase rate.
I try to change start(1) function value to 0.5 but it can not working, any one have a advice for me?
Using library are :
https://github.com/nkolban/ESP32_BLE_Arduino

The following are RSSI scan sketch:
[Codebox]#include <BLEAdvertisedDevice.h>
#include <BLEDevice.h>
#include <BLEScan.h>
#include <BLEBeacon.h>
BLEBeacon myBeacon;
BLEScan *scan;
BLEScanResults results;
BLEAdvertisedDevice device;
void setup() {
Serial.begin(115200);
BLEDevice::init("");
}

void loop() {
scan = BLEDevice::getScan();
scan->setActiveScan(true);
results = scan->start(1);
int best = cutof;
for (int i = 0; i < results.getCount(); i++) {
device = results.getDevice(i);
rssi = device.getRSSI();
}
}[/Codebox]

Who is online

Users browsing this forum: Bing [Bot] and 121 guests