# Recovering The Things Gateway after erasing full serial flash

**URL:** <https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440>\
**Category:** TTKG - The Things Kickstarter Gateway\
**Created:** [April 16, 2018, 8:57am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440 "2018-04-16T08:57:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 8:57am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/1 "2018-04-16T08:57:06Z")

</div>

Hi,

Our TTN gateway worked for 15 days and now since three days it suddenly stopped working.

> **[MOD EDIT]** @textra wrote below: _“we did reset by holding the button while powering on the gateway”_  
> ⚠ Resetting the gateway by holding the button while powering on the gateway will **erase the serial flash** including all settings and the firmware. Don’t do that unless you know what you’re doing.

Please suggest us how to troubleshoot. For reference please find the image

 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/1/13c268869c620d0084cfdef053f369646dbfad84.jpg)

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 9:00am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/2 "2018-04-16T09:00:03Z")

</div>

we looked at the image but we didn’t find the problem

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 9:05am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/3 "2018-04-16T09:05:04Z")

</div>

Hi BoRRoZ,

Thank you,

See the activation lights are not blinking and we can’t find the gateway in ttn.fyi/activate.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 9:12am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/4 "2018-04-16T09:12:15Z")

</div>

did you try using the reset button

> [@TTN Gateway - FAQ](https://www.thethingsnetwork.org/forum/t/ttn-gateway-faq/11173):
>
> Continuing the discussion from [TTN GATEWAY central](https://www.thethingsnetwork.org/forum/t/ttn-gateway-central/10976/37): Answers to some of the frequently asked questions: Q. How do I get started with The Things Gateway? A. Getting started with The Things Gateway is a 3 step process: First step - Connect the antenna and plug the gateway into a power outlet Second step - Go to the website ([https://ttn.fyi/activate](https://ttn.fyi/activate)) Third step - Follow the instructions on the website Q. How can I reset my gateway? A. Pressing the button shortly while powered on restarts t…

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 9:32am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/5 "2018-04-16T09:32:46Z")

</div>

> [@BoRRoZ](#):
>
> Holding the button while powering on it will erase the full serial flash

Unfortunately we have gone through all those steps indicated for RESET. Now is there any option to connect and get back to the previous functioning mode.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 9:37am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/6 "2018-04-16T09:37:19Z")

</div>

I don’t think you can go back to a _previous working state_  
It could be software, it could be hardware… like a modern TV

Start with checking the powersource… the adapter

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 9:52am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/7 "2018-04-16T09:52:13Z")

</div>

> [@BoRRoZ](#):
>
> I don’t think you can go back to a previous working state
> 
> It could be software, it could be hardware… like a modern TV
> 
> Start with checking the powersource… the adapter

We tried with the Multitech power adapter, but it remains same, nothing changed.

Only the Blue dot light on the board is on and remaining LED’s for Indications are off.

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 9:56am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/8 "2018-04-16T09:56:16Z")

</div>

How to recover the gateway after erasing the full serial flash. we did reset by holding the button while powering on the gateway.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 10:48am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/9 "2018-04-16T10:48:51Z")

</div>

ah ok that explained a lot.

