Arduino Nano BLE scanning with Mac address

Hi,

I have following function, where I have do BLE scanning for a specific BLE device by mac address.
The mac address is sent by another device with additional info. After some char manipulation, I get the mac address as char array ( or c -string). Then I convert that to a String only at function where BLE has to scan. This is to avoid any memory issues. But the beacon is not being picked up. Serial.println shows the correct address. Please advice.
Thank you

void scanforble(const char* beacon){
Serial.println(beacon);
String beaconstring = String(beacon);
Serial.println(beaconstring);
BLE.scanForAddress(beaconstring);
BLEDevice peripheral = BLE.available();
if (peripheral) {
Serial.println('B');
}
}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.