A full-featured IP stack, including both main socket protocols (TCP and UDP), and a telnet server can be used on a shimmer, running over the 802.15.4 radio.
Placing a shimmer onto the network requires a seperate device (a Span or docked shimmer) attached to a Linux PC, or Linux virtual machine, on the user’s LAN, as well as some manipulation of the Linux kernel and network stack.
This video shows the steps required to run this IP stack on a shimmer2r, using a Span as the access point.
This is all run in a ShimmerLive 10.04a VMWare image. The only modification to the image before starting was to copy the folder with the python examples to the desktop. Other than it is as supplied.
This example runs through the following steps, showing the expected output:
1. Logs in as user tiny1
- as tinyos-1.x is required
2. Using the “motelist” command ensure the Span and Shimmer dock (with a shimmer2r inserted) are visible in the VMWare image
3. The first step is to set the Span to act as a Network Interface Card (NIC) in Linux. This will operate in much the same manner as any NIC in the PC, as shown by the output of the “ifconfig” command
This involves compiling and loading the kernel module
The “lsmod” (list modules) command shows that the kernel module has been successfully loaded
Then the daemon (service) is compiled
Next the AccessPoint TinyOS application is compiled and loaded onto the Span
specifying the 802.15.4 channel to use, along with the SSID, PAN ID and IP address.
Now the previously compiled daemon is started
ip forwarding and proxy arp is also enabled. Not necessarily required for the example shown here, as everything is run off the one PC, but is necessary for other situations if you want to connect to the shimmer2r from other PCs
this daemon must be left running as long as connectivity is required. Can be backgrounded with the & command and the output redirected using the pipe command if necessary.
4. Load an IP enabled application onto the shimmer2r.
This example uses SixAxisTransmitter which samples the 3 axes of the accelerometer and 3 axes of the gyroscope
Set the the 802.15.4 channel, SSID and PAN ID to correspond to those used when compiling the AccessPoint application for the Span. The IP address used should also be on the same network (for routing purposes)
5. Test connectivity by pinging the shimmer2r
6. Telnet to the shimmer2r to control it
7. The python applications shown are very simple demos. These are run on the same PC that has the Span attached for simplicity but any PC in the network, or attached to the internet for that matter (once the network’s routing is correctly set up), could be used instead.