Tuesday, May 18, 2021

D-LINK DIR882 with padavan firmware

I have the D-Link DIR-882 for almost half a yr.  ppl suggested the 1.2 firmware is ok.  It is working fine until recently.  The wireless is not very stable and the router reboots auto.  Sometimes, it happened after couple of days.  Sometimes, it lasted for a week before it rebooted by itself.  If I turn off wireless, I don't have any issue.  So, I decide to look for alternative.  The ddwrt is not too stable for DIR882.  Only certain build is ok.  Then, I see the padavan firmware for DIR882.  However, I only see instructions in Chinese to load padavan firmware in DIR-882.  So, I decide to give it a try.  Worst case, I use the old TL-WR1042ND (stock firmware) or TL-WR1043ND v1 (Gargoyle firmware).

Prerequisite
1) Putty
2) WinSCP
3) Download the older stable ddwrt build. (https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2018/08-09-2018-r36527/dlink-dir882-a1/factory-to-ddwrt.bin)  There are some stable build in May, 2020 based on the forum, pls check ddwrt forum if you decide to use ddwrt firmware rather than padavan.
4) Download a copy of breed.bin.  I find the link below is still working.
https://pan.baidu.com/s/1FH5pEl5VLKHRhzSzh7E1PA#list/path=%2F
5) Download a copy of padavan firmware for DIR882 (Thanks hanwckf)  I prefer to use one prepared by hanwcfk.  Fewer addon and the English translation in the GUI is done well.  
https://github.com/hanwckf/rt-n56u/releases
6) There is always a risk to load 3rd party custom firmware on the router.  It is not supported by the vendor.  Do it at your own risk!  
7) I don't find an English version of breed.bin.  That may be a problem because it only displays in Chinese.  You will need someone who know Chinese to complete step 17-19.  As you can see from the screenshot, it is displayed in Chinese.

Update steps
1) Power off the router (there is a power button from the back)
2) Use a toothpick to press the reset hole
3) Power on the router.  Wait for 10s and release the toothpick
4) Connect your desktop to LAN1 of the router
5) Change your desktop NIC IP to 192.168.0.11, subnet mask to 255.255.255.0 and Primary DNS to 192.168.0.1
6) Connect the browser (try to avoid Firefox) to 192.168.0.1.
7) Upload the ddwrt firmware and wait for it complete.  Always pick the factory-to-ddwrt.bin if the router is on D-LINK firmware. 

8) Change the desktop NIC IP to 192.168.1.11
9) Connect the browser to 192.168.1.1
10) Change the login and password from ddwrt GUI.  If you decide to use ddwrt firmware, you can stop here.   

11) Go to Service, enable Secure Shell.  Also make sure password login under Secure Shell is enabled.  Save the settings




12) Now, SSH to 192.168.1.1.  Run the command cat /proc/mtd 
13) Depending on the output, backup all the mtd# to /tmp
In my case, I have mtd0 to mtd6
Then, I run the commands below
dd if=/dev/mtd0 of=/tmp/u-boot.bin
dd if=/dev/mtd1 of=/tmp/u-boot-env.bin
...............................................

14) Use WinSCP to copy the backup (step 13) in /tmp of router to your computer.  Then, delete all the backup (step 13) in /tmp.
15) Copy breed.bin from desktop to /tmp of router
16) Then run the command below from putty.
cd /tmp
chmod 755 mtd-write
mtd -r write breed.bin u-boot

Now, you should be disconnected from putty.  

17) Connect the browser to 192.168.1.1
18) Select firmware backup then, EEPROM.  Save a copy on your local computer.
19) Select firmware update.  Then select the padavan firmware for the DIR882 from your desktop.  Then click upload.

20) Change the NIC to obtain IP and DNS auto.  Then, point to browser to 192.168.123.1 with credential admin/admin

21) Change the GUI to English.  First click on the Firmware version link found at the top right.

 Under Administration, scroll down and change the WebGUI language to English


Reference link (in Chinese)

===============================================================
Firmware is quite stable after couple of the days.  Will update any issue after a month.  I don't have a new NIC card to test the 1.7G connection.  Some of the reference link showed it's possible.  

I suspect the router reboot maybe due to more load on WiFi.  I do have 4 more WiFi devices connecting to it rather than 1 or 2.  Maybe that cause the auto reboot of the router using stock firmware.  
===============================================================
5/24  I do see a WAN connection drop after 3 days.  Then reconnect within couple of seconds.  Search and do see that issue happen for some of the ASUS firmware.  So follow https://github.com/padavanfirmware/rt-n56u/issues/23 and apply the settings below.  Will update the result.

Hardware Offload NAT/Routing IPv4: to "Offload TCP/UDP for LAN/WLAN"
NAT Type (UDP only) to "Full Cone NAT"
For max connections, I leave it with 16348.
===============================================================
5/27 Checking hanwckf firmware link for all the issue.  Looks like MU-MIMO is not supported if channel bandwidth is running at 160MHz.
https://github.com/hanwckf/rt-n56u/issues/319
===============================================================
6/15  Running very stable since end of May. 
===============================================================
8/3    I see D-Link release firmware version 1.3.  However, I am very satisfied with Padavan firmware prepared by hanwckf and decide to stick with it.  Just check back hanwckf 's github.  There is no more update since May, 2020.  
12/27  I try Nov 2020 update but WhatsApp video is lagging after update.  Same for youtube.  Rollback to May 2020 update and things are back to normal.  
2021/5/18  Try the Nov 2020 update again.  Everything is fine this time.  
=======================================================
2022/8/3  See WAN connection drops recently.  Follow https://github.com/padavanfirmware/rt-n56u/issues/23 and try the following commands.  

In router's web GUI, simply go 
to menu path Administration --> Console and issue the following two commands, 
clicking the Refresh button right after typing each one:

nvram set detectWan=0
nvram commit

Thursday, May 13, 2021

esrshttpdlistener keeps stopping

 After rebooting eSRS GW, it shows it is online but it shows VE is not connecting to EMC.  Checking services and see esrshttpdlistener is not started.  Try to restart service and it won't stay up.  Strange part is all network test are fine.  

Most of the eSRS is firewall related.  If it passes the connectivity test, check the hosts file as some users point out in the forum  https://www.dell.com/community/Secure-Remote-Services-ESRS/ESRS-3-06-esrshttpdlistener-keeps-stopping/td-p/7039948/page/2

Compared the hosts file with the other gateway, I found out the one with issue has an entry 

127.0.0.1  GW_hostname_longname  GW_hostname_shortname localhost

So, I modify the entry to

127.0.0.1 localhost

Reboot and everything comes up fine.