ARM Cortex-M Internet of Things (IoT) Programming
Duration: 5 Days
Course Background
At the heart of the Internet of Things are many small embedded systems and devices connected together via some kind of networking technology, often wireless based. There is much debate as to the role 8 bit microcontroller based systems have in this technical ecosystem, and of course this includes microcontrollers built around the ARM Cortex-M core processor architecture. The key problem is the networking software and how it can be used to co-ordinate all the various IoT nodes belonging to the network. As this is a practical course the "wonderful business opportunities and strategies for becoming a dominant investor or technology provider" will only be reviewed briefly. This is very much a "get your hands working building applications" kind of course. Instead of exploring a wide range of technologies the course will focus on installing and working with 6loWPAN, using Contiki as the operating system and framework for this purpose.
Course Prerequisites and Target Audience
A good knowledge of embedded systems C programming is assumed. Detailed knowledge of wireless technology and associated protocols is not required as this will be covered in depth during the course. A knowledge of the ARM Cortex-M architecture and instruction set would also be helpful.
Course Overview
The course will survey the essential concepts and rationale behind the Internet of Things (IoT) and the role that 8 bit microcontroller devices can play in IoT applications. This will be followed by an overview of AdHoc networking frameworks and technologies such as TinyOS and 6loWPAN. The course will then focus on developing applications using Contiki runnning on ARM Cortex-M based platforms with Microchip wireless devices. The C compiler used on this course will be the either a Keil or IAR compiler. Practical work will also include protocol analysis and troubleshooting using TI's SmartRF Packet Sniffer and connecting 6-lowPAN clouds via edge routers to the Internet and also to Cloud Computing systems. The networking part of the course will cover the IPv6 protocol as well as the subset of IPv6 that constitutes 6-lowPAN. It will also cover important topics such as mixed IPv4 and IPv6 networking as it applies to the IoT.
Course Benefits
The course provides a thorough understanding of IoT concepts and underlying wireless networking technologies. On completion of the course attendees should have a good working knowledge of 6-loWPAN and how to develop Contiki based 6-lowPAN applications. They will also have a sound understanding of IPv6 and IPv4 and how they interwork with 6-lowPAN and will have implemented and tested out a number of IoT 6-lowPAN based applications. In addition they will know how to compile Contiki from source and of the constraints involved in deploying Contiki 6-loWPAN based applications on small memory devices.
Course Outline
- Introduction to the Internet of Things
- Early days - James Gosling and the Oak project at Sun
- Smart sensors, Motes and AdHoc Networks
- Wireless Networking - ISM bands - Sub 1GHz, 2.4 Ghz and 5.9 GHz
- WLAN and WPAN networks
- Overview of Bluetooth, Zigbee, Z-Wave and WiFi
- The need for low cost low energy devices
- 8 bit devices vs. 32 bit devices
- IoT - smart homes, smart building, smart cities and all that
- Bubbles and Technology Hype Cycles
- Big data aspects of the IoT
- Computer Networks and Network Protocols
- Overview of the ISO-OSI 7 layer model
- Layers 1 and 2 - Ethernet and Wireless Networks
- Network topologies - logical and physical
- Mesh, Star and Bus topologies
- Mesh networks and AdHoc networks
- Layer 3 - IPv4 and IPv6
- Layer 4 - TCP and UDP
- Network programming and the Socket API
- Network security - concepts, mechanisms, protocols and standards
- Network Privacy
- Low power devices and low power networks
- Low power processor architectures
- Implementing code so as to conserve power
- 6 LoWPAN - IEEE 802.15.4 and IP over 802.15.4 ยง
- Fragmentation
- Link Layer Mesh Routing under an IP Topology
- IP Routing over a mesh of 802.15.4 Nodes
- The 802.15.4 Frame Format
- IETF 6LoWPAN Header Format
- 6LowPAN IPv6 Header
- IPv6 Header Compression
- Compressed UDP and ICMP
- 6LoWPAN and Zigbee compared
- 6 LoWPAN Compressed TCP
- LoWPAN mesh header
- IP based multi-hop routing
- Energy usage aspects of 6LoWPAN
- Wireless Sensor Node Programming
- Target Machine Code API Programming Model vs. Operating System Model
- Embedded Operating System Model
- Contiki as an OS for sensor nodes
- Contiki Architecture
- Event Driven Kernel
- Size Minimised Network Communication Stack
- Dynamically loadable services and applications
- Efficient protothread based multi-tasking and interprocess communication
- Installing a Contiki Development Environment for ARM Cortex-M
- Cross Compiling Contiki from Source for the ARM Cortex-M
- Installing Contiki on target ARM Cortex-M devices
- Programming, Compiling and Running Embedded Systems Application on Contiki
- Timers, interrupts and flashing LEDs
- Analog to Digital Conversion and working with analog inputs and analog sensor devices
- Understanding I2C and SPI and working with I2C and SPI based sensors
- Terminal output over RS232
- Configuring IPv6 and implementing UDP based applications
- Memory management
- Multi-threading using Protothreads
- 6-LoWPAN Networking
- Building a 6LoWPAN Edge Router Using an embedded Linux platform such as BeagleBone Black or RaspberryPi
- Analysing 6LowPAN traffic traces with Wireshark
- Improving network stability with redundant edge routers
- Data acquisition and analysis
- Relational databases and SQL - an overview
- Streaming data to a Relational Database (MySQL / PostgreSQL) running on a Linux or Windows Platform
- Analysing and Visualising Sensor Data Using R - an overview
- 6 LoWPAN collaboration with the Cloud - Scenario and Use Case Analysis