going back to original firmware on tp-link

Let me start with the warning, DO NOT FLASH THE ORIGINAL TPLINK FIRMWARE BACK BEFORE FINDING OUT IF YOU NEED TO STRIP THE FIRST NUMBER OF BYTES OUT, YOU WILL BRICK YOUR ROUTER, IF YOU SEE

Failed to erase block

IF YOU DO, YOU NEED TO MAKE SURE YOU GET IT right after that, or you will start to get.

segmentation fault

on every and any command you run, at this stage, when you see this error after the failed to erase block error, your router is bricked, reboot it and it will not boot back up. if this happens, you might (depending on the model you have) have to connect your router to a com port and debrick it.

Now that you know, let’s see how to deal with this

If your firmware download file name has the word boot in it’s file name, you will need to strip out the first 0x20200 bytes (131584 bytes), if you fail to do this, meaning you fail to either identify if you need to do this, or fail to trim them, you will brick your router in the next step, to make matters both, TP-LINK is no longer including the word boot in firmwares with boot.

so to trim

dd if=orig.bin of=tplink.bin skip=257 bs=512

this command means read the file into another, skipping the first 257×512 = 131584 bytes (Which is the number you find above)

Now, you can flash it with the following command

mtd -r write /tmp/tplink.bin firmware

And if it says all is ok, you can now reboot your router into the new firmware

 

 

OpenWRT router with huawei hilink – on a 4MB router

Since this router has around 600 to 700 KBs of free space, running the hi link USB dongle modem should be done with the bare minimum packages
Here are the ones i installed to get mine running

opkg install kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether udev usb-modeswitch kmod-usb-serial-option kmod-usb-net

Right after, i rebooted, then running the command,

ifconfig -a

I got a new eithernet device (USB0), on another older hi link dongle it was called eth2.

Then, from within LUCI, you can simply add a new interface using this hardware interface, and set that to DHCP and add it to the WAN segment, You are done, it should be connected now

Please be aware that once you have it running, you might want to get into the dongle’s interface settings, and instruct the dongle to only use 3G (Not GSM/EDGE), i do that by visiting 192.168.8.1 (Hard coded, can not be changed, but depending on the model yours might be different).