I tried the sample code in ArduinoBLE.
And it works well when I select M7 as the target core, but if I select M4 as the target core, BLE.begin() will always return 0 (false).
So is it possible to use the co-processor to handle bluetooth on Giga?
So, despite my (deleted) recommendation of using a delay before begin() it looks like begin() still does not work - I was using the RGB LED's to give me an indication of progress and got a false positive.
Edit. In fact BLE.begin() crashes as it does not even return a 0.
Tested using:
// begin initialization
digitalWrite(ledPin, LOW); // will turn the LED ON
delay(2000);
if (!BLE.begin()) {
//Serial.println("starting Bluetooth® Low Energy module failed!");
digitalWrite(ledPin, LOW); // will keep the LED ON
while (1);
}
digitalWrite(ledPin, LOW); // just to make doubly sure the LED is still ON
Result: LED still turns off after 2 seconds
It seems that BLE.begin() is using Serial, but co-processor can not access any Serials.
It appears so.
In order to make all relevant information available to any who are interested in this subject, I'll share a link to @gerrikoio's related report here:
1 Like