David Culler, Jason Hill, Robert Szewczyk, and Alec Woo U.C. Berkeley 2/9/2001 TinyOS Programming Boot Camp (V) Communication.

Slides:



Advertisements
Similar presentations
Phil Buonadonna, Jason Hill CS-268, Spring 2000 MOTE Active Messages Communication Architectures for Networked Mini-Devices Networked sub-devicesActive.
Advertisements

A System Architecture for Tiny Networked Devices
A Transmission Control Scheme for Media Access in Sensor Networks Lee, dooyoung AN lab A.Woo, D.E. Culler Mobicom’01.
DSR The Dynamic Source Routing Protocol Students: Mirko Gilioli Mohammed El Allali.
Monday, June 01, 2015 ARRIVE: Algorithm for Robust Routing in Volatile Environments 1 NEST Retreat, Lake Tahoe, June
PEDS September 18, 2006 Power Efficient System for Sensor Networks1 S. Coleri, A. Puri and P. Varaiya UC Berkeley Eighth IEEE International Symposium on.
MAC Protocols Media Access Control (who gets the use the channel) zContention-based yALOHA and Slotted ALOHA. yCSMA. yCSMA/CD. TDM and FDM are inefficient.
Congestion Control and Fairness for Many-to-One Routing in Sensor Networks Cheng Tien Ee Ruzena Bajcsy Motivation Congestion Control Background Simulation.
20 – Collision Avoidance, : Wireless and Mobile Networks6-1.
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
6: Wireless and Mobile Networks6-1 Chapter 6: Wireless and Mobile Networks Background: r # wireless (mobile) phone subscribers now exceeds # wired phone.
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
A Transmission Control Scheme for Media Access in Sensor Networks Presented by Jianhua Shao.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
A Transmission Control Scheme for Media Access in Sensor Networks Alec Woo, David Culler (University of California, Berkeley) Special thanks to Wei Ye.
CS 5253 Workshop 1 MAC Protocol and Traffic Model.
Power saving technique for multi-hop ad hoc wireless networks.
Cs/ee 143 Communication Networks Chapter 3 Ethernet Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.
1 Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
Wi-Fi Wireless LANs Dr. Adil Yousif. What is a Wireless LAN  A wireless local area network(LAN) is a flexible data communications system implemented.
CIS 725 Media Access Layer. Medium Access Control Sublayer MAC sublayer resides between physical and data link layer Broadcast/multiacess channels N independent.
A System Architecture for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister
NetSim ZigBee Simulation Code Walkthrough in 10 steps
Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application EE194WIR Matt Magpayo
A Transmission Control Scheme for Media Access in Sensor Networks Alec Woo and David Culler University of California at Berkeley Intel Research ACM SIGMOBILE.
Ch. 16 High-Speed LANs The Emergence of High- Speed LANs Trends –Computing power of PCs has continued to grow. –MIS organizations recognize the.
LECTURE9 NET301. DYNAMIC MAC PROTOCOL: CONTENTION PROTOCOL Carrier Sense Multiple Access (CSMA): A protocol in which a node verifies the absence of other.
Mobile Adhoc Network: Routing Protocol:AODV
Power Save Mechanisms for Multi-Hop Wireless Networks Matthew J. Miller and Nitin H. Vaidya University of Illinois at Urbana-Champaign BROADNETS October.
Token Passing: IEEE802.5 standard  4 Mbps  maximum token holding time: 10 ms, limiting packet length  packet (token, data) format:  SD, ED mark start,
Why Visual Sensor Network & SMAC Implementation Group Presentation Raghul Gunasekaran.
MARCH : A Medium Access Control Protocol For Multihop Wireless Ad Hoc Networks 성 백 동
1 An Adaptive Energy-Efficient and Low-Latency MAC for Data Gathering in Wireless Sensor Network Gang Lu, Bhaskar Krishnamachari, and Cauligi Raghavendra.
Data and Computer Communications Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education.
Speaker : Junn-Keh Yeh Date : 2010/7/2 1.  IEEE  Forming, Joining, and Rejoining ZigBee Networks ◦ Forming Networks ◦ Joining Networks ◦ Rejoining.
Minimizing Energy Consumption in Sensor Networks Using a Wakeup Radio Matthew J. Miller and Nitin H. Vaidya IEEE WCNC March 25, 2004.
S Master’s thesis seminar 8th August 2006 QUALITY OF SERVICE AWARE ROUTING PROTOCOLS IN MOBILE AD HOC NETWORKS Thesis Author: Shan Gong Supervisor:Sven-Gustav.
DSR: Introduction Reference: D. B. Johnson, D. A. Maltz, Y.-C. Hu, and J. G. Jetcheva, “The Dynamic Source Routing Protocol for Mobile Ad Hoc Networks,”
Mitigating Congestion in Wireless Sensor Networks Bret Hull, Kyle Jamieson, Hari Balakrishnan Networks and Mobile Systems Group MIT Computer Science and.
SRL: A Bidirectional Abstraction for Unidirectional Ad Hoc Networks. Venugopalan Ramasubramanian Ranveer Chandra Daniel Mosse.
Networks and Distributed Systems Mark Stanovich Operating Systems COP 4610.
System Architecture Directions for Networked Sensors Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, Kris Pister Presenter: James.
CS3502: Data and Computer Networks Local Area Networks - 1 introduction and early broadcast protocols.
SMAC: An Energy-efficient MAC Protocol for Wireless Networks
An Energy-Efficient MAC Protocol for Wireless Sensor Networks Speaker: hsiwei Wei Ye, John Heidemann and Deborah Estrin. IEEE INFOCOM 2002 Page
CS3502: Data and Computer Networks Local Area Networks - 1 introduction and early broadcast protocols.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
Active Message Application: CONNECT Presented by Xiaozhou David Zhu Oommen Regi July 6, 2001.
Networks and Distributed Systems Sarah Diesburg Operating Systems COP 4610.
0.1 IT 601: Mobile Computing Wireless Sensor Network Prof. Anirudha Sahoo IIT Bombay.
A Bandwidth Scheduling Algorithm Based on Minimum Interference Traffic in Mesh Mode Xu-Yajing, Li-ZhiTao, Zhong-XiuFang and Xu-HuiMin International Conference.
Carrier Sense Multiple Access Improve ALOHA by using carrier sense –Stations listen to the carrier before transmitting –If channel is busy, the station.
Medium Access in Sensor Networks. Presented by: Vikram Shankar.
S-MAC Taekyoung Kwon. MAC in sensor network Energy-efficient Scalable –Size, density, topology change Fairness Latency Throughput/utilization.
Fundamentals of Computer Networks ECE 478/578
Medium Access in Sensor Networks. Presented by: Vikram Shankar.
KAIS T Location-Aided Flooding: An Energy-Efficient Data Dissemination Protocol for Wireless Sensor Networks Harshavardhan Sabbineni and Krishnendu Chakrabarty.
Why does it need? [USN] ( 주 ) 한백전자 Background Wireless Sensor Network (WSN)  Relationship between Sensor and WSN Individual sensors are very limited.
MAC Protocols for Sensor Networks
MAC Protocols for Sensor Networks
An Energy-efficient MAC protocol for Wireless Sensor Networks
Wireless LANs Wireless proliferating rapidly.
Services of DLL Framing Link access Reliable delivery
EEC-484/584 Computer Networks
Viet Nguyen Jianqing Liu Yaqin Tang
EEC-484/584 Computer Networks
Chapter 6 Multiple Radio Access.
Presentation transcript:

David Culler, Jason Hill, Robert Szewczyk, and Alec Woo U.C. Berkeley 2/9/2001 TinyOS Programming Boot Camp (V) Communication

TOS Boot Camp2 Outline Media Access Control Ad Hoc Routing Mechanism Hands on Exercise

TOS Boot Camp3 Mote Characteristics Hardware: single channel RF radio Nodes contend for the same wireless channel Traffic is likely –Periodic : nature of sensor networks applications –Correlated : detection of common events Collision detection mechanism is not available Carrier Sense Multiple Access (CSMA)

TOS Boot Camp4 CSMA in TOS Framework Channel capacity ~25 packet/s –High amount of traffic due to »High node density »High transmission rate of each node Application layer lacks information about the channel Place CSMA at RADIO_BYTE level in between application layer and RFM radio component

TOS Boot Camp5 CSMA Design Basic mechanism –Listen on the channel before transmit »Only transmit if channel is idle –If the channel is busy, “wait” until channel becomes idle again Correlated periodic traffic may lead to repeated collisions Introduce random delay in MAC layer If channel becomes busy, MAC backpressures to application to drop further transmissions

TOS Boot Camp6 CSMA in TOS Network Stack Application AM PACKET RADIO BYTE RFM Backpressure Channel is busy AM_SEND_MSG fails VAR(state) != 0

TOS Boot Camp7 One CSMA Example In each RADIO_BYTE components Random listening period Transmission Request Listen for Random Period Transmit Busy Idle

