Integrated Zephyr Connectivity

Slides:



Advertisements
Similar presentations
Low-Power Interoperability for the IPv6 Internet of Things Presenter - Bob Kinicki Low-Power Interoperability for the IPv6 Internet of Things Adam Dunkels,
Advertisements

Prof. Kristofer S.J. Pister’s team Berkeley Sensor and Actuator Center University of California, Berkeley.
Understanding Internet Protocol
TCP-IP Primer David Cozens. Targets Have a basic understanding of Ethernet network technology Be aware of how this technology is applied on the 5000 series.
Overview: Chapter 7  Sensor node platforms must contend with many issues  Energy consumption  Sensing environment  Networking  Real-time constraints.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: DHCP Routing & Switching.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: DHCP Routing and Switching Essentials.
A Study of Mobile IP Kunal Ganguly Wichita State University CS843 – Distributed Computing.
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
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…
CCNA Guide to Cisco Networking Fundamentals Fourth Edition Chapter 9 Network Services.
The Leader in Embedded Bluetooth Product Development Roadmap Integration of Bluetooth stack.
2011 Embedded Systems Software Training Center BluRapport SDK.
Hacking the Bluetooth Pairing Authentication Process Graduate Operating System Mini Project Siyuan Jiang and Haipeng Cai.
Lesson 3 Introduction to Networking Concepts Lesson 3.
Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall Department of Electrical and Computer Engineering University.
ECE 424 Embedded Systems Design Networking Connectivity Chapter 12 Ning Weng.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: DHCP Routing and Switching Essentials.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: DHCP Routing & Switching.
LWIP TCP/IP Stack 김백규.
LWIP TCP/IP Stack 김백규.
1.4 Open source implement. Open source implement Open vs. Closed Software Architecture in Linux Systems Linux Kernel Clients and Daemon Servers Interface.
Intel Research & Development ETA: Experience with an IA processor as a Packet Processing Engine HP Labs Computer Systems Colloquium August 2003 Greg Regnier.
Christopher Bednarz Justin Jones Prof. Xiang ECE 4986 Fall Department of Electrical and Computer Engineering University.
Integration of Wireless Sensor Networks to the Internet of Things using a 6LoWPAN Gateway Integration of Wireless Sensor Networks to the Internet of Things.
BTstack Youngho Oh. Table of contents  BTstack features  BTstack Architecture  Host Controller Interface(HCI)  Bluetooth Stack  BLE event task 
CHAPTER 10: DHCP Routing & Switching. Objectives 10.0 Introduction 10.1 Dynamic Host Configuration Protocol v Dynamic Host Configuration Protocol.
Mobile Packet Sniffer Ofer Borosh Vadim Lanzman Dr. Chen Avin
Software Architecture of Sensors. Hardware - Sensor Nodes Sensing: sensor --a transducer that converts a physical, chemical, or biological parameter into.
Low-Power Interoperability for the IPv6 Internet of Things Presenter - Bob Kinicki Low-Power Interoperability for the IPv6 Internet of Things Adam Dunkels,
Networking and firewall
Zephyr Project Overview
Wireless Ethernet Programming
Software and Communication Driver, for Multimedia analyzing tools on the CEVA-X Platform. June 2007 Arik Caspi Eyal Gabay.
Enhancements for Voltaire’s InfiniBand simulator
Instructor Materials Chapter 8: DHCP
Chapter 9: Transport Layer
Developing IoT endpoints with mbed Client
A brief introduction to IoT gateway
Exposing Link-Change Events to Applications
Instructor Materials Chapter 9: Transport Layer
IoT Integration Patterns, REST, and CoAP
Multicast Listener Discovery
AppleTalk and Networking
Bluetooth Low Energy Overview.
LWIP TCP/IP Stack 김백규.
IzoT™ Device Stacks March 2014.
Configuring and Troubleshooting Routing and Remote Access
Chapter 10: DHCP Routing & Switching Chapter 10: DHCP
NAT , Device Discovery Chapter 9 , chapter 10.
Chapter 3: Windows7 Part 4.
Extending IP to Low-Power, Wireless Personal Area Networks
Implementing IP Addressing Services
Net 431: ADVANCED COMPUTER NETWORKS
Software Defined Networking (SDN)
QNX Technology Overview
Storage Networking Protocols
HC Hyper-V Module GUI Portal VPS Templates Web Console
Implementing IP Addressing Services
Chapter 11: Network Address Translation for IPv4
Short-Range Radio Frequency Networking
Short-Range Radio Frequency Networking
Carles Gomez, S. M. Darroudi
Mobile IP Outline Homework #4 Solutions Intro to mobile IP Operation
Mobile IP Outline Intro to mobile IP Operation Problems with mobility.
Bing Liu, Yuefeng Wu IETF July 2017
Zephyr 真正的开源软件(Linux Foundation),宽松自由的许可证(Apache 2.0)
The Contiki Operating System Allan Blanchard, INRIA
Mobile IP Outline Intro to mobile IP Operation Problems with mobility.
Presentation transcript:

Integrated Zephyr Connectivity Presentation abstract: Connectivity is the ‘I’ in IOT.     This talk will provide an overview of Zephyr communications enablers, their current state and future plans.   Insight on best practices, development and verification methods will also be given.  

Zephyr Connectivity: Current status CoAP DTLS Bluetooth Smart API UDP Intel® Curie™ Module Bluetooth Driver HCI host stack IPv6 6LoWPAN 3-wire UART HCI driver 5-wire UART HCI driver 802.15.4 MAC (cc2520) 802.3 (Intel® Galileo™ 2 Ethernet transceiver) When we speak about Connectivity for Zephyr, we are talking specifically about  the support for remote communication, both wired and wireless that is built into Zephyr kernel and supplied with the OS. When we started the project, our goal was to add Bluetooth and IEEE 802.15.4 (low rate wireless personal area networks) / 6LoWPAN support . We chosen to implement HCI Bluetooth from scratch. We took 15.4, 6LoWPAN and IP from Contiki After developing Bluetooth APIs we decided to provide implementation for nRF51 controller which is part of Curie We decided to start with nanokernel support so that our stacks can be used in the most resource constrained/nanokernel configurations On the roadmap: Bluetooth Classic HCI stack, key enablers Persistent storage Broader support for Curie IP stack: TCP MAC driver abstraction More MAC drivers 6LoWPAN IPSP router

Buffers in Zephyr Comms Stacks struct net_buf Analogous to Linux kernel sk_buff Static (build-time) allocation Free buffers managed through a FIFO buf = net_buf_get(fifo); Helpers for encoding & decoding Optional protocol specific user-data Reference counting & minimizing data copies Introduction of common design of a protocol buffer was a key change comparing to Contiki stacks. Buffers are the most resource consuming parts of the networking stack . We modelled them after sk_buf of Linux kernel Buffers are directly compatible with Zephyr nano-fifo (have header pre-allocated in structure). Buffer pools are configured at compile-time using macros. Buffers can be of different sizes. In our case, the single structure across all networking stacks allowed us adapting 6LoWPAN for Bluetooth without much trouble In the coming iterations we plan to work more on optimizing buffer usage across the entire system.

6LoWPAN Task FIFO pair IPv6 Fiber FIFO pair Fiber 6LoWPAN - IPv6 over Low power Wireless Personal Area Networks. Defines way of sending IPv6 over 802.15.4 networks and Bluetooth Smart Connection-oriented Channels link-local IPv6 addresses and stateless IPv6 address auto-configuration Neighbor Discovery (RFC 6775) Header Compression IPSP: 6LoWPAN for Bluetooth Adopted late 2014 Requires L2CAP Connection oriented Channels Uses RFC 7668: IPv6 over Bluetooth Low Energy Two roles Node Router Task Application FIFO pair IPv6 6LoWPAN Fiber FIFO pair Bluetooth Smart 802.15.4 MAC Fiber Original 6LoWPAN implementation is from contiki. What we have added: - Provided a possibility to use two bearers (added Bluetooth bearer support) Adapted to our network buffers Fragmentation/reassembly is done only for 15.4; BLE takes care of it iself.

IP stack Rx fiber Global Rx FIFO for receiving Task A Rx fiber Global Rx FIFO for receiving array of network contexts (“sockets”) Look up Tasks’ Rx FIFOs Task read: net_receive() write: net_buf_get(), net_send() Tx fiber Global Tx FIFO for sending Write to “driver’s” Tx FIFO Task B RX FIFO TX FIFO RX fiber TX fiber IP stack Global RX FIFO MAC driver Major changes to the original ConTiki uIP stack Re-entrant. No more global data usage. ( contiki used global buffers) Adapted to net_buffer We have a single TX FIFO and per-application RX FIFO. Allows multiple applications wait for their data

UDP Hello World data[] = “Hello world!”; net_init(); /* Initialize network subsystem */ context = allocate_network_context(); /* Populate data structures */ tx_buffer = ip_buf_get_tx(context, data_length); /* Allocate TX buffer */ memcpy(get_data_pointer(tx_buffer), data, data_length); /* Fill TX buffer */ net_send(tx_buffer); /* Actually send the data */ … rx_buffer = net_receive(context, WAIT_TICKS); /* Wait to get data from net */ if (rx_buffer) { use_data(get_data(rx_buffer)); /* Make some use of the data */ ip_buf_unref(rx_buffer); /* Recycle the buffer */ } A small example of sending udp and waiting for some response

