|Home||Research||Computer Related||Links||Contact Me||Resume|
WAP54G Temperature Sensor
As a research project for Seagate, I created a low cost home wireless sensor network system. To do so I took an off the shelf Linksys WAP54G access point, and modified its hardware and firmware. My work was duplicated and extended for further research in the course 39-650: Product Design, in which the students followed a rough guide I gave them on attaching the serial port. The students created a guide with pictures, based on my original work, which shows how to assemble the hardware side of the project.
A serial port is attached to the WAP54G by following the instructions given in the guide, and then modified firmware can be uploaded to the device. To modify the firmware I started with the Sveasoft Freya firmware source code, since it included a telnet daemon, which the original linksys source code did not. This allowed for easier debugging of the modifications I made to the firmware. The modifications to the firmware include the DigiTemp open source project, which interfaces with Dallas Semiconductor 1-wire temperature sensors. DigiTemp reads the temperatures from all of the sensors on the wire and displays them. I wanted to adapt the DigiTemp source code to the WAP54G so that any program could connect to it over the wireless network and extract temperatures from the sensors. I did not want to limit the capturing of temperatures to a user connecting with telnet to get the temperature. I wanted to allow any application to connect, send a request for a temperature, and receive it in clear text. Therefore I modified the DigiTemp software to setup a TCP server socket which allows incoming connections, and upon receiving data, sends the temperatures in clear text such as "54C".
I am hosting the pre-built firmware which includes my modifications to DigiTemp and several other components on the WAP54G to allow the serial port modification to work. To stay true to the GPL, I must also host my modifications to the source code to benefit further work and the work of others. From a lack of webspace, I am hosting a patch which can be applied to either the original Linksys WAP54Gv2 source code, or the Sveasoft Freya source code. It is independent of both source trees, however, in the sources current state you need to manually start digitemp. This leads me to strongly suggest using the Sveasoft Freya source code or else you will need to modify the Linksys source code to automatically start digitemp. To manually start it, copy /bin/digitemp and /tmp, and then run ./digitemp. It must be copied to temp since it needs to write a configuration file to the current directory it is in, and the rest of the directories on the device are read only. The port that the TCP server listens on the WAP54G is port 8805. You can telnet to this port and hit enter once you've run digitemp to test it. Just hit enter in your telnet session and it should return you the temperatures of the sensors on the wire.
You must download the Linksys source code to obtain the tools needed to cross compile the firmware. You cannot download the Sveasoft source code and build it without the cross compiler tools. You need not use the Linksys source code from the linked tarball, you can simply use the tools/ directory from it to build the Sveasoft code with my patch.
INSTALLATION: For installation or modification of the actual hardware to add a serial port, follow this guide. Before you try to build and install the patch, I suggest you try to build whatever source code branch you are using first. In other words, before trying to get my modified code into your source tree, try building your source tree to make sure you have set up your cross compilers properly first. If you can build the original source code, applying my patch and rebuilding it will go smooth. To download the patch, rebuild the source, and create the firmware:
patch -p1 < wap54gv2_digitemp.patch
USAGE: To use the WAP54G digitemp firmware, you must first upload it to the actual WAP54G device. Load up a browser to connect to the WAP54G as explained in your WAP54G documentation, and then upload the firmware under the "Status->Upgrade Firmware" section. All you should need to upload is the wap54g-digitemp.trx binary I have hosted, or your newly built binary. Then reboot the router, and do the following:
cp /bin/digitemp .
(open up another terminal)
telnet <wap54g_ip_address> 8805
(you should see a temperature)
REQUEST: If anyone makes modifications to my wap54g digitemp project, such as having digitemp automatically start upon booting the WAP54G, please contact me and provide your modifications. I can also host your changes on this site to help others out working with the code. Enjoy!