Xenon stuck listening (flashing blue)

I have a xenon that has decided it likes to flash blue. I've tried the steps in:

except with the 0.9.0 files. They all work, and after flashing bootloader-0.9.0-xenon.bin it briefly flashes magenta before returning to blue.

Suggestions on next steps?

Oh, I guess it’s possible it just has forgotten all it’s mesh info… unfortunately so have I…

And you can't readd it to any mesh I guess?

You could also try to flash this code (via DFU Mode)

#include "Particle.h"
#include "dct.h"
SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    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);

    Particle.connect();
}

How many other nodes have you got in your existing mesh?
If you can't remember the password you'll need to recreate the entire mesh with a password you can remember in future :wink:

1 Like

That's the plan eventually. Well, actually I was hopeful that key rotation is added before I need to. It really is pretty important and seems is already accounted for in the libraries (https://groups.google.com/d/msg/openthread-users/Q9sKn6W8hE4/wlc5vgoMBgAJ).

I came up with another idea though. Where you said I could flash system-part1.bin without destroying another node on the network I simply patched another node to allow me to join the network without knowing the password.

diff --git a/system/src/control/mesh.cpp b/system/src/control/mesh.cpp
index 69b9756c4..c8de8def4 100644
--- a/system/src/control/mesh.cpp
+++ b/system/src/control/mesh.cpp
@@ -398,9 +398,11 @@ int auth(ctrl_request* req) {
     // Generate PSKc for the provided commissioning credential
     uint8_t pskc[OT_PSKC_MAX_SIZE] = {};
     CHECK_THREAD(otCommissionerGeneratePSKc(thread, dPwd.data, name, extPanId, pskc));
+#if 0
     if (memcmp(pskc, curPskc, OT_PSKC_MAX_SIZE) != 0) {
         return SYSTEM_ERROR_NOT_ALLOWED;
     }
+#endif
     return 0;
 }

Built it with make all PLATFORM=xenon MODULAR=y in the module directory, flashed it in DFU mode, and joined the network with particle mesh add "e__id_of_xenon" "existing_name" -v. It asked for the password, I gave it a wrong one, and it worked just great. (the app was stuck spinning trying to join, but that's not unusual. I really like the new cli command though)

I'm not 100% sure where/how/if the PSK is stored, and if that node will be able to assist another (or even if it might have either received or pushed the key that was supplied), but currently it is that it's back online and I can continue experimenting with it.

3 Likes

:+1: that was an ingenious move there - resepct! :dizzy: :tophat:

2 Likes