JGN2plus Workshop on Sensor Networking

The 3rd Live E! Workshop
In the 10th APNG Camp 2008/08/14 09:30 – 12:30-- Asian Institute of Technology -1. Introduction
The Internet has enabled real time collection and distribution of environmental
sensor readings. Environmental, especially weather, information which densely covers
wide range of areas are expected to be useful for a number of applications such as
disaster management, public transportation and various businesses. It is said fromstatistical point of view that densely covering is more important than accuracy. Thus,
many sensors with reasonable prices are more preferable than a single quite accurate
sensor of extraordinary higher prices.
Live E! project has been developing a platform of wide-area sensor networking,aiming at this goal. Figure 1 shows the scenario in the project. The scenario considers
three layered architecture: i.e., sensor, data management and application. The sensors
usually have Internet connectivity and submit the observed environmental data
periodically: e.g., every 20 seconds. The data management layer, which is organized as
an overlay network, receives the submitted data, archives them and provides them forapplications with search functionality. The applications retrieve interested data fromthe platform and use them for their own purpose.

Figure 1: Wide area sensor networking architectureIn today’s workshop, we assemble twenty weather stations and configure them tosubmit sensor readings to Live E! platform via wireless LAN. Figure 2 shows thescenario of the workshop. A temporal Live E! server is installed in AIT, which collectssensor readings from our assembling sensors and works as a node in Live E! overlay
network. The permanent server setup in the University of Tokyo is a Live E! serverwhich collects the sensor readings from our sensors after the workshop. When you takethe sensor back to your home, please consider about installing the sensor in youruniversity or somewhere in your country (we are going to give you those weather
stations if you are anxious about working on it).

Figure 2: Workshop environment overview
We have setup temporal Live E! server in AIT (just for the workshop).
A permanent Live E! server has been also setup for data collection after the camp.

2. Workshop Schedule
09:40 - 09:50 Workshop overview
09:50 - 09:55 Grouping into 20 groups (3-5 people each)
09:55 - 10:10 Assembling weather stations
10:10 - 10:30 Login and configuration of OpenWRT
10:30 - 11:00 Coffee break
11:00 - 11:10 Data read trial
11:20 - 11:40 Data upload
11:40 - 11:50 Change configuration to the permanent server
11:50 - 12:30 Discussion and advanced topic

3. Assembling Weather Station
Figure 3 shows the complete set of an assembled weather station. OpenWrt-based
embedded host and sensors are connected by RJ-11 modular cable (1-wire protocol).
Here, the anemometer sensor contains a temperature sensor in it. Wind vane andwindmill must be correctly set up as figure 4 illustrates.

Figure 3: One-wire weather station and communication hostFigure 4: Be sure to correctly setup windmills
Note: when we setup the sensors outside permanently, we must make it waterproof.

4. Login and Configuration of OpenWrt-Based Router
At first, connect your laptop to the router as figure 5 illustrates. In this section, welogin to the router and configure the network and sensors.

Figure 5: Connect your PC to ASUS router4.1. Login to the Router
We can login to the router with telnet client. In default, password is not set.
$ telnet 192.168.1.1
Once you have setup a password for user “root”, we cannot login to the router bytelnet. Instead we can login by ssh.
$ ssh root@192.168.1.1

4.2. Wireless Network Configuration
During the workshop, we configure sensors to submit data via a wireless access point.
Figure 6 shows the network environment.

Figure 6: Wireless network configuration
In OpenWRT, configuration is managed by nvram. To see the configuration of therouter, type,# nvram show
To erace the configuration (never erace during the workshop),# mtd -r erace nvram
The followings are the configuration for Live E! workshop.

# nvram set wl0_mode=sta# nvram set lan_ifname=br0# nvram set lan_ifnames=vlan0# nvram set wan_ifname=eth2# nvram set lan_ipaddr=192.168.1.1# nvram set lan_proto=static# nvram set wan_proto=dhcp# nvram commit# reboot
Then, wait until the reboot completes.

