# Failure to connect on reboot

**URL:** <https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913>\
**Category:** MKR NB 1500\
**Created:** [May 3, 2025, 11:53pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913 "2025-05-03T23:53:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtgarland](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rtgarland/32/1127062_2.png) [@rtgarland](https://forum.arduino.cc/u/rtgarland)\
**Post date:** [May 3, 2025, 11:53pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/1 "2025-05-03T23:53:43Z")

</div>

I am able to connect to the cellular network just fine after I initially load the sketch file. It works every time after I load the file. Once I unplug the device from my USB and plug it back in, it does not connect. If I load the same file again and let it reboot, it works fine the first time. If I unplug it and plug it back in, it will not connect again. What could cause it not to connect after I plug it back up and allow it to start on its own?

---

<div class="post-metadata">

**Author:** ![rtgarland](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rtgarland/32/1127062_2.png) [@rtgarland](https://forum.arduino.cc/u/rtgarland)\
**Post date:** [May 3, 2025, 11:56pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/2 "2025-05-03T23:56:21Z")

</div>

I have a follow-up. I'm able to get it to work if I monitor the number of times to retry connection. After 5 failed attempts, I issue a **NVIC\_SystemReset();** and it works. Something is getting reset when I load a sketch file. When it just looses power and starts up normally it will not work.

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [May 4, 2025, 1:20am UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/3 "2025-05-04T01:20:29Z")

</div>

Without a wiring diagram and code auto-formatted, then post in code tags, it's impossible to tell.

---

<div class="post-metadata">

**Author:** ![rtgarland](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rtgarland/32/1127062_2.png) [@rtgarland](https://forum.arduino.cc/u/rtgarland)\
**Post date:** [May 4, 2025, 7:06pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/4 "2025-05-04T19:06:22Z")

</div>

This even happened with the sample code that comes with the IDE. So I don't believe it is a coding issue. Code shouldn't cause it to run fine after initial loading and then fail after you turn it off and back on with it running the same code. Something with the board is reset on file loading. The NVIC\_SystemRest does the same thing the file loading does.

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [May 4, 2025, 9:56pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/5 "2025-05-04T21:56:45Z")

</div>

> [@rtgarland](#):
>
> NVIC\_SystemRest

Sorry, I never heard of that.  
I am not sure I am understanding your problem. Are you saying if you upload a sketch it works fine but if you power cycle the board it does not run the same sketch?  
I hope you also used the reset switch, that causes a reboot without power cycling so that would be good to know.  
We really need to see your code to make sure you are not doing something unusual.

---

<div class="post-metadata">

**Author:** ![rtgarland](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/rtgarland/32/1127062_2.png) [@rtgarland](https://forum.arduino.cc/u/rtgarland)\
**Post date:** [May 4, 2025, 11:44pm UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/6 "2025-05-04T23:44:21Z")

</div>

When I load the sketch it works and connects to the cellular network. When I power cycle the board it loads and failures to connect to the cellular network. I also tried the reset button, it does restart but has the same connection issue to the cellular network. After all that if I reload the same sketch, it works again and connects to the cellular network. It is very strange. I was able to replicate that with the sample sketch file that comes with the IDE. I first thought it was my code, but when I was able to duplicate it with the sample sketch, it believe it is something when loading a sketch that is reseting something in the board or modem. When I run the system reset command it is apparently duplicate what happens on a sketch load. It is very odd. This is on the MKR NB 1500 board.

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [May 5, 2025, 12:44am UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/7 "2025-05-05T00:44:18Z")

</div>

Sorry, I have no experience with that board but it does sound like it might be a problem. Good luck.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 1, 2025, 12:44am UTC](https://forum.arduino.cc/t/failure-to-connect-on-reboot/1378913/8 "2025-11-01T00:44:39Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
