Unable to Leave Listening Mode on BoronLTE

There is a setup done flag on mesh devices. Until setup is complete, you won’t leave listening mode. Normally, if you set up your device using the mobile apps the done flag will be set and you’ll leave listening mode.

You can flash this program to your device to clear the flag, after which you can put your normal firmware back on the device.

Also, you do not need to set the active SIM each time; the setting is saved in flash memory.

#include "Particle.h"

#include "dct.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    // This clears the setup done flag on brand new devices so it won't stay in listening mode
    const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);

    // This is just so you know the operation is complete
    pinMode(D7, OUTPUT);
    digitalWrite(D7, HIGH);
}

void loop() {
}
6 Likes