Updating Draytek firmare using the MacOS X or UNIX command line and TFTP
Posted by on 02 February 2012 05:14 PM
Draytek modems have several methods available to update their firmware. You can use the Firmware Upgrade Utility under Windows, load it from the web interface via HTTP, FTP the file to the modem or use the TFTP (Trivial File Transfer Protocol) service built into the box.
If your modem has been bricked you can’t use FTP or HTTP. If you don’t want to use Windows or go through the web interface, then this TFTP method is a viable alternative. Note that unlike a lot of other boxes using TFTP to load firmware, the Draytek is acting as a TFTP server, the UNIX/MacOS box as a client and you PUT the file onto the modem. It is normally the other way around, but that needs some extra setup steps that are conveniently avoided with this method.
Firstly you need to obtain the right firmware from the Draytek support site; you need to know the modem model and the type of WAN interface. For our Vigor2820Vn using “ADSL over POTS” with “Annexe A” as written on the packaging label, we needed to download the firmware file “Vigor2820+V188.8.131.52+AnnexA+211011.zip”.
Once you have downloaded the file you change to the same directory (eg: /tmp) or folder (eg: Desktop) with the ‘cd’ command and then unpack the ZIP archive.
On a Mac you can do this in a Terminal application window (to be found in Applications/Utilities). We’ll use the % prompt for MacOS specific command lines, the # prompt for UNIX specific command lines and $ where the command will work on either system. The bits you need to type are in bold.
% cd Desktop
The firmware comes in two pieces. Use the .rst version of the file if you want to change the modem settings back to factory defaults, use the .all file to keep the current settings (.all may not be a good option if the modem is bricked).
Secondly you need an ethernet interface on your Mac or UNIX box set to the subnet 192.168.1.0 (eg: with IP address 192.168.1.2) so that you can talk to the modem at its default IP address of 192.168.1.1.
Under MacOS X you do this using ‘Network’ which is found in ‘System Preferences’. Choose to configure TCP/IP data ‘Manually’, set the IP Address field to 192.168.1.2 and the Subnet Mask to 255.255.255.0. The Router field doesn’t need to be set, but you could use 192.168.1.1. Nothing is required in the DNS or Search Domains fields.
To set an IP address on a UNIX box use ..
# ifconfig re0 inet 192.168.1.2 netmask 255.255.255.0
where you substitute the name of the interface you are using for “re0″.
Plug an ethernet lead into your UNIX box and into a LAN port on the modem,
If the modem is up and running (and not bricked), you should now be able
$ ping 192.168.1.1
If your modem is really bricked then the ping will only work when the modem is actually in TFTP upload mode as below. You can ignore this step, it just demonstrates that the ethernet cable is working.
Now we can upload the firmware. With the modem powered off, press and hold the factory reset button, then power up the modem. Continue to hold the button down until ’some’ of the lights flash together. On the Vigor2820Vn ’some’ is the left column of three. On the 2800 and 2910 the left two LEDs flash.
Release the button and on your UNIX/MacOS box type the following commands (note that the modem only stays in TFTP mode for a short time, you can actually type right up to the end of the put command and just press return when the left-hand modem lights start flashing).
$ tftp 192.168.1.1
There will be a pause after the ‘put’ command, but your modem ethernet port light should be flashing madly. The transfer is done when you get the “Sent” message. Quit the TFTP client and perhaps your Terminal session, there’s nothing more to see.What happens next isn’t really documented but we presume that the modem has to unpack the firmware and load it into flash. On our 2820Vn the column of 3 lights continued to flash, but gradually slowed down, speeded up, then slowed again. Eventually after a minute or two the modem rebooted in the normal fashion. Just be patient