📜 ⬆️ ⬇️

Resuscitation of TP-LINK 3020 router

Good day to all.

I decided to share my experience of resuscitation of Wi-Fi router TP-LINK 3020 .

It all started with the fact that I decided to play around with the CyberWRT firmware from idleness. And it ended badly. I even did not quite understand what had happened. Most likely the case was that with the router I worked via WiFi, which was distributed in exactly the same router with factory firmware and default settings. Apparently at some point, the test settings were reset, respectively, the IP address conflict, and I received a beautiful brick, blinking all the LEDs in a cyclic reboot.
')
Don't do that.

Grieved and climbed into Google.

The disadvantages in my position were: I was at work in the wild wilderness, I didn’t have any adapters from USB to UART. To shop radio components about 565 kilometers in a straight line. And not the fact that it sold what is necessary.
Pros: on the router has already been unsoldered UART. To unsolder it, by the way, two minutes under the standard comb 2.54. And there was a Freeduino board with a USB port. Only here I did not meet any examples of using it as a USB-UART bridge. Mainly they were pushing the boards with several UART hardware, and only one here. Well, I'm not such a big specialist. However, the time was free, the router is already half-dead - there is practically nothing to lose. There was a risk to kill the router completely, there was an option to wait for the return home (in a month) and to go to the router there, looking for a normal adapter. But a month without this router meant for me the loss of wasted heaps of time, which I was planning to spend just on gutting this router. The second router was terrible and terrible to torment.

Well, go. He took freeduin, prisobachil to the computer. Found on the Internet a cunning sketch:

void setup() { pinMode(0, INPUT); pinMode(1, INPUT); } void loop() { } 


And that's all. What is there input, where input - is unclear. Vaguely imagining the upcoming torment with a software serial or with something else that was incomprehensible, I began to connect a router. RX-TX, TX-RX. Somewhere they advised a resistor for matching the voltages, I did not have it. Someone advised to short the RESET to the ground, which also seemed to me suspicious. I decided that a half volt difference does not matter. The router connected to the laptop network card and foolishly turned it on ... And I saw flashing LEDs repeating to the beat every two seconds:

 U-Boot 1.1.4 (Nov 28 2011 - 09:34:00) AP121 (ar9330) U-boot DRAM:32 MB .......... ....... .. eth0, eth1 Autobooting in 1 seconds... 

And where did I see it? In the window of the Arduinov serial monitor. And at the top of the window an unobtrusively loomed input field and a button with a purely Russian “Send”. I thought, doubted, scored "tpl" there, waited for the appearance of "Autobooting in 1 seconds" and sent. Without any additional terminals there, Putty and the like. And it stopped!

It simply could not be true.

Scored "printenv" - works!

I was shocked. Then everything goes like clockwork:
- downloaded tftpd32 , stuck the firmware into its folder.
- Set the IP of the network card of the laptop 192.168.1.100.
- launch tftpd32, IP - 192.168.1.100, Show Dir - the path to the firmware - Copy.
- tftpboot 0x80000000 CyberWrt-v1.4.bin - done
- erase 0x9f020000 + 0x3c0000 - done
- cp.b 0x80000000 0x9f020000 0x3c0000 - done
- bootm 0x9f020000 - done!
- returned to the network card the receipt of the IP machine ...

And all this from the monitor serial from Arduino ...

And that's it! The result is a live router. And what is interesting - I even forgot to connect the “land” between the router and the freeduin. I noticed it after the firmware. Simply, the router received power from the USB of the same laptop as Freeduino, apparently it itself there somewhere connected.
So everything turned out to be much simpler than I expected. The eyes are afraid, and the hands are doing. Good luck to all who will repeat.

Source: https://habr.com/ru/post/254995/


All Articles