so you don’t have a bootloader on board , you need to [flash the gateway](https://www.thethingsnetwork.org/forum/t/the-workbench/8970/617) firmware.  
todo that you need

- the [firmware](https://github.com/TheThingsProducts/gateway/tree/stable/firmware#installation)
- a tool like the pickit 3 / 4
- software [MPLAB IPE](http://microchipdeveloper.com/ipe:what-is-ipe)

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 16, 2018, 11:55am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/10 "2018-04-16T11:55:59Z")

</div>

Thank you BoRROZ.

I will try them and update.

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [April 16, 2018, 12:53pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/11 "2018-04-16T12:53:36Z")

</div>

I updated the title of this topic to be more clear about the fact that this happened after a serial flash erasure

---

<div class="post-metadata">

**Author:** ![dicktonyboy](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dicktonyboy/32/43737_2.png) [@dicktonyboy](https://www.thethingsnetwork.org/forum/u/dicktonyboy)\
**Post date:** [April 16, 2018, 7:26pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/12 "2018-04-16T19:26:15Z")

</div>

> [@textra](#):
>
> Only the Blue dot light on the board is on and remaining LED’s for Indications are off.

I had this too. Well at least it is not looping around the reset. Don’t panic it does not mean that you have ‘bricked’ your device. This will burst back into life when you upload the next version of code.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [April 16, 2018, 8:54pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/13 "2018-04-16T20:54:07Z")

</div>

> [@textra](#):
>
> we did reset by holding the button while powering on the gateway.

> [@BoRRoZ](#):
>
> so you don’t have a bootloader on board

Are you sure? I erased the serial flash quite a few times and that certainly did not erase the bootloader†. Also, from another topic:

> [@TTN GATEWAY central](https://www.thethingsnetwork.org/forum/t/ttn-gateway-central/10976/152):
>
> The firmware update does not overwrite the bootloader of the gateway. If things go terribly wrong you’ll be able to flash firmware from an SD card.

Of course, this does not mention pressing the Mode button while booting, but also does not mention the need for a PICkit in case of failure.

If holding down the mode button can indeed erase the bootloader then I feel the instructions should be removed from [TTN Gateway - FAQ](https://www.thethingsnetwork.org/forum/t/ttn-gateway-faq/11173) altogether.

* * *

† I even think it did not erase the factory firmware, according to [my January 18th](https://www.thethingsnetwork.org/forum/t/ttn-gateway-central/10976/105) and [January 25th](https://www.thethingsnetwork.org/forum/t/ttn-gateway-central/10976/153) posts, where I only got updated firmware [on February 6th](https://github.com/TheThingsProducts/gateway/issues/1#issuecomment-363541863), so would not have had an SD card inserted to re-flash the firmware in January, I think.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 8:58pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/14 "2018-04-16T20:58:36Z")

</div>

> [@arjanvanb](#):
>
> I even think it did not erase

So he should try first an SD card ?

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [April 16, 2018, 9:03pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/15 "2018-04-16T21:03:20Z")

</div>

Yes, I’d first just try an SD card.

(I’m even confused why, at least with the factory firmware, I really think it did not erase the firmware for me either, but well.)

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 9:16pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/16 "2018-04-16T21:16:36Z")

</div>

I had the same as textra a while back… only one LED on… after flashing the bootloader again it came to life… and after a power cycle (ethernet cable) it loaded new firmware itself.

_so did or did not pressing the little button in the gateway during power up erased the bootloader… that’s the question … then ?_

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [April 16, 2018, 9:41pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/17 "2018-04-16T21:41:45Z")

</div>

> [@BoRRoZ](#):
>
> so did or did not pressing the little button in the gateway during power up erased the bootloader… that’s the question

No it is not. The boot loader is located in protected memory and it will not be erased/overwritten by pressing the button.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [April 16, 2018, 9:43pm UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/18 "2018-04-16T21:43:54Z")

</div>

can the bootloader be damaged in some way then ?

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [April 17, 2018, 6:16am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/19 "2018-04-17T06:16:43Z")

</div>

The only way the bootloader can be changed is with a programmer like the pickit. It should always be possible to reinstall the firmware using an SD card.

I’m not sure why some gateways are unable to boot after erasing the serial flash. The serial flash does store the OTA firmware updates downloaded from our update server, so my suspicion is that the gateway thinks that all those zeros in the serial flash (after erasure) are the newly downloaded firmware and tries to run it. I’ll forward this to the gateway team. Maybe they can explain what happens.

---

<div class="post-metadata">

**Author:** ![textra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/textra/32/11687_2.png) [@textra](https://www.thethingsnetwork.org/forum/u/textra)\
**Post date:** [April 17, 2018, 6:40am UTC](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440/20 "2018-04-17T06:40:37Z")

</div>

I will try with SD card then. If it boots I will update. Share me the link how to flash firmware through SD card.  
Thank you

[Next page](https://www.thethingsnetwork.org/forum/t/recovering-the-things-gateway-after-erasing-full-serial-flash/13440.md?page=2)
