Nano Matter- No longer seen by Alexa but initial demo worked

I tried out my new Nano Matter board using the Nano_Matter+lightbulb demo. This worked great! Then I tried the humidity demo. I had to remove the lightbulb device from Alexa to get this second demo to work, which it more or less did (Although it just sends out dummy humidity readings. I have the Si7021 humidity sensor hooked up but see there is no code to read it in the demo) ) . All of the demos use the same pairing code, so once it has been commissioned, , it won't find any new device until you remove the old one.
Today, I can no longer get any of the demos to work- even though I have removed any Nano Matter devices that I earlier installed on Alexa.
The board still shows "Connected to Thread network" as long as my Echo is plugged in. However it sticks at "waiting for Matter discovery" forever, and the Add Device operation on my Alexa app no longer finds the Nano, using the same pairing code that worked before,(and which still shows up when I add Matter.getManualPairingCode().c_str());
to my code.
Also, Alexa showed both "a first device" as well as whatever other device I added. I have deleted every device that was associated with this nano Matter board during my demo tests. The board is basically useless to me now. Anyone have any answers? Thanks

I had the same (or a similar issue). Two boards working fine with the bulb demo. One at home and one in the office. Both just stopped working (more or less at the same time). I removed the device(s) and set up from scratch again (i.e. including the bootloader [Tools -> Burn Bootloader] to get a new QR code). That has worked. Not sure what happened .. are the credentials of limited duration? I'm using Samsung SmartThings and an Aeotec Home Hub v3.

Hi Pat: I believe that when you burn the new bootloader what happens is that it erases the credentials that you have already obtained from the Matter hub. So, when your Nano re-boots it doesnt' see the credential, and goes through the "onboarding" process all over again. However, every time you do this you get the same 11 digit pairing code which I assume is tied to a unique ID number in the Nano chip itself (such as for a MAC #). I'm pretty certain the QR code is the same every time as well, but I can't say that for sure.
While I haven't noticed that the Nano lost its credentials (over time). But when I tried all of the other demos, and they failed, occasionally I'd go back and try the light bulb again, as a sanity check. I did find that often Alexa would fail to find even the light bulb demo, but if I kept trying it eventually it would "take" . This had nothing to do with being too far from the hub in distance, as the hub is in my office where I was programming the Nano Matter board. Arduino, in fairness, did call this a "community preview" so I guess this is all we should expect...

You are dead right, it's the same QR Code every time - must be tied to the chip/board. But this delete device in smartthings, burn bootloader etc and re-add did the trick for my no-longer functioning devices. Not sure why both of them packed up in the first place, though!

Someone posted the following decommission script ... I've not tried it, so mileage may vary!

#include <Matter.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);

  Matter.begin();
  pinMode(BTN_BUILTIN, INPUT_PULLUP);
  pinMode(LEDR, OUTPUT);
  digitalWrite(LEDR, HIGH);
}

void loop() {
  // put your main code here, to run repeatedly:
  decommission_handler();
}


void decommission_handler() {
  if (digitalRead(BTN_BUILTIN) == LOW) {  //Push button pressed
    // measures time pressed
    int startTime = millis();
    while (digitalRead(BTN_BUILTIN) == LOW) {

      int elapsedTime = (millis() - startTime) / 1000.0;

      if (elapsedTime > 10) {
        Serial.printf("Decommissioning!\n");
        for (int i = 0; i < 10; i++) {
          digitalWrite(LEDR, !(digitalRead(LEDR)));
          delay(100);
        };

        if (!Matter.isDeviceCommissioned()) {
          Serial.println("Decommission done!");
          digitalWrite(LEDR, LOW);
        } else {
          Serial.println("Matter device is commissioned-> Starting Decommission process");
          nvm3_eraseAll(nvm3_defaultHandle);  // Decomission command
          digitalWrite(LED_BUILTIN, LOW);
          Serial.println("Decommission done!");
        }
        break;
      }
    }
  }
}

Yes- towards the end of the Nano Matter online document, they do get into this De-commissionning routine, but the documentation for using Google Home,and other hubs are before this. I didn't see it at first and someone from Arduino got on the forum and set me straight. But, for development use, the burn bootloader works fine and is quicker than adding the code into your sketch.