reset NVRAM on TP-LINK WDR-4900 v1

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
chochi
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 5

PostPosted: Tue Oct 17, 2017 22:33    Post subject: reset NVRAM on TP-LINK WDR-4900 v1 Reply with quote
Hi all,
I would appreciate any help if you could Smile

I have upgraded my TP-LINK WDR-4900 v1, something I have done many times before. it didn't keep the settings I had [happened before, no big deal, had them saved prior to the upgrade]. so upon reboot it went to default settings and new setup, requiring new username and password.


Code:
U-Boot 2010.12-svn19826 (Apr 24 2013 - 20:01:21)

CPU:   P1014, Version: 1.0, (0x80f10110)
Core:  E500, Version: 5.1, (0x80212151)
Clock Configuration:
       CPU0:800  MHz,
       CCB:400  MHz,
       DDR:333.333 MHz (666.667 MT/s data rate) (Asynchronous), IFC:100  MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: P1014RDB
SPI:   ready
DRAM:  128 MiB
L2:    256 KB enabled
Using default environment



Code:

DD-WRT v3.0-r33413 std (c) 2017 NewMedia-NET GmbH
Release: 09/27/17


Unfortunately, I wasn't working from my computer but from laptop w/ 1) German keyboard 2) small keyboard so I accidentally pressed CAPS LOCK in the process and as I was rushing (and feeling too confident) I never checked the things i have typed, as they are by default covered w/ '****'

Long story short, I locked myself from the router and can't get in Very Happy

- I tried various variants on the reset button & 30 seconds, but that didn't clear the NVRAM
- I tried to use telnet (as suggested in some forum) but that is now password protected too
- I tried the serial (soldered the conector, used TTL-USB) it is now password protected too Smile

So, I would truly appreciated anyway to reset NVRAM so I can start setup from scratch

Or at least flash map layout, so I can fix things using dediprog (or alike)

Upfront thank you all
Petr
Sponsor
denstarr
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 7

PostPosted: Fri Oct 20, 2017 15:53    Post subject: Reply with quote
Hi petrr,

Maybe this will work out for you;

Enable ssh, connect your router through putty or some other ssh client, login with username root and your own password.

Follow up with;

erase nvram [enter]
..wait a sec...
reboot [enter]

Worked out for me earlier..
chochi
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 5

PostPosted: Thu Nov 02, 2017 10:22    Post subject: Reply with quote
Hi denstarr,
thank you for the response, but as mentioned in the post I do not have my login credentials - that's why I need to reset the nvram, so unfortunately I can NOT login (w/ ssh, telnet or serial)

Thank you nevertheless
Petr
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6388
Location: UK, London, just across the river..

PostPosted: Thu Nov 02, 2017 11:01    Post subject: Reply with quote
if you already reset the router default password is
root
admin

than type:
erase nvram && reboot

but you know that the other option is serial recovery
than on boot type quickly tpl and hit enter (have to be quick) than try nvram erase or erase nvram again
or just proceed with serial recovery or kermit recovery
the other option is try TFTP recovery if your router supports it...
the last instance is try to type something closer to what you possibly typed wrong you can try many times router will not lock you out
Good Luck

kermit way if your u boot is the same type ? at the start or press 4
look here i was not very successful but procedure is the same just port speed, settings, and serial connection will be different
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=1008832

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,AP Isolation,Ad-Block,Firewall
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 --DD-WRT 55363 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55363 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
chochi
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 5

PostPosted: Mon Nov 06, 2017 22:15    Post subject: Reply with quote
Hi Alozaros,
thank you for the response. Seems like I didn't reset the password ... I don't know how - tried different howtos from web, but none of them worked.

Tried to login w/ root/admin - no chance.

I also tried to catch the u-boot prompt, but esc / enter / tpl + enter / 4 nothing seems to work Sad

but at least I looked at the linux boot log and seems it printed the flash map

[ 1.285294] 0x000000000000-0x000000050000 : "u-boot"
[ 1.290889] 0x000000050000-0x000000060000 : "dtb"
[ 1.296289] 0x000000060000-0x000000260000 : "kernel"
[ 1.301941] 0x000000270000-0x000000fa0000 : "rootfs"
[ 1.307680] magic 68737173 vs 73717368
[ 1.311517] mtd: partition "ddwrt" created automatically, ofs=F20000, len=800 00
[ 1.318928] 0x000000f20000-0x000000fa0000 : "ddwrt"
[ 1.324465] 0x000000fc0000-0x000000fe0000 : "nvram"
[ 1.330004] 0x000000fe0000-0x000000ff0000 : "config"
[ 1.335657] 0x000000ff0000-0x000001000000 : "caldata"
[ 1.341367] 0x000000060000-0x000000fc0000 : "linux"

so maybe I'll just use dediprog to delete ?config?nvram?ddwrt?

Once again thank you
Petr
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Wed Nov 08, 2017 5:33    Post subject: Serial at boot Reply with quote
Like it has already been stated, serial at boot is not password protected.

Connect a serial cable (3.3V USB-TTL) to the router, then just type tpl and click enter over and over as the router is booting (with a serial console open). If you miss the window and the router successfully boots, then just unplug and try again.

https://wiki.openwrt.org/toh/tp-link/tl-wdr4300#serial_console

You know you are ready to type the nvram erase or erase nvram when the screen stops scrolling by.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings


Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.

Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS

Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
chochi
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 5

PostPosted: Tue Nov 14, 2017 15:47    Post subject: Reply with quote
Hi ian5142,
thank you for the reply. The serial I soldered + Arduino as TTL seems to work fine, so must be that I'm not typing fast enough (I did try couple of times indeed). I'll just create script to keep hammering the serial w/ tpl<enter> - hopefully that will help.

I used u-boot on other projects, so I understand the "shell" for writing the nvram commands.

in either case I'll let you know how it is going
I really appreciated all the help I'm getting
Petr
chochi
DD-WRT Novice


Joined: 17 Oct 2017
Posts: 5

PostPosted: Thu Nov 16, 2017 0:05    Post subject: Reply with quote
Hi,
so I'm using AZDelivery-FTDI-Adapter-FT232RL-Serial from Amazon

and I wrote simple python script that is hammering the serial so I dont miss the prompt

Code:

import msvcrt
import time
import sys
import serial



try:
    ser = serial.Serial(port='COM4', baudrate=115200, timeout=0.1, parity=serial.PARITY_NONE)
    ser.writeTimeout=0.2
    while(not msvcrt.kbhit()):
        #time.sleep(0.1)
        try:
            #ser.write(0X1B)
            #ser.write("vl\n")
            #ser.write("vl\r")
            #ser.write("v1\n")
            #ser.write("v1\r")
            ser.write("tpl\n")
            #ser.write("tpl\r")
            #ser.write("tp1\n")
            #ser.write("tp1\r")
            #ser.write("4\n")
            #ser.write("4\r")
            print('*')
        except:
            print('#')
            pass
        print(ser.readline())
    ser.close()
    print("Done. kbhit()")
except Exception as e:
    ser.close()
    print("Exception: {0}".format(e))


I verified via loopback that it is writing correctly
and it is also reading ok
I tried multiple sending variants,
alas it doesn't get to U-boot prompt - any ideas?
Thank you
Petr
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum