26
DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH WIRELESS SENSOR NETWORK TARIK I. HASSAN KHALEL A project report submitted in partial fulfilment of the requirements for the award of the degree of Master of Engineering (Electrical- Electronics & Telecommunications) Faculty of Electrical Engineering Universiti Teknologi Malaysia OCTOBER 2009

DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH WIRELESS

SENSOR NETWORK

TARIK I. HASSAN KHALEL

A project report submitted in partial fulfilment of the

requirements for the award of the degree of

Master of Engineering (Electrical- Electronics & Telecommunications)

Faculty of Electrical Engineering

Universiti Teknologi Malaysia

OCTOBER 2009

Page 2: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

iii

This work is dedicated to my beloved wife

Page 3: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

iv

ACKNOWLEDGEMENT

This project would not have been possible without the kind support and

encouragement of my supervisor Dr. Sharifah Hafizah Binti Syed Ariffin. I am grateful

to her for her caring supervision, her enthusiastic involvement in this project and her

supportive suggestions and comments.

I am also very thankful to Mr. Hamdan in Telecom Lab. for his helping and

advices. In addition, my thanks go out to all the researchers of the TRG Laboratory for

their advices and opinions.

My family, for their never-ending love and support in all my efforts, and for

giving me the patience to be who I am.

Page 4: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

v

ABSTRACT

Wireless sensor networks (WSNs) have been used to develop solutions for a

wide range of problems, ranging from military applications to environmental and habitat

monitoring. Actually, these applications require low cost, low power and low data sensor

nodes that communicating over multiple hop to cover a large geographical area. One type of

WSNs is Telosb, which is the latest in a line of nodes developed by University California

Berkeley to enable wireless sensor network research. It is a new mote design built from

scratch based on experiences with previous mote generations. Telos’ new design

consists of three major goals to enable experimentation, minimal power consumption,

easy to use, and increased software and hardware robustness. The main objective of this

research is to embed nesC code in four WSNs and to distribute them to collect data

environment (temperature and humidity) the data will collected in a PC through a base

station sensor connected to the PC. This network of sensors and PC will be interfaced to

the Internet and by using JXTA project which is a kind of peer to peer technology, the

collected data can be implemented in a creating file by writing a java code to create a

file each our in the PC. The created file will transfer to another place to other peer using

JXTA shell through its commands. In our project the embedded operating system used

in WSNs is TinyOS 2.1.0, and the wireless sensor is TelosB which is consist of low power

transceiver based on CC2420 ChipCon chips that employ IEEE 802.15.4.

Page 5: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

vi

ABSTRAK

Rangkaian sensor tanpa wayar (WSNs) telah digunakan untuk mengembangkan

solusi untuk pelbagai masalah, mulai dari aplikasi ketenteraan untuk persekitaran dan

habitat pemantauan. Sebenarnya, aplikasi ini memerlukan kos rendah, daya rendah dan

rendah nod sensor data bahawa berkomunikasi selama beberapa hop untuk merangkumi

kawasan geografi yang besar. Satu jenis WSNs adalah Telosb, yang terbaru dalam garis

nod yang dibangunkan oleh Universiti California, Berkeley untuk mengaktifkan

rangkaian sensor wayarles WSNs kajian. Ini adalah desain lebih baru yang dibina dari

awal berdasarkan pengalaman dengan lebih generasi sebelumnya. Telos desain baru

terdiri daripada tiga tujuan utama untuk membolehkan eksperimentasi, konsumsi daya

minimal, mudah digunakan, dan peningkatan ketahanan perisian dan perkakasan. Tujuan

utama dari kajian ini adalah untuk menanamkan kod nesc dalam empat WSNs dan untuk

mengedar mereka untuk mengumpul data persekitaran (suhu dan kelembapan) data akan

dikumpul dalam sebuah PC melalui stesen pengkalan sensor disambungkan ke PC.

Jaringan ini sensor dan PC akan dihubungkan ke Internet dan dengan menggunakan

projek JXTA yang merupakan jenis teknologi rakan rakan, data yang dikumpul dapat

dilaksanakan dalam mencipta fail dengan menulis kod java untuk membuat sebuah file

setiap kita di PC. Gambar yang dibuat akan memindahkan ke tempat lain untuk rakan

lain yang menggunakan shell JXTA melalui arahan. Dalam projek kami tertanam sistem

operasi yang digunakan dalam WSNs adalah TinyOS 2.1.0, dan tanpa wayar sensor

TelosB yang terdiri daripada pemancar kuasa rendah berdasarkan CC2420 cip yang

menggajikan ChipCon IEEE 802.15.4.