Developing IP Application in QEMU Develop Zephyr IP applications using host network adapter Connect two VMs together Use tunslip tool from ConTiki Trace network traffic IP stack SLIP driver Application Zephyr/QEMU /dev/net/tun0 Linux/Host UART tunslip6 Convenient BKM if you want to check IP-related behavior of your app and can be otherwise made QEMU-compatible Using SLIP driver coming from ConTiki and tunslip6 tool . Can either connect Qemu VM to the external network using tun interface or connect two VMs together Linux side: slip-tun -> tool from contiki creates tun interface and pumps the data across -> we get IPv6 from TUN device. To get IP address SLAAC ( Stateless Autoconfiguration) is used and IPv6 address is generated from MAC address For Linux host we assign ipv6 address manually

Bluetooth Smart HCI Host Stack Bluetooth 4.2 compliant GAP (Generic Access Profile) Peripheral & Central Observer & Broadcaster GATT (Generic Attribute Profile) Server to be a sensor Client to access sensors IPSP for IPv6 over Bluetooth Smart Clean HCI driver abstraction 3-Wire (H:5) & 5-Wire (H:4) drivers available drivers/bluetooth/ for drivers, net/bluetooth/ for stack Verified with multiple popular controllers Supporting both nano- & micro kernels   Highly configurable Features, buffer sizes/counts, etc Bluetooth Smart API HCI Core HCI Driver L2CAP L2CAP CoC ATT SMP IPSP/6LoWPAN GATT GAP In the beginning we analyzed the available options for Bluetooth stack, found none and started from scratch. Minimal footprint is around 30K (with XIP) [ 20 K code + 10 K RAM] . Very much configurable

Configuring Bluetooth Features Select HCI driver Features GAP/GATT roles Security (pairing & signing) Define buffer sizes & counts Number of paired devices Number of connections Enable debug options Every Bluetooth-enabled application starts with configuring relevant features of the Bluetooth stack

Creating Bluetooth Smart Service Initialize the stack bt_init() Register GATT service database bt_gatt_register(array of attributes) Advertise your presence & let others connect bt_le_adv_start(parameters) Notify of value changes bt_gatt_notify(params) Samples found under samples/bluetooth/* One of the important roles we see for our OS/Bluetooth stack is to allow creation of smart bluetooth smart-connected sensors. Hence, this example of the GATT service [ =code running on the sensor] This simple example requires no pairing, just connecting Sample services, we have and/or will be made available are – heart rate -cadence (bicycle) -temperature/environment profile

Developing for Bluetooth in QEMU Develop Zephyr Bluetooth Application using host HCI adapter Trace HCI commands Linux host + qemu BlueZ btproxy tool to forward local (host) adapter to qemu Any type of local adapter supported (transport gets converted to H:4) Linux-side HCI tracing (with btmon or hcidump) Just a matter of “btproxy -u” & “make qemu” HCI Host Stack 5-wire UART HCI driver Application Zephyr/QEMU Host Bluetooth Driver Linux/Host UART btproxy Allows using Zephyr stack with the Bluetooth hardware attached to the external host. Might help to identify and solve problems specific to the Bluetooth adapter without resorting to on-device debugging. All powerful tools of BlueZ can be used, tracing and dumping

Intel® Curie™ Bluetooth Smart Driver Custom RPC protocol exposed by Nordic Semiconductor nRF51822 chip on Arduino 101/Curie ™ Available as a dedicated driver (drivers/nble) that implements the same API (include/bluetooth/*.h) as the HCI based stack Subset of HCI stack features (only Bluetooth 4.0)

Summary Integrated Zephyr connectivity allows to create Bluetooth Smart and 15.4-conncted applications in an open-source way In the coming months, we plan to add TCP, IPv4, Bluetooth BR EDR functionality and number of other enhancements including Smart Mesh support We warmly welcome both users of and contributors to our software!

Find Out More at Embedded World Explore the Booth Attend Booth Sessions Demos showcasing technology, tools and 3rd party integration Speak with Zephyr Project representatives Meet with Linux Foundation to learn more about membership Tuesday, Feb 23 Wednesday, Feb 24 Thursday, Feb 25 10:00am – 10:45am Project Overview 10:30am – 11:45am 9:30am – 10:15am 11:00am – 11:45am Tech Overview 1:30pm – 2:15pm 10:30am – 11:15am 3:00pm – 3:45pm UbiquiOS 2:30pm – 3:15pm 4:00pm – 4:45pm Comms Overview 3:30pm – 4:15pm 5:00pm – 5:45pm Security 4:30pm – 5:15pm 1/12/2019

www.zephyrproject.org