Yes, this is a problem with the 1.3.0 version of BleScanner because the P2/Photon 2 don't support LESC pairing in BLE.
The easiest solution is to build in Particle Workbench and make the following changes:
In lairdbt510.cpp, add a #if around the code that will fail. Note that Laird sensors won't work, but the code will compile and other beacons will work:
case BlePairingEventType::STATUS_UPDATED:
{
switch (event.payload.status.status)
{
#if !HAL_PLATFORM_RTL872X
case BLE_GAP_SEC_STATUS_SUCCESS:
dev->state_ = SENDING;
Log.trace("Pairing complete for: %s", dev->getAddress().toString().c_str());
break;
case BLE_GAP_SEC_STATUS_CONFIRM_VALUE:
dev->state_ = DISCONNECT;
Log.error("Passkey is incorrect");
if (dev->state_ != CLEANUP) {
auto p = Promise<bool>::fromDataPtr(dev->handler_data_);
p.setError(Error::INVALID_ARGUMENT);
dev->state_ = CLEANUP;
}
break;
#endif
default:
if (dev->state_ != CLEANUP) {
With Device OS 5.x you'll also get some warnings, but these can be ignored for now.
Also in project.properties in your project, modify it so it looks more like:
Note the orig_ prefix because otherwise the official version of BeaconScanner 1.3.0 will be used with cloud compiles instead of your modified version, and it won't compile.
I dont actually pair too any of the Laird sensors , just look at advertisements so thats not big deal. The coded PHY is a beast in the field for range and wall penitration. Thats a dissapointment.