Page 6: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

DECLARATION ii

DEDICATION iii

ACKNOLEDGEMENT iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF ABBREVIATIONS xiv

LIST OF APPENDICES xvi

1 INTRODUCTION 1

1.1 Background 1

1.1.1 Application of WSNs 3

1.1.2 Main features of WSNs 4

1.2 Problem Statement 4

Page 7: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

viii

1.3 Objectives 6

1.4 Scope of Work 6

1.5 Significance of research Work 6

1.6 Thesis Organization 7

2 LITERATURE REVIEW 8

2.1 Introduction 8

2.2 Sensor node for WSNs 10

2.3 Wireless Sensor Networks Applications 12

2.3.1 Environmental Data Collection 12

2.3.2 Military surveillance and target tracking 13

2.3.3 Security Monitoring 14

2.3.4 Structural and seismic monitoring 14

2.4 Wireless sensor networks challenges 15

2.5 Operating System (TinyOS) 17

2.5.1 The nesC Language 18

2.5.2 TOSSIM 19

2.6 TelosB Wireless Sensor 20

2.6.1 Minimum power consumption 22

2.7 JXTA project 23

2.7.1 JXTA Basic Elements 24

2.7.2 What is XML? 26

2.7.3 JXTA Shell 26

2.7.4 JXTA peers 27

Page 8: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

ix

2.7.5 Peer groups 28

2.7.6 Discovery 29

2.8 Related work 30

2.9 Summary 32

3 WIRELESS SENSOR NETWORKS PROGRAMMING 33

3.1 Introduction 33

3.2 Writing nesC codes 35

3.3 Serial Forwarder 44

3.4 The Java code 45

3.5 Oscilloscope application 47

3.6 Summary 49

4 DATA TRANSMISSION USING JXTA PROJECT 50

4.1 Introduction 50

4.2 Peer to peer network 50

4.3 JXTA setup 52

4.3.1 Java on Linux OS (Ubuntu) 52

4.3.2 Installing JXTA shell 53

4.3.3 Creating peer group 57

4.5 Summary 60

Page 9: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

x

CONCLUSION AND RECOMMENDAION 61

5.1 Conclusion 61

5.2 Recommendation for future work 62

REFERENCES 63

Appendices A-D 67-79

Page 10: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xi

LIST OF TABLES

TABLE NO. TITLE PAGE

2.1 Shows comparison between Telos and Mica2 and MicaZ 22

3.1 Shows the convention used in TinyOS source tree 37

Page 11: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xii

LIST OF FIGURES

FIGURE NO. TITLE PAGE

1.1 Technological advances in the area of computing devices

from mainframe to wireless sensor networks

2

2.1 Shows some examples of different size and shape of wireless

sensor networks

9

2.2 Typical Multihop Wireless Sensor Network Architecture 10

2.3 Collecting data from different WSN points then through the

link to the internet

13

2.4 TelosB ultra-low power wireless model 21

2.5 JXTA virtual network 24

3.1

3.2

Shows the flowchart of the research methodology

The overall model of the project.

34

3.3 The command to install sensor with nesC code 37

3.4 The installation command at sensor base station 41

3.5 The received packet coming from the mote 42

3.6 Serial Forwarder display at the base station 44

3.7 The converted data by the Java code after received from the

sensor

47

Page 12: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xiii

3.8 Shows the temperature reading for the four sensors 48

4.1 The verification of the Java on Ubuntu OS 52

4.2 JXTA configurator with peer name and password 53

4.3 The advanced tab settings in JXTA configurator 54

4.4 The Rendezvous/Relay tab 55

4.5 JXTA shell window 56

4.6 The result for two peers in the network setup 57

4.7 The details of creating group and joining the group 58

4.8 The sending file from tarik2 peer to tarik peer 59

4.9 The receiving file in the peer tarik 59

4.10 The details of the received file displayed at the other peer. 60

Page 13: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xiv

LIST OF ABBREVIATIONS

ADC - Analogue to Digital Converter

DARPA - Defense Advanced Research Project Agency

ISM - Industrial Scientific Medical

IEEE - Institute of Electrical and Electronics Engineers

J2SE - Java 2 Standard Edition

LAN - Local Area Network

NAT - Network Allocation Table

nesC Network Embedded System C

P2P Peer 2 Peer

PRR - Packet Reception Rate

PC - Personal Computer

QoS - Quality of Service

RF Radio Frequency

SensIT - Sensor Information Technology

TinyOS - Tiny operating system

Page 14: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xv

TOSSIM - Tiny Operating System Simulator

UCLA - University California Los Angeles

USB - Universal Serial Bus