# ifdown wan# nvram set wl0_wep=enabled

# nvram set wl0_key=1# nvram set wl0_key1=<WEP KEY>
# nvram set wl0_ssid=<SSID># nvram set wl0_channel=<CHANNEL_NUMBER># ifup wan; /sbin/wifi
Ping to somewhere outside the network to test the configuration.
E.g., $ ping www.live-e.org

4.3. OWW Setup
One-Wire Weather (OWW) is software for getting data from the sensors. OWW isalready installed in the router before the workshop begins. However, configuration ofOWW is needed to actually use and the configuration is not difficult!! The configuration
is automatically made by carrying out the following procedure.
(1) Execute owwnogui with -i option (interactive mode) as follows,# /rom/livee/owwnogui –i
It may give many messages, but ignore them.
(2) After waiting about 10 seconds, just type “devices driver USB” and enter (without
killing owwnogui). It will reply “done”.
(3) After that, type “save devices” and enter. Then, it will reply “saved devices”.
(4) Kill the owwnogui process by “Ctrl-C”.
(5) Restart owwnogui by# /rom/livee/owwnogui
If it reads and displays the right value as shown in figure 7, please proceed to data
upload configuration.

Figure 7: Sensor data read test by owwnoguiNote: one wire weather (OWW) is provided at http://oww.sourceforge.net/

4.4. Data Upload Configuration
Now let’s configure the router to upload sensor readings to the server in theconference room. We have only to configure the host name of the server and our sensor
ID. The configuration is directly written in crontab script (do not use “crontab –e”, it did
not work collect). Configure it by,# vim /etc/crontab/root----*/1 * * * * /rom/livee/get_csv.sh /rom/livee/owwnogui > /tmp/data.csv*/1 * * * * sleep 52; killall owwnogui; /rom/livee/csv_to_temperature.sh/tmp/data.csv >> /tmp/temperature; /rom/livee/csv_to_winddir.sh/tmp/data.csv >> /tmp/winddir; /rom/livee/csv_to_windspeed.sh/tmp/data.csv >> /tmp/windspeed; rm /tmp/data.csv;/rom/livee/upload_data live-e2.hongo.wide.ad.jp(HOSTNAME)
axis/services/DataUpload200703 hongo.wide.ad.jp/WXT510/test/(SENSORID)
MDAwMDAwMDA= /tmp /rom/livee5* * * * ntpclient -h mail.hongo.wide.ad.jp –s----At first, the first two lines are commented out by “#”. Remove “#” to make them enable.
Set the upload host name and your ID in the script. The host name will be announced
during the workshop and your sensor ID will be given by a piece of paper. Save thescript after setting the information.
Sensor data reading and uploading will be carried out in the background.
To change the time zone setting, see /etc/profile.

5. Data Upload Confirmation
By browsing the web of the Live E! server, we can check the upload status of thesensor. The URL will be announced during the workshop. Your group name will beappeared on the web, if the sensor has worked correctly.

Figure 8: Checking data upload status on the web.
If your group name does not appear in the list (even after five minutes), check thefollowing settings.
-

Configuration of crontab (especially, host name and sensor ID)-

System time of the router

6. Transmission to the permanent Live E! server
After the workshop, when you take this back to your country, please setup the sensor
outside and configure to submit data to the Live E! platform. We have assigned apermanent Live E! server for this purpose. The sensors have been already registered inthe server.
The name of the server is “live-e2.hongo.wide.ad.jp”. Please configure the crontab sothat it sends sensor readings to the server,# vim /etc/crontab/root-----*/1 * * * * /rom/livee/get_csv.sh /rom/livee/owwnogui > /tmp/data.csv*/1 * * * * sleep 52; killall owwnogui; /rom/livee/csv_to_temperature.sh/tmp/data.csv >> /tmp/temperature; /rom/livee/csv_to_winddir.sh/tmp/data.csv >> /tmp/winddir; /rom/livee/csv_to_windspeed.sh/tmp/data.csv >> /tmp/windspeed; rm /tmp/data.csv; /rom/livee/upload_data
live-e2.hongo.wide.ad.jp axis/services/DataUpload200703 SENSOR ID
MDAwMDAwMDA= /tmp /rom/livee
5* * * * ntpclient -h mail.hongo.wide.ad.jp -s

