200 likes | 365 Views
NanoIP over Sensors Designing TCP/IP for WSNs. Andrea Carradore Anna Crema. NanoIP over Sensors. Outline: Introduction Scenario Goals Architecture : NanoIP stack: general view NanoIP layer NanoTCP layer. Conclusions. NanoIP over Sensors.
E N D
NanoIP over Sensors Designing TCP/IP for WSNs Andrea Carradore Anna Crema
NanoIP over Sensors • Outline: • Introduction • Scenario • Goals • Architecture : • NanoIP stack: general view • NanoIP layer • NanoTCP layer • Conclusions
NanoIP over Sensors Introduction: • Sensors are tiny smart devices which may be interconnected to form a highly dense ad-hoc network, called Wireless Sensor Network (WSN). • Their role is important in observing and interacting with real time phenomena, but they have a lot of limitations. They have: • very low power and memories (RAM/ROM sizes); • to remain self-standing for very long time; • to be able to organize themselves into a network without any human help. • The widely deployed environment to work on, operating on WSN, is TinyOS, an operating system appositely created for them.
TCP WSN SN IPv6 MACPHY MACPHY Gateway NanoIP over Sensors Why does it make sense to make a TCP/IP stack for WSNs? • The scenario we have in mind is when the WSN has to be connected to a Mesh backbone connected to the internet, where normal TCP/IP is the standard of communication: Internet nanoTCP nanoIP Mesh Backbone WiFi Hotspot
NanoIP over Sensors Why can’t we use Vanilla TCP/IP in WSNs? It is too complex and big for sensors. • Goals: • Develop a sensor adapted version of TCP/IP. • It has to run on TinyOS. • The implementation must be light
NanoIP Stack Application Layer NanoTCP Layer NanoIP Layer Lower Layers
NanoIP Layer: Header IP The problem is that we cannot apply the whole IPv6 header in WSNs, because it’s too expensive in terms of bytes, then in terms of energy consumption. That’s why we make a compression of it to obtain the NanoIP header. MAC ADDRESS SUBNET PREFIX
MultiHop Application nanoTCP/IP SendMsg Multihop ReceiveMsg SendMsg QueuedSend SendMsg GenericComm
NanoIP Design (in a subnet) TCP_Queue • The packet is extracted from a queue Command extractQueue() 2. A NanoIP header is added Main Header Adding Module Processing 3. The new packet is sent to the lower-layer queue Command sendpacket() Lower Layer Queue
Multihop & Routing • Multihop works inside a subnet. • NanoIP-Routing works between subnets. EACH HC HAS A ROUTING TABLE Subnet 2 Subnet 1 Subnet 3 HC HC HC Multihop NanoIP-Routing HC = Head Cluster of each subnet HC Subnet 4
NanoIP Choices In a simple node (in a subnet) we can divide nanoIP flows (between up-to-down and down-to-up), because there are different processes that do different jobs. In this way the NanoIP module can be divided in two “sub-processes”, each of them will do his own work. NanoIP up-down process NanoIP down-up process NanoIP process
SourcePort=23; DestPort=23; State=xxx; Data= SequenceN=1200 N° max connections=3; Window Size=Fixed NanoTCP Design Example: Client Application Queues Processing command extractQueue() Main ACK SYN CONNECTIONESTABLISHED Output Process Input Process SYN+ACK NanoIP Queues
NanoTCP Choices • Since: • NanoTCP-Client Finite State Machine (FSM) has 6 states: CLOSED, SYN-SENT, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, TIME-WAIT, and • NanoTCP-Server FSM has 6 states too: CLOSED, LISTEN, SYN-RCVD, ESTABLISHED, CLOSE-WAIT, and LAST-ACK • Then: • We can divide nanoTCP process into 2 sub-processes, a client and a server. In this way we want both of them to have a simpler implementation, since they take care only of one functionality.
Overview to the complete stack Application Layer TCP Client/Server NanoIP up-stream/down-stream MultiHop MAC CC2420 / PHY
Conclusion • Motivation: in particular cases a WSN needs internet-like connectivity capabilities to communicate with the external world. • Idea: develop a “nano” TCP/IP stack over TinyOS. • It’s composed essentially by two big configurations, named nanoIP and nanoTCP respectively. • These are tiny versions of normal TCP and IP protocols, due to sensors’ restrictions in terms of power and memory.
Thank you all for the attention Q & A Andrea Carradore acar@mega.ist.utl.pt Anna Crema acrem@mega.ist.utl.pt