TOS Boot Camp8 FOUR_B_RADIO_BYTE.c (RADIO_BYTE_INIT) 16 bit Linear Feedback Shift Register (LFSR) as Pseudo Random Number Generator Initialization char TOS_COMMAND(RADIO_BYTE_INIT)(){ TOS_CALL_COMMAND(RADIO_SUB_INIT)(); VAR(wait_amount) = 12; VAR(shift_reg) = 119 * LOCAL_ADDR_BYTE_2; return 1; } Minimum number of bits to listen (Encoding Dependent) Seed for LFSR

TOS Boot Camp9 FOUR_B_RADIO_BYTE.c (RADIO_BYTE_TX_BYTES) char TOS_COMMAND(RADIO_BYTE_TX_BYTES)(char data){ … if(VAR(state) == 0){ //if currently in idle mode, then switch over to transmit mode //and set state to waiting to transmit first byte. VAR(third) = data; VAR(state) = 10; return 1; } … Goes to CSMA

TOS Boot Camp10 FOUR_B_RADIO_BYTE.c (RADIO_BYTE_RX_BIT_EVENT) else if(VAR(state) == 10){ if(data){ VAR(waiting) = 0; }else{ if (++VAR(waiting) == 11){ bit = (VAR(shift_reg) & 0x2) >> 1; bit ^= ((VAR(shift_reg) & 0x4000) >> 14); bit ^= ((VAR(shift_reg) & 0x8000) >> 15); VAR(shift_reg) >>=1; if (bit & 0x1) VAR(shift_reg) |= 0x8000; VAR(wait_amount) = (VAR(shift_reg) & 0x3f)+12; } if(VAR(waiting) > VAR(wait_amount)){ … Prepare for transmission } 16 bit LFSR Channel is busy. Starts again Listening period  [12,75]

TOS Boot Camp11 CSMA Evaluation Channel Utilization ~70% Throughput per node is fair

TOS Boot Camp12 Outline Media Access Control Ad Hoc Routing Mechanism Hands on Exercise

TOS Boot Camp13 Ad Hoc Routing Goal Nodes should self organize into a multi-hop network topology Each node can discover a route to deliver packets to the base station –uni-directional towards the base station Simple, robust, local algorithm Works in an ad hoc, spontaneously changing network Assume bi-directional connectivity in general

TOS Boot Camp14 A Simple Ad Hoc Routing Example (I) AM_ROUTE.c A route is simply knowing a neighboring node (or parent) that can send to the base station Base station broadcasts itself as a route Node gets the route and retransmits the broadcast with itself as the route

TOS Boot Camp15 A Simple Ad Hoc Routing Example (II) Base station refreshes route with periodic broadcast Nodes expire the old route and wait for base station next route refreshment Nodes only broadcast once for each route update it gets –Prevent rebroadcast of children’s broadcasts –has an effect in lowering the number of messages in broadcasting to the entire network –Broadcast becomes unidirectional (from BS outward)

TOS Boot Camp16 Packet Forwarding Node receives a packet destined to it will – forward it to the next hop Base station receives a packet destined to it will –forwards it to the UART

TOS Boot Camp17 Packet Format Defined in system/include/MSG.h #define DATA_LENGTH 30 struct MSG_VALS{ char addr char type char group; char data[DATA_LENGTH]; }; Special Address (addr) –Broadcast 0xff (TOS_BCAST_ADDR) –Send to UART 0x7e (TOS_UART_ADDR) Application Data Unit

TOS Boot Camp18 Routing Data Unit data[0] = number of hops from the base station Each node appends its address to data[] indexed by number of hops (data[(int)data[0]]) 112 BS’s data unit BS (12) Node 33 Node Node 33’s data unit Node 56’s data unit

TOS Boot Camp19 Ad Hoc Routing Code in AM_ROUTE.c

TOS Boot Camp20 AM_ROUTE.c (AM_ROUTE_INIT) (Base Station) char TOS_COMMAND(AM_ROUTE_INIT)(){ … //set beacon rate for route updates to be sent TOS_COMMAND(CONNECT_SUB_CLOCK_INIT)(255, 0x06); //route to base station is over UART. VAR(route) = TOS_UART_ADDR; VAR(set) = 1; VAR(place) = 0; VAR(data_buf).data[0] = 1; VAR(data_buf).data[1] = TOS_LOCAL_ADDRESS; … } Tick every 2 seconds Set route to UART BS is 1 hop away Append my ID

TOS Boot Camp21 AM_ROUTE.c (AM_ROUTE_INIT) (NOT Base Station) char TOS_COMMAND(AM_ROUTE_INIT)(){ … //set rate of sampling TOS_COMMAND(CONNECT_SUB_CLOCK_INIT)(255, 0x03); VAR(set) = 0; VAR(route) = 0; VAR(count) = 0; return 1; } Tick every 0.25 seconds Route is not set initially

TOS Boot Camp22 AM_ROUTE.c (AM_ROUTE_SUB_CLOCK) void TOS_EVENT(AM_ROUTE_SUB_CLOCK)(){ #ifdef BASE_STATION … TOS_CALL_COMMAND(ROUTE_SUB_SEND_MSG)(TOS_BCAST _ADDR,AM_MSG(ROUTE_UPDATE),&VAR(buf)); … #else … if(VAR(set) > 0) VAR(set) --; … #endif } Base station’s periodic broadcast Nodes count down to expire its route

TOS Boot Camp23 AM_ROUTE.c (ROUTE_UPDATE) TOS_MsgPtr TOS_MSG_EVENT(ROUTE_UPDATE)(TOS_MsgPtr msg){ … //if route hasn't already been set this period... if(VAR(set) == 0){ //record route VAR(route) = data[(int)data[0]]; VAR(set) = 8; //create an update packet to be sent out. data[0]++; data[(int)data[0]] = TOS_LOCAL_ADDRESS; … TOS_CALL_COMMAND(ROUTE_SUB_SEND_MSG) (TOS_BCAST_ADDR,AM_MSG(ROUTE_UPDATE),msg); … } Set route to parent’s ID Set to expire the route after 8 ticks I am 1 more hop away from the BS Append my ID to the buffer Broadcast the message

TOS Boot Camp24 AM_ROUTE.c (ROUTE_UPDATE cont.) TOS_MsgPtr TOS_MSG_EVENT(ROUTE_UPDATE)(TOS_MsgPtr msg){ … If (VAR(set) == 0){ … }else{ return msg; } … Only broadcast once for each new route; otherwise, do nothing.

TOS Boot Camp25 Packet Forwarding Code in AM_ROUTE.c

TOS Boot Camp26 AM_ROUTE.c (ROUTE_SUB_DATA_READY) Data source char TOS_EVENT(ROUTE_SUB_DATA_READY)(int data){ … if(VAR(route) != 0 && other App. Specific conditions){ … TOS_CALL_COMMAND(ROUTE_SUB_SEND_MSG) (VAR(route),AM_MSG(DATA_MSG), &VAR(data_buf)); … } Send out a data packet if a node has a route.

TOS Boot Camp27 AM_ROUTE.c (DATA_MSG) TOS_MsgPtrTOS_MSG_EVENT(DATA_MSG) (TOS_MsgPtr msg){ … if(VAR(route) != 0){ Application Specific Modification of the forwarding packet … TOS_CALL_COMMAND(ROUTE_SUB_SEND_MSG) (VAR(route),AM_MSG(DATA_MSG),msg); … } … } Forward message if you have a route. Node has a route

TOS Boot Camp28 AM_ROUTE.c (DATA_MSG) TOS_MsgPtrTOS_MSG_EVENT(DATA_MSG) (TOS_MsgPtr msg){ … if(VAR(route) != 0){ //update the packet. data[5] = data[4]; data[4] = data[3]; data[3] = data[2]; data[2] = data[1]; data[1] = TOS_LOCAL_ADDRESS; … TOS_CALL_COMMAND(ROUTE_SUB_SEND_MSG) (VAR(route),AM_MSG(DATA_MSG),msg); … } … } Modify the forwarding packet to stores the hops taken.

TOS Boot Camp29 Outline Media Access Control Ad Hoc Routing Mechanism Hands on Exercise

TOS Boot Camp30 Hands on Exercise (I) Run the “apps/router.desc” application –Set it to your own LOCAL GROUP in Makefile »Default is 0x13 –Goes to tools directory »Run listen.c

TOS Boot Camp31 Hands on Exercise (II) Modify ROUTE_UPDATE in AM_ROUTE.c GOAL: pick route based on depth of the tree –Pick the route with the smallest number of hops from the base station Can use the same data unit format –data[0] already tells you number of hops from the base station of the sender of the packet –and the corresponding node id = data[(int)data[0]] If a better route (smaller number of hops) is received, use that as the new route. You may need to introduce a new variable (e.g. myLevel) to remember your current depth