----We can check the uploading status on the web of “live-e2.hongo.wide.ad.jp”.

7. Live E! Current Status

Figure 9: Live E! data management overlay network

Figure 10: Live E! sensor deployment status

8. Advanced Topics
8.1. Ad Hoc Wireless Configuration and OLSR Installation
By setting wireless device to ad hoc mode and carrying out OLSR daemon, the routercan work as an OLSR node.

8.2. Sensor Data Retrieval from the Server via SOAP Web Services
http://live-e-dev.naist.jp/document/howto/
See, data-retrieval-webservice.ppt for detail.

8.3. Development of a Live E! sensor from the scratch
8.3.1. Preparation
ASUS WL500g Premium Router

1-wire weather sensor node (http://www.aagelectronica.com/aag/).

8.3.2. Installation of OpenWrt Image File
Download the image from:http://downloads.openwrt.org/whiterussian/rc5/bin/openwrt-brcm-2.4-jffs2-4MB.trx, and save it to an empty USB memory. Push the USB memory to the ASUS router andpower on with pushing the reset button.
If you’d also like to set up a development environment for ASUS router: see,
http://www.osoite.jp/isi/tassimo/index.php
8.3.3. Installation of OWW and Live E! related files
Download the application files from and install it into /rom/livee
Please make a directory /usr/local/share before running OWW software.
Change the crond execution level.

# mv /etc/init.d/S60cron /etc/init.d/S50cron
And set crontab as section 4.4 and section 6. describe.
Change the timestamp setting by setting TZ environment valiable in /etc/profile.
export TZ=JST-9 # Japan Standard Time (JST)8.4. Live E! Server Installation and Operation
See, http://live-e.hongo.wide.ad.jp/dist/

9. Support
Live E! project has decided to donate the sensors to the workshop participants inorder to enhance research activity in Asia pacific regions. However, please rememberthat the sensor is not free; we expect your contribution by setting up the weather sensor
at your university or collage. It is allowed to re-organize the sensor node (e.g. to installother application software) as long as it makes any advantages to your research andLive E!. For example, if you’d install OLSR software, it works as an OLSR node, andthis may help your research.
Please kindly tell us the following information when you apply for the sensor andafter you get the sensor. Any questions are always welcome at the mail addresses in thenext section.
Contact information of the person in charge
Name



E-Mail AddressTelephone and Fax number

University or Collage Name

Address

Status of sensor deploymentIs it connected to the Internet?

Is remote login allowed? If allowed, how? (If remote login is available, we areeasier to support your sensor deployment.)

Under NAT or Firewall?

Photo of the deployed sensor

Application scenario (for what purpose do you use?)

Progress Report (when you have made any progress)

10. Contact and Reference for Further Information
Live E! Project: http://www.live-e.org/
PIAX: http://www.piax.org/
Live E! Data Web Portal:
http://live-e2.hongo.wide.ad.jp/
http://live-e.naist.jp/
http://live-e.naist.jp/weatherChecker/
Live E! Server Distribution: http://live-e.hongo.wide.ad.jp/dist/
Live E! Document Repository: http://live-e-dev.naist.jp/document/
General Contact Address: live-e-global@hongo.wide.ad.jp
Hideya Ochiai (APNG Live E! & DUMBO WG Chair): jo2lxq@hongo.wide.ad.jp
Satoshi Matsuura: matsuura@is.naist.jp
Masato Yamanouchi masato-y@kmd.keio.ac.jp
Takahiro Kawahara: takahiro-k@is.naist.jp