WAN - Wide Area Network

WSNs - Wireless Sensor Networks

XML - Extensible Markup Language

Page 15: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

xvi

LIST OF APPENDICES

APPENDIX. TITLE PAGE

A Telosb Specification 69

B JXTA shell command 72

C

D

Linux Operating system

Java code

67

77

Page 16: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

CHAPTER 1

INTRODUCTION

1.1 Background

In recent years, much interest has been involved in the design of Wireless

Sensor Networks (WSNs) technologies. WSN technologies are driving many of the

significant advances currently being made in the field of data communications. End-

users of WSN technologies want their sensed data to be available in a timely,

accurate and secure fashion. Interfacing WSN technologies with the Internet is a key

requirement for making sensor data globally available.

The technological advances in the areas of integrated circuits and device

fabrication will yield tiny, low cost, low power sensors, as shown in Figure 1. Tiny is

important because they can be scattered around to measure just about everything that

you can imagine. Low power because they won't need to carry a large battery and

may even be solar-powered. Low-cost because the numbers required will be

enormous. A wireless sensor network in its simplest form can be defined as a

network of (possibly low size and low complex) devices denoted as nodes that can

Page 17: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

2

sense the environment and communicate the information gathered from the

monitored field (e.g., an area or volume) through wireless links; the data is

forwarded, possibly via multiple hops relaying, to a sink (sometimes denoted as

controller or monitor) that can use it locally, or is connected to other networks (e.g.,

the Internet) through a gateway. The nodes can be stationary or moving. They can be

aware of their location or not. They can be homogeneous or not [1].

These tiny sensor nodes, which consist of sensing, data processing, and

communicating components, leverage the idea of sensor networks. Sensor networks

represent a significant improvement over traditional sensors. Researchers see WSNs

as an ‘‘exciting emerging domain of deeply networked systems of low-power

wireless motes with a tiny amount of CPU and memory, and large federated

networks for high-resolution sensing of the environment’’ [2].

The use of WSN has been on the increase. More and more application are

based on WSN today, many people think that wireless sensor networks can become

Figure 1.1: Technological advances in the area of computing devices from

mainframeto wireless sensor networks.

Page 18: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

3

as important as the Internet. Just as the Internet allows access to digital information

anywhere, sensor networks will provide remote interaction with the physical world.

For many applications, the sensor networks cannot operate in complete

isolation; there must be a way for a monitoring entity to gain access to the data

produced by the sensor network. By connecting the sensor network to an existing

network infrastructure such as the global Internet, a local-area network, or a private

intran et, gaining remote access to the sensor network is straightforward.

1.1.1 Application of WSN

WSN has very wide applications for areas including health care remote

monitoring, military and national security application. Environmental data collection

application is one where a research scientist wants to collect several sensor readings

from a set of points in an environment over a period of time in order to detect trends

and interdependencies. This scientist would want to collect data from hundreds of

points spread throughout the area and then analyze the data offline [3].

There are many related applications using WSN as their fundamental

communication platform, such as traffic control, industrial security, animal

monitoring, and military information integration. WSN also used in embedded

applications, such as environmental monitoring to improve agricultural yields,

structural monitoring to track building and bridge integrity, and industrial control to

provide more sense points and control points at lower cost [4].

Security monitoring networks are composed of nodes that are placed at fixed

locations throughout an environment that continually monitor one or more sensors to

Page 19: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

4

detect an anomaly. A key difference between security monitoring and environmental

monitoring is that security networks are not actually collecting any data. This has a

significant impact on the optimal network architecture. Each node has to frequently

check the status of its sensors but it only has to transmit a data report when there is a

security violation. The immediate and reliable communication of alarm messages is

the primary system requirement. These are “report by exception” networks.

1.1.2 Main features of WSNs

The main features of WSNs are: scalability with respect to the number of

nodes in the network, self-organization, self-healing, energy efficiency, a sufficient

degree of connectivity among nodes, low-complexity, low cost and size of nodes are

all very relevant features of WSNs; those protocol architectures and technical

solutions providing such features can be considered as a potential framework for the

creation of networks able to implement several types of applications. Unfortunately,

the definition of such a protocol architecture and technical solution is not simple, and

the research still needs to work on it. The massive research on WSNs started after the

year 2000. however, it took advantage of the outcome of the research on wireless

networks performed since the second half of the previous century. And some

researchers tried to report their skills acquired in the field of ad hoc networks to the

study of WSNs.

1.2 Problem Statement

Wireless sensor networks (WSNs) have been used to develop solutions for a

wide range of problems, ranging from military applications to environmental and

Page 20: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

5

