Sara R410M - How to let the program reset the u-blox module?

Hi all,
Once in a while, the SAMD21 MCU looses touch with the u-blox R410M-02B on my board. It is probably because of a MQTT broker response that the u-blox module did not expect. The real solution will be to stop using MQTT on this module with NB-IoT, which is not recommended anyway.

But as this happens occasionally (<1x per 500 msgs), I tried this quick and dirty workaround :

  • Use “!nbiot.isAlive()” from the library to detect that the problem has occurred.
  • Perform a reset of the u-blox module by doing:

DEBUG_STREAM.println(“do reset”);
digitalWrite(SARA_RESET, HIGH);

With this in the beginning of the code:
> #define SARA_RESET 28

I can see the “isAlive” detects that the problem has occurred. But my reset idea doesn’t seem to be working.

  • Is it true that these SARA_RESET lines (taken from an example code) are meant to reset the u-blox module?
  • If yes, is 28 the correct value for SARA_RESET?
  • If I don’t mind losing this one measurement, is there also a command to reset the whole board?

Thanks a lot!

Hi @Mvo ,

When using the latest SODAQ SAMD boardfiles you don’t need to define SARA_RESET this is already done in the boardfiles.

To reset the SARA module you have to toggle the power.
digitalWrite(SARA_RESET, LOW);
digitalWrite(SARA_RESET, HIGH);

Best regards,

Hi Jan,

Thank you for your answer.
It didn’t work at first (SARA_RESET not defined), but after looking better at the files, I tried “powerPin” instead of SARA_RESET (maybe I have an older version of the sketch or library) and then it worked!

    digitalWrite(powerPin, LOW);
    digitalWrite(powerPin, HIGH);

Thanks again!!!

1 Like