I had purchased a while ago a Asus WL500g Deluxe and decided to flash the thing with OpenWRT.
At first, I only wanted to let the thing bridge with a wireless access point (WDS) but when I noticed I could enhance the functionality of the router with asterisk I flashed the device and installed asterisk. Piece of cake!
So I had some experience with Cisco IP phones ( Cisco 7912G ) and flashing it with SIP software, so I looked for one on the internet and found and bought one on a internet auction for 50 euros. To flash it, I had to install a TFTP server ( well, to dynamically configure it I had to install it ) so I hoped to install it on OpenWRT to.
So I wget-et TFTP-HPA from the applications directory and started the thing. When I tried to put or get something to the tftp server it either said I did not use absolute paths and when I did use a absolute path it gave a time-out error. So after a few minutes googling around I found a link to some site who claimed to have found a solution, but the linked article was unfortunately deleted. So, I dug into the internet archive and found the article I was looking for and it worked. Because I will not rely on the internet archive, I will post the file I found on the website and the description on how to fix the problem here.
1. Download the archive attached to this post and upload it to your router with openwrt
2. unpack the archive in the root of the router
cd /
tar zxvf tftpd.tar.gz
etc/inetd.conf
usr/sbin/inetd
usr/sbin/tftpd
3. The tftpd program needs a user to fallback to with less rights then the root user. If you do not already have one, create a anonymous user
Echo ‘ nobody:x:1:1:nobody:/tftpboot:/bin/false’ >> /etc/passwd
4. Put your files in the /tftpboot directory and chown the directory to nobody.
5. What the guy on the blog forgot to mention was this: Create the file /etc/services and put this tftp 69/udp in it.
6. Start inetd first in interactive mode to see whether everything works
/usr/bin/inetd -di /etc/inetd.conf
7. If everything works ( you can get something from the TFTP server ) you can leave the -di option away. If it still does not work, try debugging. Exit the application and start logread. Logread keeps track of all logs, which are not written to the (flash) file system because of to little free space and because flash can only be limited written to.
8. If you want to change the root of the tftpserver ( for example on a USB drive ) edit the /etc/inetd.conf file and put behind the line
tftp dgram udp wait nobody /usr/sbin/tftpd /usr/sbin/tftpd the path to you tftp root.
That’s it, this worked for me. Good luck!
Thank you for sharing!