Notecard not responding-Notecarrier F 1.3 and swan 3.0

I’m using Notecarrier F 1.3 with Swan 3.0 and Arduino IDE, and I keep getting
Starting notecard... [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding [ERROR] notecard not responding .
They were all(10) working until I uploaded the new code, and now 4 are having issues. I am testing them with the simple code below.

I have tried to power the Notecarrier from the microUSB port on the swan + a 3.7 V battery and from the microUSB on the Notecarrier itself, but the best I can get is flashing red in three of them while one isn’t responding. I updated the firmware using the STM32 programmer, but I can’t detect them on the in-browser terminal. The same code and swan work perfectly with Notecarrier F 1.0. I have also tried the instructions on recovering a bricked notecard.

#include <Notecard.h>

#define serialDebug Serial

#define txRxPinsSerial Serial1


#define productUID "xxxxxx"
Notecard notecard;
   
void setup (void) {
  serialDebug.begin(115200);
  while (!serialDebug) {
    ; // wait for serial port to connect. Needed for native USB
  }
  serialDebug.println("Starting notecard...");
  //notecard.begin();
  notecard.begin(txRxPinsSerial, 9600);
  notecard.setDebugOutputStream(serialDebug);

  J *req = notecard.newRequest("hub.set");
  JAddStringToObject(req, "product", productUID);
  JAddStringToObject(req, "mode", "continuous");
  notecard.sendRequest(req);
}

void loop (void) {
}

Obviously, the code snippet I’ve copied isn’t your problem, since you’ve already had them working. However, I would be careful about introducing a while() loop without a timeout. Especially when you’re struggling with debugging, because it can be one more thing to have to manage when things aren’t going well already.

Typically, we use the following pattern…

for (const size_t start_ms = millis(); !serialDebug && (millis() - start_ms) < usb_timeout_ms;);

All that aside, you shouldn’t have a bricked Notecard.

As a sanity check, can you plug into the USB port on the Feather, and run a {"req":"card.version"} from the WebREPL on our dev site, https://dev.blues.io?

That will let us know two things:

  1. That the Notecard is working and not bricked
  2. The firmware version on your Notecard

Once we have that stuff, then maybe we can circle back around and reintroduce the host and look for trouble there.

Cheers,
Zak

1 Like

@zfields I have tried all 4 of them but none of them is being detected.

Can you remove them from power for 5 minutes, then try again?

No change. Still cant detect it.

@zfields any update on this?

Hi @chadha_14,

I’m out traveling at the moment. Let me reach out to a colleague to see if I can pull them in.

Hang in there,
Zak