Hi all, I’ve been reading the reference and tutorials to better understand replacing mesh with BLE, but I’ve hit a bit of a roadblock with BLE advertising with the intent to wake from sleep 2.0. Perhaps, I’m misunderstanding what I thought this should do, but if I start advertising then go to sleep with both .ble() and .duration() sleep config, my argon give the red SOS instead of sleeping. However, this works fine on a xenon for some reason. What silly mistake am I making?
If I remove any one of the three: ble wake, duration wake, or advertising, then the argon has no issue.
// run in manual mode for BLE offline mode
SYSTEM_MODE(MANUAL);
//BLE setup
const BleUuid serviceUuid("7cf29a2d-f244-45e3-8bd3-f4b86c974677");
BleAdvertisingData bleData;
SystemSleepConfiguration config;
void setup() {
// give a human a chance to see the white LED
delay(5000);
// turn on BLE because we're in manual mode
BLE.on();
// create the data for advertising and advertise
bleData.appendServiceUUID(serviceUuid);
BLE.advertise();
// example sleep config from argon reference
config.mode(SystemSleepMode::STOP);
config.duration(15s);
config.ble();
}
void loop() {
delay(1000);
System.sleep(config);
}