HOWTO: Update Linksys PAP2 Firmware Without Windows
UPDATE APR 21 2010: There’s an even easier way of doing this.
I finally got my Linksys PAP2T VoIP adapter yesterday. As is par for the course, the firmware was out of date. What wasn’t par for the course is that I had no way to get the firmware to the adapter. The Linksys PAP2T doesn’t offer the standard check-for-update or upload-firmware interface. It uses an upgrade rule that expects to find a TFTP or web server. Linksys also provides a Windows executable that will upload the firmware without you having to fiddle with anything.
The Windows option didn’t go well.
- On first go, the dialog box that appeared while waiting for the adapter to connect reminded me that the adapter wasn’t going to be able to connect if there was a NAT in the way. Oops. The adapter was on the external WEP network. The computer was on the internal WAP network.
- After moving the adapter inside the WAP network, I then realized that I was running Windows 2000 inside a VM in Linux, and that the default networking setup in the VM was to provide a NAT to the guest OS.
- I tried using my Vista laptop. Now the Linksys-provided software couldn’t even find the adapter, even with Windows Firewall turned off. GO VISTA! And my desktop currently had Windows 7 Beta instead of Windows XP. GREAT!
- I then researched using a TUN/TAP interface for the Linux VM that was hosting Windows 2000. Never mind that the Qemu Launcher GUI application silently failed when I hit Launch and I had to run qemu-launcher from the terminal to see any error messages. After much fiddling, I couldn’t get TUN/TAP to actually work.
I had one option left: actually set up a TFTP or Web server. I already had a web server set up which would have made things so much easier. But I didn’t find out about that option until I went to write this article. For that, I want to punch somebody in the face. Seriously, I could have cut an hour out of this nonsense. But it’s not all-for-nothing. Most people don’t have a web server. It’s more likely that they might have a web site, but still rather unlikely. If you only have the option to set up your own web or tftp server, setting up a tftp server is a lot less intensive on resources, from download to disk space to CPU and memory usage.
Thanks to this page I got the tftp set up on my main desktop. And I assume that the way this ends up being set up, the tftp server isn’t always going to be on since using inetd is disabled. Below is a script based on the directions on that page. You can copy and paste the code to run it, as long as you run this line first:
sudo su
Yes, that opens up a “root terminal” in which you can do all kinds of nasty things to your computer. In this case it’s only used so you don’t have to append sudo to every line, and the code will automatically exit you out of that root terminal and back into your own, safer terminal.
aptitude install atftpd
mv /etc/default/atftpd /etc/default/atftpd.bak
echo USE_INETD=false >> /etc/default/atftpd
echo OPTIONS=”–daemon –port 69 –tftpd-timeout 300 –retry-timeout 5 –mcast-port 1758 –mcast-addr 239.239.239.0-255 –mcast-ttl 1 –maxthread 100 –verbose=5 /tftpboot” >> /etc/default/atftpd
mkdir /tftpboot
chmod -R 777 /tftpboot
chown -R nobody /tftpboot
/etc/init.d/inetd restart
/etc/init.d/atftpd start
exit
Next I had to log into my PAP2 adapter, click on Advanced View, click on Provisioning, and change a couple of things in the Firmware Upgrade section.
Upgrade enable: yes
Upgrade rule: (<5.1.6)? tftp://[host]/pap2t-5-1-6.bin
Change [host] to the IP address of the computer running the tftp server. You can also use a web server and change the protocol from tftp to http. If you have a web site in which you can upload and fetch binary files, you can use a domain name instead of an IP address. Some hosting services may put a cap on the size of files they will host. The firmware binary is 719KB.
The latest firmware for the PAP2 is version 5.1.6 as of the writing of this article. You can change 5.1.6 to whatever the latest firmware version is if Linksys produces later version. The (<5.1.6)? restricts downloading of new firmware only when the current firmware is less that 5.1.6. Do not use a static address for the upgrade rule! Yes, simply using a straight URL works, but the PAP2 is designed for automated updating of it firmware. If you just put a URL pointing to a file, it will continually attempt download and install that firmware. Even when you shut off your TFTP or Web server. If you’re using a web hosting provider, this is a good way to reach your transfer cap. Yeah, it takes 1,458 downloads of this file to reach 1GB. That can almost be achieved in one day if the adapter attempts a download once every minute (1,440 downloads). Yes, web hosting transfer caps are usually huge, but it’s stuff like this that can push you over the edge if you’re actually running a somewhat-popular site. You might also have to deal with transfer caps from your ISP.
UPDATE APR 21 2010: Cisco has long since bought out Linksys (that move was already made before I wrote this article) but it seems Cisco is on the move to phase out the Linksys brand. Finding the firmware was never easy under Linksys, but it was doable. Good luck finding it now without Google.
Official Cisco PAP2T-NA Firmware Download
My Own Dropbox Mirror (bin file only)
You’ll also notice from the comments that there’s a shortcut for upgrading the router without touching the upgrade rules — “http://%5BPAP2T-IP%5D/admin/upgrade?” is the URL. Append another URL to the bin file (like my mirror above) and you’re all set.
Tuketu 4:51 pm on May 8, 2009 Permalink |
Thanks for the information on the PAP2T firmware update options. The information is handy.
I’m curious: what firmware version did your PAP2T come with. I just received a unit with 3.1.15. I wonder what is different with 5.1.6?
brainwreckedtech 5:11 pm on May 8, 2009 Permalink |
I know I had version 3.something, but I’m not sure of anything more specific. As for the fixes, I always just assume that they’re bug fixes for stuff you won’t come across often, if at all. It’s sure as heck a lot easier than reading the release notes — http://downloads.linksysbycisco.com/downloads/PAP2T_v5.1.6_fw_ReleaseNotes,2.txt 🙂
Peter Beauclerk 7:44 pm on August 12, 2009 Permalink |
I bought a pap2 Vonage enabled a couple of years ago- never used it since vonage sent me a motorola unit- noa I’m moving on to my own setup and tried to reconfigure the pap2 and the setup & admin pages don’t give me any options to reconfigure the proxy server settings.
I thought I might get around this by upgrading the firmware and ran into the kind of problems you have been dealing with. I have downloaded an fhtp utility from solarwinds and am trying to figure out hoe to associate the binary file with the fhtp server. Any clues would be very welcome.
Cheers,
Peter
brainwreckedtech 8:19 pm on August 12, 2009 Permalink |
Unlike documents and programs, you don’t associate file extensions with with a server. Usually, somewhere, somehow, you give the server a directory (or multiple directories) to look at and serve files from.
I’m not familiar with the Solarwinds app specifically, but a few common things pop into mind. What user is the tftp server trying to run as? Does that user have the rights necessary to act as a server? What directory is the tftp server set to serve its files from? Does that use have the rights necessary to access the files?
James S 11:33 pm on August 13, 2009 Permalink |
A much easier way to do this is via the “upgrade URL,” the syntax for which is http:// [IPofPAP2] /admin/upgrade?[protocol]://IPofServer/pathto.bin
where [protocol] is http or tftp.
So, pasting “http://192.168.1.102/admin/upgrade?http://192.168.1.10/spa.bin” into your browser would tell the PAP2 at 192.168.1.102 to download and install the firmware bin file located at “http://192.168.1.10/spa.bin”
tftp upgrades seem flakey, but HTTP with the apache server in Mac OS X worked fine for me.
brainwreckedtech 6:34 am on August 14, 2009 Permalink |
That’s a great shortcut. Wish I would have known that.
Installing Apache for the sole purpose of getting a single bin file to a single piece of hardware works, but is a bit much considering the vulnerabilities you could be opening yourself up to, especially with a mis-configuration. If you already have an HTTP server running (or even a web host that’ll let you upload the bin file for downloading), by all means do it that way. But for “I just need something to serve this one file one time,” getting a TFTP server running should be easier.
DS 1:39 pm on November 3, 2009 Permalink |
Thanks – really useful advice.
I went the web server route because I had one anyway.
Tommy 12:25 am on April 21, 2010 Permalink |
Thanks for this page! I just updated my LinkSys PAPT2 without having to install or run anything special — I used my free Dropbox account. (Dropbox lets you share files among various computers, but it also allows you to serve a file up via web addresses.) More info at http://getdropbox.com/
1) Download the updated firmware file from LinkSys (the latest as of this date is 5.1.6).
2) Extract the .bin file and put it into a public DropBox folder
3) Go to the Dropbox web interface, select the file, and click More Actions –> Copy Public Link
4) Open a new browser tab or window and enter the upgrade URL. It will look something like:
“http://[PAP2T-IP]/admin/upgrade?http://dl.dropbox.com/u/%5Bnnnnnn%5D/pap2t-5-1-6.bin”
I suspect this same technique would work for other services, too, but DropBox made it especially easy. Couldn’t LinkSys have put the file on a public URL for easy upgrading? Hmmmm….
BrainwreckedTech 9:40 am on April 21, 2010 Permalink |
Now THAT is an awesome idea. Sadly, not only only did I not have Dropbox at the time I wrote the article, I didn’t even know about the “http://[PAP2T-IP]/admin/upgrade?” thing.
VOIP on iiNet using PAP2, Time Capsule and SpeedStream 4200 | Pat's Point of View 7:39 pm on May 29, 2010 Permalink |
[…] is 3.1.23(LS) which you can get from here. To install it follow the instructions at the end of this post (note the firmware he refers to is for the PAP2T-NA which is a different model and that firmware […]
Andrew Emmett 9:11 am on June 15, 2010 Permalink |
I own a Linksys PAP2T voip device. So going to bookmark this article for future reference. Cheers for sharing your experience and writing this guide.
James Ong 5:11 pm on September 30, 2010 Permalink |
Thanks! I used the dropbox method and it worked perfectly.
Tommy 2:37 pm on November 16, 2010 Permalink |
Just a little update; I used the Dropbox technique to upgrade the firmware in a SPA2102 ATA. Yay!
P.S.: I did not reset it to factory defaults first and it somehow seems to have kept the original settings, though I will probably reset it anyway… I’m upgrading it to try to address some weird problems.
Ernest 5:43 pm on February 1, 2011 Permalink |
I’m trying to provision a pap2t from a tftp server (using xml files). For example, I want to update the info directly from the tftp instead of manually entering it. How can I make sure those xml files are read from the linksys box? Any ideas will be appreciated.
Tommy 10:06 pm on February 1, 2011 Permalink |
Ernest, this tip is about loading the firmware. You can load the provisioning .cfg (xml format) file using a tftp, http or https server as described in the provisioning guide.
Tommy 10:33 pm on February 1, 2011 Permalink |
I wrote that wrong — it’s either xml or cfg (two different formats). You can find the guide on the Cisco web site by searching for “SPA Provisioning Guide.” There is also the Administration guide which might be useful too.
Wuzza 7:18 pm on April 18, 2011 Permalink |
Just updated firmware via drop box and all worked great. Thanks for posting here. Could find another site that actually explained this any better. Had to get to the drop box feedback though. Woulkd be great if you could add the drop box comments to your original post. Thanks again.
Wuzza 7:19 pm on April 18, 2011 Permalink |
I mean COULDN”T find another site. Great job thanks.
Gerben 3:45 am on August 13, 2011 Permalink |
I just upgraded my PAP2T using Wine in Ubuntu. Follow these steps:
sudo chown root.root /home//.wine
sudo wine /path/to/upgradetool.exe
upgrade the device
sudo chown -R . /home//.wine
Done! Couldn’t be easier 🙂
Now if only the device provided an easy way to backup/restore the configuration….
Gerben 3:48 am on August 13, 2011 Permalink |
Darn! the formatting is screwed. I tried to point out where to put your username. Here are the steps using my username:
sudo chown root.root /home/gerben/.wine
sudo wine /path/to/upgradetool.exe
upgrade the device
sudo chown -R gerben.gerben /home/gerben/.wine
Al 5:23 pm on August 15, 2011 Permalink |
Thanks for the post. The http method worked on my older PAP2-NA (not the PAP2t). I was able to put the .bin firmware file on the personal webspace provided by my ISP and it worked fine. There’s a web site that has a lot of firmwares that would likely work to (http://prov.802.cz/fw/).
Regarding the Virtualbox method… I was able to update the firmware of a Speedtouch modem from a Windows XP guest in a Debian host by changing the ethernet adapter to “Bridged” mode. Quoting the manual; “When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system’s network stack.”.
Jim (JR) 12:41 pm on November 1, 2012 Permalink |
Re: Location of PAP2T upgraded firmware:
As of 11/01/2012. the firmware was located here:
http://www.cisco.com/cisco/software/release.html?mdfid=282414114&catid=278875240&softwareid=282463187&release=5.1.6&relind=AVAILABLE&rellifecycle=&reltype=latest
However, that URL is just a tad brutal, so here is the same link as a TinyURL:
http://tinyurl.com/cpfusbk
This was current, and working, at appx; 12:00 EDT on 11/01/2012. I have no idea if this site will remain for any period of time. Ergo Your Mileage May Vary.
Re: Opinion of article in general:
Da Bomb!
One caveat though: Even though you may be *ABLE* to update the firmware, that does **NOT** mean that updating the firmware is a good idea, or even a smart thing to do.
**PLEASE* (Pretty please. . .) check with your VoIP provider before you do *ANYTHING* to your VoIP adapter. Your VoIP adapter’s firmware version, even though it may not be the latest-and-greatest, may be necessary for you to successfully connect and use your VoIP adapter with their systems.
As far as I know at this point in time – I am planning to do the upgrade, but have not yet done so – it is NOT possible to down-rev the firmware unless you are lucky enough to find a BIN file for your old firmware version – which, BTW, is NOT available on the Cisco site, at least as far as I know.
What say ye?
Jim (JR)
Adaptadores LinkSys/Cisco PAP2, PAP2-NA, PAP2T, e similares « Disk Full 1:46 pm on August 10, 2015 Permalink |
[…] How to Upgrade Linksys ATA’s firmware: https://brainwreckedtech.wordpress.com/2009/04/16/howto-update-linksys-pap2-firmware-without-windows… […]