Page 1 of 1

BLEScan not returning beacon name.

Posted: Wed Jul 10, 2019 12:45 pm
by davettl
  1. class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
  2. {
  3.     void onResult(BLEAdvertisedDevice advertisedDevice)
  4.     {
  5.         printf("Name %s, Address %s, RSSI %d\n", advertisedDevice.getName().c_str(), advertisedDevice.getAddress().toString().c_str(), advertisedDevice.getRSSI());
  6.         //data = json.createNestedArray("dat");
  7.     }
  8. };
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