BLEScan not returning beacon name.
Posted: Wed Jul 10, 2019 12:45 pm
by davettl
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
{
void onResult(BLEAdvertisedDevice advertisedDevice)
{
printf("Name %s, Address %s, RSSI %d\n", advertisedDevice.getName().c_str(), advertisedDevice.getAddress().toString().c_str(), advertisedDevice.getRSSI());
//data = json.createNestedArray("dat");
}
};
advertisedDevice.getName().c_str() returns an empty string after the first time a iBeacon is received. The beacon does have a name and my phone test app receives the name without any problems. advertisedDevice.toString().c_str() also omits the name. All other info is returned correctly
Re: BLEScan not returning beacon name.
Posted: Thu Aug 15, 2019 3:20 am
by ytan86
I suspect that I am facing the same problem. I am using SampleAsyncScan.cpp by nkolban, and the scan only returns BLE module information in the first scan, and not subsequent ones.
Issue mentioned here:
https://github.com/nkolban/esp32-snippe ... -521498490