Programming Assignment 2 CSE535: Mobile Computing (Fall 2010)

Slides:



Advertisements
Similar presentations
How to use TinyOS Jason Hill Rob Szewczyk Alec Woo David Culler An event based execution environment for Networked Sensors.
Advertisements

House of the Future: Network/PC ECE 345 Summer 1999 Ari Pernick, Michael Upham, Matthew Hinterscher Group #5 TA: Purvesh Thakker.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
Report on Sensor Networks By Ganesh Godavari Tuesday, Feb 17, 2004.
EEC-681/781 Distributed Computing Systems Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
7/13/2007AIIT Summer Course - D#1 Wireless Embedded Systems and Networking Lab Day 5: Part 1: TinyOS Programming on Open Source Distribution Jaein Jeong.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Tutorial How to use sensors Reporter : Jensen Vinson.
TinyOS 2.1 Jun Yi Partially based on the tutorial at IPSN 2009 By Stephen Dawson-Haggerty, Omprakash Gnawali, David Gay, Philip Levis, Răzvan Musăloiu-E.,
Introduce of TinyOS.
DPNM Lab., POSTECH 1/25 CS490K - Internet of Things (IoT) Jonghwan Hyun DPNM Lab. Department of Computer Science and Engineering, POSTECH
Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.
Lecture 3a Mobile IP 1. Outline How to support Internet mobility? – by Mobile IP. Our discussion will be based on IPv4 (the current version). 2.
Midterm Review - Network Layers. Computer 1Computer 2 2.
Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application EE194WIR Matt Magpayo
RFid Technology TELE 480 Presentation. What is RFid? RFid is an ADC technology that uses radio- frequency waves to transfer data between a reader and.
LWIP TCP/IP Stack 김백규.
Architectures and Applications for Wireless Sensor Networks ( ) Sensor Node Programming II (UART and Radio) Chaiporn Jaikaeo
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
LWIP TCP/IP Stack 김백규.
Stand-alone PC Environment to Run WSN Applications.
Defense by Amit Saha March 25 th, 2004, Rice University ANTS : A Toolkit for Building and Dynamically Deploying Network Protocols David Wetherall, John.
IP Forwarding.
HW2: Q&A Oct. 02, Lab Machine TinyOS is installed in one machine (531AB). But, you have to bring your kit. There is a sign up sheet. Please sign.
Java Introduction to JNI Prepared by Humaira Siddiqui.
CS 8903 Demo Wireless Interface for the Bioloid Robot Chetna Kaur.
Lab 2: SSL Security Attack June 17, 2008 Hyun Jin Kim.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
Network Programming Chapter 5: Raw Socket Programming.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
CS433/533 Assignment 4 Overview. Fishnet Network protocol simulator & emulator Read fishnet-intro.pdf Get started Network topology (.topo) for emulator.
CODELABOR Shin Sang Jae Template Guide (codelabor-flex-lcds-template)
BAI513 - PROTOCOLS ARP BAIST – Network Management.
TCP/IP Illustracted Vol1. 제목 : IP Routing ( 수 ) 한 민 규
Enabling Grids for E-sciencE Software installation and setup Viet Tran Institute of Informatics Slovakia.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Servers- Apache Tomcat Server Server-side scripts- Java Server Pages.
Merger By Dave Doulton University of Southampton.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
January 9, 2001 Router Plugins (Crossbow) 1 Washington WASHINGTON UNIVERSITY IN ST LOUIS Exercises.
LonWorks Introduction Hwayoung Chae.
ECE 544 Group Project : Routing KC Huang. Objective Application: message multicast. A message is sent from one sender to 1~3 recipients. Reach a protocol.
ROUTING AND ROUTING TABLES 2 nd semester
TOS Message Format Test: Display Raw Data Packet.
Wire the power and the RS-485 port(COM1) of the meter Connect the RS-485 port of the meter to your computer serial port Power up the meter Check the serial.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Simulink Interface Layer (SIL)
PROTOCOLS PROTOCOLS.
Programming Assignment
Slides taken from: Computer Networking by Kurose and Ross
Operating System for Sensor Network
Network Tools and Utilities
Android Runtime – Dalvik VM
Remote Method Invocation
Safe TinyOS.
Discussion: Messaging
Internet Control Message Protocol
Routing and routing tables
Installing and running the local check projects in Eclipse
Net 323: NETWORK Protocols
ECE 544 Protocol Design Project 2016
ECE 544 Group Project : Routing
Vinod Kulathumani West Virginia University
Shanghai Jiao Tong University-October 2016
Preparation for Assignment 2
Lecture 4a Mobile IP 1.
UDP Principles (Chapter 24) (User Datagram Protocol)
32 bit destination IP address
Presentation transcript:

