Long delayed update (lots of info here)
At the bottom of this post is something that we have been working on for a little bit now. Basically Documentation on two of the 4 tiers of our Wireless Sensor Network.
Since I have not updated since we decided to go from our 3 tier idea to a 4 tier idea, I will briefly explain the differences as well as the reasoning behind the switch, and why our 4 tier is better than our 3 tier.
First off, the description of the 3 tier model. The lowest tier was the Wireless Sensor Motes, the 2nd tier was the Stargates and the top tier was the clients. The clients would connect to all the stargates (at that point, the clients had to know the ips of the individual stargates to be able to connect) and get data from them. They could query individual motes and get continuous readings and change the frequency of updates for the motes or set the motes to only update if the sensor reading changed beyond a threshold value. Unfortunately, this system had the following issues: only getting data when a client was there, having to maintain a constant link, inability of the stargates to initiate connections to the clients (stargates didn’t have a method to figure out the client IPs), using ssh for communication was slightly problematic (that is to say, required key exchanges and/or setting up users on the clients).
To alleviate these issues (among others) we decided to implement a 4 tier system, inserting a BaseStation server inbetween the clients and the Stargates. We also pretty much scrapped the ssh tunnel idea (but it is still a useful concept, just not for this application) and went with a purely socket based communication system. We also added a DHCP server to make it easier for clients to join the network, as well as making it easier for setting up the network. The Basestation and stargates can now automatically find each other when they are turned on. They send broadcast packets looking for a basestation (if you are a stargate) and looking for stargates (if you are a basestation). The Stargates and Basestation now can find each other and communicate effectively. We also implemented three modes of communication: always on, event, and queue. Always on mode is basically a socket is opened between each stargate in always on mode and the basestation, sending all packets across without having to (re)create the socket. Event only sends communications back the basestation when the motes sense something. Queue allows for the clients to send a message to the basestation which in turn tells the specific mote(s) to send back their current status. These modes, especially event, make it possible to configure how the network is utilized. These changes allow for easy utilization of the system, just turn everything on, and start sensing. Another advantage of the basestation is that we can store all the data that we collect in one place and not have to worry about having a client there all the time.
Current known problems/possible issues with our 4 tier system.
- It is possible for third parties to inject data into the system (possible solutions, implement some sort of cryptosystem for communication (between stargates and basestation, client and basestation), as well as enabling wep (just a hindrance I know, but for such a low traffic network probably a good deal of hindrance))
- It is possible to emulate the “I’m a Basestation” packets, thereby effectively killing all communications from the real basestation (This could possibly be solved with something akin to GPG/PGP signing).
Current issues that we are working on.
- Implementing graphical viewing of data, we are thinking of modifying Oscilloscope from net.tinyos java package.
- Implement a “log file viewer” for the clients so that they can choose which data they want to display.