Wireless Embedded Systems and
Networking
Foundations of IP-based Ubiquitous Sensor Networks
Advanced Institute of Information Technology
Summer Session for Korean Faculty
June 9-13, 2007
Lecturer: David E. Culler, Professor
Department of Electrical Engineering and Computer Sciences
University of California, Berkeley, USA
www.eecs.berkeley.edu/~culler
(and CTO, Arch Rock Corp.)
Teaching Assistant: Jaein Jeong
Department of Electrical Engineering and Computer Sciences
University of California, Berkeley, USA
http://www.eecs.berkeley.edu/~jaein
Goals
The goal of this course is to introduce faculty who are teaching
embedded or wireless sensor networking to the foundations of the field
and the practical application of the technology.
The course will focus on modern, well-developed systems and
networking software for integrating ubiquitous instrumentation of the
physical world with leading-edge IT capabilities. It will focus
on the use of open standards at several levels,
including the TinyOS 2.0 embedded operating system, IEEE 802.15.4
radio, 6LoWPAN, Internet Protocols, and Web Services. Lectures
will cover the theoretical foundations, key findings, and
state-of-the-art in the primary elements of these embedded, distributed
systems. Laboratory sessions will provide in-depth hands-on
experience in the application of core concepts using the Arch Rock’s
IPv6 wireless sensor network application and development environment
based on TinyOS 2.0.
Prerequisites
Professionals with basic knowledge of networking and operating
systems, with C programming highly recommended and familiarity with
some Web development tools encouraged.
Readings
Original research papers and on-line text books,
including
Programming TinyOS, Phil Levis, will complement lecture materials.
Course Outline
The course consists of three lecture sessions and a lab session on
each day according to the schedule shown below.
All students will be provided with a copy of lecture notes,
readings, and lab materials.
Biography of the Lecturer
David Culler is a Professor of Computer Science at the University of
California, Berkeley and CTO of Arch Rock Corporation. Professor
Culler received his B.A. from U.C. Berkeley in 1980, and M.S. and
Ph.D. from MIT in 1985 and 1989. He has been on the faculty at
Berkeley since 1989, where he holds the Howard Friesen Chair. He is a
member of the National Academy of Engineering, an ACM Fellow, an IEEE
Fellow and was selected in Scientific American's 'Top 50 Researchers'
and in Technology Review's '10 Technologies that Will Change the
World'. He received the NSF Presidential Young Investigators award in
1990 and the NSF Presidential Faculty Fellowship in 1992. He was the
Principal Investigator of the DARPA Network Embedded Systems
Technology project that created the open platform for wireless sensor
networks based on TinyOS, and was the founding Director of Intel
Research, Berkeley. He has done seminal work on networks of small,
embedded wireless devices, planetary-scale internet services, parallel
computer architecture, parallel programming languages, and high
performance communication, and including TinyOS, PlanetLab, Networks
of Workstations (NOW), and Active Messages. He has served on Technical
Advisory Boards for several companies, including Inktomi, ExpertCity
(now CITRIX on-line), and DoCoMo USA. He co-authored the leading
textbook on Parallel Computer Architecture and over 150 research
publications. He serves on numerous program committees, editorial
boards, and government panels.
- Topic 1: Next-Tier of the Internet -
IP-based Wireless Sensor
Networks (WSN)
- Brief history and overview of wireless sensor networks.
Technology Trends. Application classes. Systems gap. Introduce
mote, tinyos, mesh routing, low-power operation, architecture of
typical deployment.
- Critical issues and factors: memory contraints, power,
uncertainty, and loss.
- Ubiqutous sensor networks => IP and Web services
- Relationship to Home automation, Industrial Instrumentation,
Web Integration
- Overview of the course.
- Suggested Readings:
- Useful Resources:
- www.tinyos.net - Open
source hardware, software, tutorials, examples, tools, community
- www.tinyosmall.co.kr
- Several recent books have been published.
- Krishnamachari, “Networking
Wireless Sensors” provides a well-organized synopsis of many of the
research papers.
- Karl & Willig, “Protocols
and Architectures for Wireless Sensor Networks” provides a somewhat
more in-depth treatment, but with less of the algorithmic analysis
- Haenselmann, “Sensor Networks”
available free online
- Pottie & Kaiser,
“Principles of Embedded Networked System Design” brings some excellent
information theory perspective, but is primarily focused on WINS
- Zhao & Guibas, “Wireless
Sensor Networks”.
- Callaway, “Wireless Sensor Networks” - has some useful
coverage of industry developments. Essentially a reprint of his
PhD thesis.
- Topic 2: WSN Technology and Hardware
Architectures
- Mote architecture, Mote geneology
- Microcontrollers, Radios, Flash., IEEE 802.15.4
- Power subsystem., Mechanical design issues.
- Motes in the market.
- Suggested Readings:
- System Architecture Directions for Networked Sensors,
J.
Hill, R. Szewcyk, A. Woo, D. Culler, S. Hollar, K. Pister, ASPLOS
2000. 93-104
(pdf)
- Mica: A
Wireless Platform for Deeply Embedded Networks, Jason
Hill
and David Culler, IEEE Micro., vol 22(6), Nov/Dec 2002, pp 12-24 (pdf).
- Telos:
Enabling Ultra-Low Power Wireless Research, Joseph Polastre,
Robert Szewczyk, David Culler
The Fourth International Conference on Information
Processing in Sensor Networks: Special track on Platform Tools and
Design Methods for Network Embedded Sensors IPSN
2005: 364-369, April 25-27,
2005
- Useful Resources:
- Topic 3: Operating Systems for
Communication-Centric Devices - TinyOS-based IP-WSNs
- TinyOS concepts and Design Issues
- TinyOS 2.0
- Execution model, Concurrency and Storage
- Composition in Systems, Architectural Layers and Modularity
- Network stacks
- IP and Embedded Services
- Suggested Readings:
- TinyOS: An
Operating System for Sensor Networks,
Philip Levis, Sam Madden, David Gay, Joseph Polastre, Robert
Szewczyk, Kamin Whitehouse, Alec Woo, David Gay, Jason Hill, Matt
Welsh, Eric Brewer, and David Culler, Ambient Intelligence.
W. Weber, J. Rabaey, and E. Aarts
(Eds.), Springer-Verlag, 2005
- Flexible
Hardware
Abstraction for Wireless Sensor Networks, Vlado Handziski,
Joseph Polastre,
Jan-Hinrich Hauer,
Cory Sharp,
Adam Wolisz,
David Culler,In Proceedings of
the Second European Workshop on Wireless Sensor Networks (EWSN '05),
January 31-February 2, 2005..
- Resources:
- Lab part 1: First
Table-top IP/WSN
- Form six groups of five people each. Each group will have
a dedicated wireless sensor network with a gateway server and a
collection of Arch Rock Primer Pack nodes and kmotes.
- Build a table top network. Open a browser and connect to
the group server. Using the deployment page, pick a name for the
deployment and select a 802.15.4 channel. Select a security
passphrase. Place the server on the map. Program the bridge
node. Remove the bridge node. Program each of the motes.
Replace the bridge node. On the nodes page, discover the nodes.
Register all the nodes. Place each node on the map. Ping
each node and see it flash the blue LED. Push ident and see it
flash on the screen. Identify which node is which by
EUID64. See that they have a short address, an IPv6 address, and
an IPv4 address.
- Do some table top sensing: Using the sensor and actuators
page. Enable all internal sensors. Set the sample rate to 2
secs. Go to the sensor data page. Set the refresh.
Cover nodes. Blow on them. Put them in warm places.
- Click on the name of a node and open up the node web page
view. See the graphs of the data over time.
- Pick a node. Set thresholds. Adjust the sample
rate. Configure it to send email on alarm.
- Adjust the heartbeat to 30 secs. Turn off a node.
See it go red. Try to ping it. Look at the data.
- Get is EUID and use the REST URL to retreive various data on
demand.
- Notice that we are running the network about 100x what it would
normally be. How fast a change is missed?
- Quick little sheet to fill out for this portion.
- Lab part 2: Build a self-organized
mesh over a physical extent.
- Discuss as a group where to place your nodes in the lab and in
its vicinity. Identify interesting places to sense. In
addition to the environmental sensors, you can imagine adding
open/close sensors, tilt, or other inputs. Draw a rough sketch of
the floorplan of the space that you will cover and indicate where you
will place the nodes. Use all but one of the nodes, so we one set
aside for later. Discuss what you will be able to observe
through the sensors. Discuss what you think the wireless
connectivity will be among the nodes. Discuss how you think
information will get routed to the server.
- Upload your sketch, either by scanning it in or by rendering it
in powerpoint or your favorite drawing program to create a jpeg.
- Select nodes to place at the intended spots in your lab
space. For each one, name it in your network. Place it at
the point of interest. Place its representative at the
corresponding point on your map. Continue to use an accelerated
rate. Maybe 5 s is enough.
- Observe whether all the nodes are part of the mesh. Are
any missing?
- Study the connectivity by going to the connectivity page.
Study the map view. What is routing through which. Go to
the list view. See the RSSI and link quality.
- Run a site survey from each of the nodes.
- Discuss how the connectivity compares to your expectations.
- Discuss how the mesh routing to the server compares to your
expectations.
- Network too sparse => add a node to fill it in.
- Network too shallow => extend with a node farther out.
- Use the reliability page. Reset the reliability
statistics. Let it go for a bit.
- Move nodes around, move them on the map. See how the
connectivity remains.
- Try to obstruct it and see how the routing changes.
- Go to the energy page and see the duty cycle. Adjust the
sample rate to something more typical, more typical, say 300s.
- Lab wrap up.
- Place nodes where they can run over night. Verify that the
network is robust. Turn on data warehouse. Reset
stats. Let them run till tomorrow.
- Topic 1 - TinyOS 2.0 and
Application Services
- Tasks, Components, Commands and Events
- Interfaces, Provides and Uses
- Component: Modules and Configuration
- Split-Phase Operation
- Parameterized Interfaces
- Generic Modules
- Generic Configurations
- HPL / HAL / HIL
- Application Services
- Suggested Readings:
- Flexible
Hardware
Abstraction for Wireless Sensor Networks, Vlado Handziski,
Joseph Polastre,
Jan-Hinrich Hauer,
Cory Sharp,
Adam Wolisz,
David Culler,In Proceedings of
the Second European Workshop on Wireless Sensor Networks (EWSN '05),
January 31-February 2, 2005.
-
The
Emergence of Networking Abstractions and Techniques in TinyOS
Philip Levis, Sam Madden, David Gay, Joseph Polastre, Robert
Szewczyk, Alec Woo, Eric Brewer, and David Culler, First Symposium on
Network Systems Design and Implementation, NSDI
2004: 1-14,
Mar. 2004
- Additional Resources:
- http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/
- Topic 2 - Robust Embedded
Networking - "Achieving a Good Hop"
- Topology Discovery, Topology Management, Route formation, and
Forwarding
- Communication patterns: dissemination, collection,
neighborhood, point-to-point
- Charateristics of a Link
- Signal, Noise, Range, RSSI, Link estimation, Sensitivity,
Tranmission power
- Modulation, coding
- Forms of Divsersity: retranmission, receiver diversity, path
diversity
- Media Access Control, Contention, CCA
- Clustering and its limitations
- Readings:
- Taming
the
Challenges of Reliable Multihop Routing in Sensor
Networks,
Alec Woo and David Culler, ACM SenSys Nov. 2003. [ pdf ]
- Marco Zuniga, Bhaskar
Krishnamachari, "Analyzing
the Transitional Region in Low Power Wireless Links", IEEE SECON
2004. [ pdf ]
- Understanding the causes of packet delivery success
and failure in dense wireless sensor networks, Kannan
Srinivasan, Prabal Dutta, Arsalan Tavakoli, and Philip Levis [ pdf
]
- Useful resources
- TI CC2420 Product description -
http://focus.ti.com/lit/ds/symlink/cc2420.pdf
- Radio Channel Quality in Industrustrial Wireless
Environments, Dan Sexton, et. al SICON'05 [ pdf ]
- Ni, S.Y., Tseng, Y.C., Chen,
Y.S., Sheu, J.P.: The
broadcast storm problem in a mobile ad hoc network.
In: Proceedings of the Fifth Annual ACM/IEEE International Conference
on Mobile Computing and Networking (MobiCom'99). (1999) 152--162.
- Topic 3 - Embedded
Web Services and Industrial Standards
- HTML, XML, WSDL
- Communication, Object & Data Representation,
Application Profiles
- HART, BACNet, LONworks, CIP, Zigbee, IEEE 1451,
ODSL
- REST, SOAP
- Suggested readings:
- additional resources::
- TinyDB - http://telegraph.cs.berkeley.edu/tinydb/
- http://www.ibm.com/developerworks/library/w-ovr/
- http://www.hartcomm2.org/hart_protocol/protocol/hart_data.html
- http://www.hartcomm.org/hart_protocol/applications/white_papers/compnet.html
- http://www.bacnet.org/Tutorial/
- Common Industrial Protocol -
http://www.odva.org/default.aspx?tabid=205
- Lab Part 1 - add your own sensors.
- Study the resistance of the mag reed sensor open and
closed. Discuss pull up, expected voltage and current.
- Connect to expansion port.
- Configure the switch port. Name the states.
- Discuss interupt versus sampling.
- Set the alarms. (Can this go anywhere?)
- Study the resistance of the RTD in ice water versus room
temperature versus tea.
- Discuss voltage divider, reference voltage. Mapping
readings to engineering units.
- Attach RTD to ADC port.
- Configure ADC port, resistor, reference.
- Conduct same measurements, Compare results to
expectations.
- Pull data into excel and do the conversions.
- Having some fun utilizing multiple sensor modes.
- Lab Part 2 - Custom IP/USN application via web services
- walk through PHP web services tutorial
- compare REST and SOAP.
- Get to sensor service
- Do the conversion to physical units.
- Maybe extend with some calibration.
- Lab Part 3 - Custom analysis of the networking
- Go through how to pull mgmt data out and how to perform survey
- Put the nodes on a circle and draw the connectivity on the
chords.
- Maybe do some tracking the tree over time.
- Database access.
- Correlation between environmental conditions and network
changes.
- Topic 1 - Self-Organized
Multihop Routing
- Route-free
communication
- Dissemination, Flooding, Trickle.
- Tree-reversal and associated issues
- assymetry, filtering, storage, cachning
- Comparison with established routing
protocols
- Distance-vector vs link state, RIP,
OSPF, OLSR, MANET, ...
- Suggested reading:
- Taming
the
Challenges of Reliable Multihop Routing in Sensor
Networks,
Alec Woo and David Culler, ACM SenSys Nov. 2003. [ pdf ]
- P. Levis, N. Patel, D.
Culler, and S.
Shenker. Trickle: A Self-Regulating Algorithm for Code Propagation and
Maintenance in Wireless Sensor Networks. In First Symposium on Network
Systems Design and Implementation (NSDI), Mar. 2004.
- The
Dynamic Behavior of a Data Dissemination Protocol for Network
Programming at Scale
Jonathan W. Hui and David Culler. The 2nd ACM Conference on
Embedded Networked Sensor Systems (SenSys'04), November 3-5, 2004.
- Additional Resources:
- Krishnamachari, “Networking
Wireless Sensors”, Chapter 8.
- Ni, S.Y., Tseng, Y.C., Chen,
Y.S., Sheu, J.P.: The
broadcast storm problem in a mobile ad hoc network.
In: Proceedings of the Fifth Annual ACM/IEEE International Conference
on Mobile Computing and Networking (MobiCom'99). (1999) 152--162
- Deepak
Ganesan, Bhaskar Krishnamachari, Alec Woo, David Culler, Deborah Estrin
and Stephen Wicker, Complex
Behavior at Scale: An Experimental Study of Low-Power Wireless Sensor
Networks , UCLA Computer Science Technical Report
UCLA/CSD-TR 02-0013. ( An older
version of the report can be found
here .)
- W. Heinzelman, J. Kulik, and H. Balakrishnan,
``Adaptive Protocols for Information Dissemination in Wireless Sensor
Networks,'' Proc. 5th ACM/IEEE Mobicom Conference (MobiCom
'99),
Seattle, WA, August, 1999.
- Topic 2 - Achieving Low-Power
Wireless Communication
- Where the energy
goes
- The Idle listening problem
- Scheduling vs. sampling
- Low Power Listening and its Extensions
- TDMA, FPS, TSMP
- Classic debates
- MAC vs Media Management
- Suggested Reading
- V. Bharghavan and
A.
Demers and
S. Shenker and L. Zhang, "MACAW:
Media Access Protocol for Wireless
LANs",
Proceedings of the ACM SIGCOMM Conference, 1994.
http://citeseer.nj.nec.com/bharghavan94macaw.html
- An
Energy-Efficient MAC Protocol for Wireless Sensor Networks
Wei Ye,
John Heidemann and Deborah Estrin
In Proceedings of the 21st International
Annual Joint Conference of the IEEE Computer and Communications
Societies (INFOCOM 2002), New York, NY, USA, June, 2002. (Phil Levis)
- Alec
Woo and David E. Culler,A
transmission control scheme for media access in sensor networks, The
seventh annual international conference on Mobile computing and
networking
2001 July
16 - 21, 2001, Rome Italy. Pages 221-235
- Topic 3 - 6LoWPAN and IP
Concepts
- IP over 802.15.4
- Trade-offs, issues, and advantages
- Cross-layer header compression
- Stacked Header Concept
- Layering
- Analysis and Comparisons
- v4 vs v6
- Relationship to other IETF activities
- Suggested Reading
- Additional Resources:
- Lab 3 Part 1 - IP-based WSN
- Connection between WSN and LAN is a LoWPAN router, not a
server or gateway
- Understanding IP. Get client IP address and IPv6 address.
Subnets, prefix, interface identifier. Ping LAN clients and
router LAN interface. Ping6.
- Set up route for LoWPAN subnet via LoWPAN router (route, netsh)
- Ping. Router LoWPAN interface. Ping/Ping6 LoWPAN
nodes. Ping/Ping6 multihop nodes.
- ICMP, TCP, UDP ports and services
- nc / telnet to standard ports - UDP/7 echo, TCP/7 echo,
TCP/11 systat, TCP/15 netstat
- nc / telnet to WSN ports - TCP/30 raw sensor reading, UDP/10
LED server
- command line application specific processing using standard
tools - stream readings to a file, etc.
- Java/PHP/C client side programming. Addresses, ports,
transport, buffers.
- Well-known multicast address (All-nodes link local, all-nodes
site-local)
- Wireshark to watch traffic on the network.
- Time permitting start on Embedded Programming
- Topic 1 - Deep Dive into System
Resources and TinyOS 2.0 implementation
- Tour of the subsystems: Timers, ADC, Busses (UART, I2C, SPI,
OneWire), Arbiters, Radios, Flash
- System service Abstractions
- TEPs
- Illustration of design trade-offs
- Suggested Readings
- Additional Resources
- Topic 2 - Time-Synchronization and
Embedded Distributed Systems
- Time-stamp exchange protocol
- Sources of error
- NTP - defensive distributed system design
- Impact of the broadcast medium
- System opportunities: post-arbitration timestamping
- FTSP and its contemporaries
- Suggested Readings
- Additional Resources
- Topic 3 - In-networking Processing
and Sensor Data Analysis
- Signals perspective on physical phenomena
- Climate example
- Structural vibration example
- CENS
- Readings: TBD
- Lab 4 - TinyOS Programming on an Embedded
Network Kernel
-
Interfaces
|
TinyOS Concept
|
TEP
|
Start
|
Produce
|
tools / configs
|
LED, Notify
|
module, configuration,
command, event
|
|
Push
|
Toggle
|
make, deluge
|
sprintf
|
network debugging
|
|
|
|
|
Timer
|
generics, virtualized
services
|
|
Blink
|
Count
|
max timers
|
Read
|
sensing, split-phase,
parameterized
|
|
single
|
dual
|
peripherals
|
Task
|
post, task
|
|
raw
|
smooth
|
max task
|
send UDP, ipv6
|
buffer, memory
|
|
counts
|
readings
|
|
receive UDP
|
dispatch
|
|
echo
|
rate control
|
ports
|
UDP linklocal bcast
|
peer-to-peer
|
|
|
remote LED
|
|
Local Time
|
|
|
flash
|
ring
|
|
|
|
|
|
|
|
options
|
cmds, timesych, route,
reliability, DTN
|
|
|
|
|
- Topic 1 - Energy, Power, and
Sustainable Operation
- Storage devices: batteries, caps,
supercaps, fuel cells
- Energy sources: solar, vibration,
electricity
- Systems solutions
- Suggested Readings
- Prabal Dutta,
David E. Culler: System
software techniques for low-power operation in wireless sensor networks.
ICCAD
2005: 925-932.
- Topic 2 - Security and
Reliability
- Shared key and public key
encryption
on embedded devices
- AES128 and 802.15.4
- Research results and open problems
- Suggested Readings
- Security Considerations for IEEE
802.15.4 Networks, Naveen Sastry and David Wagner. ACM WiSe 2004,
October 1, 2004. [ pdf ]
- Additional Resources
- TinySec: A Link Layer Security
Architecture for Wireless Sensor Networks, Chris Karlof, Naveen Sastry,
and David Wagner. ACM SenSys 2004, November 3-5, 2004. [pdf]
- Sizzle:
A Standards-based end-to-end Security Architecture for the
Embedded Internet, Pervasive and Mobile Computing Journal
(special
issue on selected papers from PerCom 2005), Vol 1, Issue
4, Dec 2005, pp. 425-445.
- A. Perrig, J. Stankovic, and D.
Wagner,
Security in Wireless Sensor Networks, CACM, Vol. 47, No. 6, June
2004.
- SPINS:
Security Protocols for Sensor Networks,
A. Perrig, R. Szewczyk, V. Wen, D. Culler, and J.D. Tygar,
Mobile Computing and Networking, Rome, Italy, 2001
- Topic 3 - Future Developments
- deeply integrated devices
- mobility
- classification, search, ...
- Open Discussion
- Lab 5
- Completion of Embedded Programming,
Team Extensions
Materials
- 6 kits: each
gateway server, 2 PP nodes, 4 kmotes, 2 mag reed, 1 RTD, multimeter,
thermometer, (other)
- client
desktops: apache, PHP, browser, network to all the servers, editor,
office
tools (at least some spreadsheet, power point), NC, cygwin
telnet. GCC.