habitat monitoring [5]. WSNs are suitable for problems with harsh environmental

conditions that need unattended operation. Although they are mostly used to collect

fine grained environmental or ambient information (i.e., humidity, pressure,

temperature, etc.), they can also be used to actuate on their surrounding environment

(e.g., by controlling mechanical actuators).

However, for WSNs to become truly ubiquitous, a number of challenges and

hurdles must be overcome. One of the challenges on sensor nodes its small coverage

area due to its low link quality. WSN is based on IEEE 802.15.4 that has very limited

bandwidth and low transmits power. This will cause link quality can influenced by

environmental factors. Recent empirical results obtained on the Berkeley mote

platform indicate that wireless links are highly probabilistic, asymmetric, and the link

quality (i.e, Packet Reception Rate (PRR)) depends on the transmission power and

the distance traveled by a packet. As the result, communication delays in such system

are highly unpredictable. Consequently, the link quality between sensor nodes in

WSN should be considered while designing multi-hop routing in order to achieve

high throughput for WSNs[6].

Integrating the WSNs with the internet, the information transfer and network

management can be done anywhere, this integration in this project is by using JXTA

P-2-P technology, which is a kind of Java technology, JXTA with instant messaging,

grid computing, collaboration, or even file sharing, because JXTA is all of these

things -- and more. JXTA is a set of protocols and APIs for general-purpose,

computer-to-computer communication. Using JXTA, will be very useful to take the

data from one place to the place and to share information, especially that JXTA

project are use peer groups, which can be make a group for each special data taken

from the sensor, like temperature, humidity, and so on.

Page 21: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

6

1.3 Objectives

The main objectives of this proposed research are:

a) To use embedded programming code in WSNs for environmental data

collection.

b) To integrate the WSNs with the Internet.

c) To use JXTA project as a tool to share the information using peer to peer

communication.

1.4 Scope of Work

The scope of this work can be divided into several scopes. The first scope

will use Telosb as a sensor device to collect environmental data (temperature and

humidity), this will be done by writing a nesC codes and embedded it in four WSNs.

Then, implement JXTA P2P technology for the integration of WSN and the Internet.

The collected data will be transferred using JXTA shell from one peer to another

peer.

1.5 Significance of Research Work

JXTA project are used as P2P method to take advantage of the physical

parameters of WSN nodes and the environment to carry out the environmental data

from one place to other place without need of using many sensors and by using just

one hop to the base station WSN. This connection method of four sensors to make

Page 22: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

7

one hop to the base station and then to the PC can be used to share the environment

information between many places, and can be used as supervision system

1.6 Thesis Organization

The thesis is arranged into five chapters. The first chapter introduces the

project work by discussing the background of WSNs and its ability to collect

environmental data. Besides that, it also discusses the project objectives, scope of

project, significance of the research work, and the thesis organizations. Literature

review shall be discussed in the ensuing chapter. Previous researches related to the

WSN and its application and brief discussion on JXTA project have been presented

in the chapter two. The methodology and the nesC codes, java code and JXTA

methods, analysis, JXTA project installation and JXTA shell instructions have been

existing in chapter three. Chapter 4 demonstrated the methods of P-2-P technology

and the reason to choose JXTA protocols to transfer the collected data from WSN.

The final chapter, chapter 6 summarizes the research finding and suggested potential

future work

Page 23: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

63

REFERENCES

[1] R. Verdone, D. Dardari, G. Mazzini, A. Conti., Wireless sensor and actuator

networks, Technologies, analysis and design. 2008 . Academic Press (UK).

[2] K. Romer, F. Mattern. The Design Space of Wireless Sensor Networks, IEEE

Wireless Communications Journal, Volume 11, Issue 6, Dec. 2004,

Page(s):54-61.

[3] A. Mainwaring, et al., Wireless Sensor Networks for Habitat Monitoring, in

ACM International Workshop on Wireless Sensor Networks and Applications