Programming Assignment 2 CSE535: Mobile Computing (Fall 2010)

Environmental Setup IssuesEnvironmental Setup Issues  Go to your home directory. Open.bash_profile or.bashrc  Add necessary environmental variables Ex) export TOSROOT=“/opt/tinyos-2.x”  Important! You need to add the current directory (.) into CLASSPATH  Check these variables using “echo” command. ex) echo $TOSROOT  Run “tos-check-env” to check all other environments.

Multiple JRE installation IssuesMultiple JRE installation Issues  Check the location of Java library tos-locate-jre --jni  Copy toscomm.dll and getenv.dll from \lib\tinyos into the directory you found using tos-locate-jre --jni

Compile and Install a codeCompile and Install a code  make telosb  Compile an application  make telosb install.(node id) bsl,(Comport)  Ex) make telosb install.5 bsl,/dev/ttyUSB0  Type “motelist “ to check the com port number

Overall System ArchitectureOverall System Architecture TelosB (BaseStation) PC (Java App) TelosB (Sensing) Id = 1 TelosB (Sensing) Id = 2 USBUSB EXAMPLE: see TestSerial.java under $TOSROOT/apps/tests/TestSerial EXAMPLE: $TOSROOT/apps/BaseStation EXAMPLE: $TOSROOT/apps/Oscilloscope Sampler.zip in google group Zigbee

Header fileHeader file typedef nx_struct SenseMsg { nx_uint16_t sourceMoteID; // Queried mote id nx_uint16_t datatype; // Data type = temperature, humidity, // or light nx_uint16_t data; // Sensingdata } SenseMsg; enum { AM_SENSEMSG = 100, };

AM (Active Message) formatAM (Active Message) format  Destination address (2 bytes)  Link source address (2 bytes)  Message length (1 byte)  Group ID (1 byte)  Active Message handler type (1 byte)  Payload (up to 28 bytes):  Use SenseMsg structure Call AMSend.getPayload(……)

AM_SENSEMSG = 100AM_SENSEMSG = 100 In configuration file (~AppC.nc) components new AMSenderC(AM_SENSEMSG); components new AMReceiverC(AM_SENSEMSG); In java file (~Msg.java) /** The Active Message type associated with this message. */ public static final int AM_TYPE = 100;

Getting multiple packets for one request  You might get multiple packets after sending one request  Check the sender id and data type whether they match with the request you sent.  Check whether there are other telosb motes with the same ID.  Check whether you create multiple listeners. public TestSerial(MoteIF moteIF) { this.moteIF = moteIF; this.moteIF.registerListener(new TestSerialMsg(), this); } // Invoked when a message arrives public void messageReceived(int toaddr, Message msg) {... }

Creating multiple listenersCreating multiple listeners MoteIF mif = new MoteIF(phoenix); TestSerial serial = new TestSerial(mif); While (!quit) { …….. serial.sendPackets(); …….. } MoteIF mif = new MoteIF(phoenix); While (!quit) { TestSerial serial = new TestSerial(mif); ……… serial.sendPackets(); ……… } Create listener

Tips for using TestSerial.javaTips for using TestSerial.java  Change the header file (TestSerial.h)  Type “make telosb”  Makefile includes TestSerialMsg.java: mig java -target=null $(CFLAGS) -java- classname=TestSerialMsg TestSerial.h test_serial_msg -o  Check TestSerialMsg.java You will see set_sourceMoteID(), get_sourceMoteID() etc.