This article will provide an easy DIY guide on rewriting the bootloader on many cheap eBay wireless routers sold under the names of “WAVLINK” or for those who buy wholesale quantities they’re sold by “WINSTARS”.
Any how the said devices should be running an MT7628 processor and its original firmware. As you may have already read or seen these devices run an unsecured linux firmware, some even run a tainted version of OpenWrt. For the most part these devices won’t have the necessary utilities needed to upload anything onto the firmware (lacks curl, wget, scp, etc) or if they do the current kernel prohibits anyone from writing to certain mtd partitions especially the “Bootloader” partition (usually seen on those already running OpenWrt) So for the sake of simplicity I’m assuming you have a device which is similar to this one and you can’t seem to get anything running on that device after multiple attempts of following the “TFTP” steps on this page.
What You’ll Need
- The device, I’m using a WL-WN575A3, running the original firmware that it came with
- An Ethernet cable, you could use a wireless connection
- This bootloader found here.
- PuTTY or your favorite telnet terminal
- Some familiarity with linux commands
- Get connected to the device via Ethernet or a wireless connection.
- Go to http://192.168.10.1/ and sign in with username as admin and password as admin.
- Connect the device via telnet using 192.168.10.1 as the IP address on port 21. I’m using telnet(1) on Linux
- Upon connecting login using admin as the user and admin as the password.
Backup Your Original Bootloader
- Change your current directory to
- Copy a bit-per-bit copy of your original bootloader by executing the following:
cat /dev/mtd1 > original_bootloader.bin
- Go to your browser and download the original bootloader located at http://192.168.10.1/original_bootloader.bin
Rewriting The Bootloader
- We’ll need to create a simple html upload page to upload the bootloader onto our device
- Hit ‘i’ in your keyboard
- And copy everything from below into vi
<form method="post" action="cgi-bin/upload_bootloader.cgi" name="submit" enctype="multipart/form-data"> <input type="file" name="fileField"><br /><br /> <input type="submit" name="submit" value="Submit"> </form>
- Like so
- Once you’ve done that press ‘esc’ on your keyboard and hit ‘:wq’ to save and exit
- Head on over to http:/192.168.10.1/upload.html
- Select the ‘Bootloader.bin’ file that you downloaded initially & ‘Submit’
- If you are redirected to the login page then you’ve timed out like me this is why I instructed you to login at the beginning.
- Login back in and go back to http:/192.168.10.1/upload.html
- You should see something like below
- After rebooting you should be able to successfully flash any image as long as you follow the steps outlined at the bottom of this page under “TFTP”.
Flashing with OpenWrt
Once you have OpenWrt on the device you are free to flash with mtd.