(WSNA'02). 2002.

[4] J. W. hui and David E. culler. Extending IP to Low Power, Wireless Personal

Area Network. IEEE Computer Society, July 2008.

[5] J. L. Hill. (2003), System Architecture for Wireless Sensor Networks. Ph.D.

thesis. UNIVERISY OF CALIFORNIA, BERKELEY.

[6] A. B. Jamil., Optimal forwarding routing protocol in IPV6-based wireless

sensor network. Master thesis, University Technology Malaysia, May 2009.

[7] I. Stojmenovic., Handbook of Sensor Networks – Algorithms and

Architectures. WILEY INTERSCIENCE. 2005.

[8] Römer, Kay; Friedemann Mattern (December 2004). "The Design Space of

Wireless Sensor Networks". IEEE Wireless Communications 11 (6): 54–61.

doi:10.1109/MWC.2004.1368897

Page 24: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

64

[9] http://www.xbow.com/Products/productdetails.aspx?sid=252

[10] Cerpa, A., et al., Habitat monitoring: Application driver for wireless

communications technology. ACM SIGCOMM Workshop on Data

Communications in Latin America and the Caribbean, 2001.

[11] Mainwaring, A., et al., Wireless Sensor Networks for Habitat Monitoring, in

ACM International Workshop on Wireless Sensor Networks and Applications

(WSNA'02). 2002.

[12] DARPA IPTO, “Sensit: Sensor Information Technology Program,” online at

http://www.darpa.mil/ipto/programs/sensit/ .

[13] B. Krishnamachari., Networking Wireless Sensors, ¢AMBRIDGE

UNIVERSITY PRESS 2005.

[14] K. Klues, V. Handziski, and et al.,“Dynamic resource management in a static

network operating system.” Oct 9 2006.

[15] H. J., S. R., W. A., and et al., “Systems architecture directions for networked

sensors.” 2000.

[16] P. Levis, S. Madden, J. Polastre, and et al., “Systems architecture directions

for networked sensors.”

[17] E. Trumpler and R.Han., “A systematic framework for evolving tinyos.”

2006., pp. 61–65.

[18] D. Gay, P. Levis, R. von Behren, and et al., “The nesc language: A holistic

approach to networked embedded systems,” in Proceedings of 5th Annual

ACM/IEEE International Conference on Mobile Computing and Networking

(MobiCom ’99), vol. 35, May 2003.

Page 25: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

65

[19] Getting Started with TinyOS, http://docs.tinyos.net/index.php/Getting_ Started_with_TinyOS .

[20] L. Lange ,J. Vàradi. Comparing OS for performance and power consumption

for use with Wireless Sensor Networks. University of Limerick.

[21] J. Polastre, R. Szewczyk, C. Sharp, and D. Culler, “The mote revolution: Low

power wireless sensor networks,” in Proceedings of the 16th

[23]

Symposium on

High Performance Chips (HotChips), Aug. 2004.

[22] V. Shnayder, M. Hempstead, B. Rong Chen, G. Werner-Allen, , and M.

Welsh, “Simulating the power consumption of large-scale sensor network

applications,” in Proceedings of the Second ACM Conference on Embedded

Networked Systems (SenSys), Nov. 2004.

www.xbow.com .

[24] http://www.sgmlsource.com/history/AnnexA.htm

[25] S. Oaks, B. Traversat, L. Gong., JXTA in a nutshell, A deskto quick reference.

2002 O'Reilly and Associates.

[26] B. J. Wilson., JXTA, 2002 by New Riders Publishing.

[27] J. Polastre, R. Szewczyk, C. Sharp, and D. Culler, “The mote revolution: Low

power wireless sensor networks,” in Proceedings of the 16th

Symposium on

High Performance Chips (HotChips), Aug. 2004.

[28] R. Cabajo, M. Huggard,C. Mc Goldrick, “An End-to-End routing protocol for

Peer-to-Peer communication in Wireless Sensor Networks” ACM 2008,

Glasgow-Scotland.

Page 26: DATA TRANSMISSION USING JUXTAPOSE PROJECT WITH …

66

[29] M. Isomura, C. Decker, M. Beigl, “Generic Communication structure to

integrate widely distributed wireless sensor nodes by P2P technology.

University of Karlsruhe, Germany.

[30] M. Gago, R. Roman, J. Lopez “A survey on the applicability of trust

management systems for wireless sensor networks” IEEE 2007.

[31] M. Perkins, N. Correal and Bob O’Dea, “Emergent Wireless Sensor Network

Limitations: A Plea for Advancement in core Technologies. IEEE 2002.

[32] E. Shakshuki, S. Hussain, A. Matin, A. Matin,” P2P Multi-agent Data Transfer

and Aggregation in Wireless Sensor Networks” Acadia University,Nova

Scotia, Canada.

[33] A. Antoniou et-al., A Peer-to-Peer Environment for Monitoring Multiple

Wireless Sensor Networks, Computer Engineering and Informatics

Department, University of Patras, Grece

[34] P. Levis., TinyOS Programming. February 2006.

[35] Technical Datasheet Interface to the Sensirion® SHT11™. Pforzheim

University of applied sciences.

[36] http://www.iterating.com/component/content/article.

[37] S. See., Project JXTA Technology Overview. Asia Pacific Science &

Technology Center Sun Microsystems Inc. www..jxta.org