Session overview
● Discussion of basic IoT system architecture
● Overview of Beaglebone Black and Debian
● How to use them for quick prototyping of IoT application
● Demo application
● Considerations when moving beyond prototyping
Goal: Get started quickly
Thank you to our Sponsors
● Kevin Dankwardt and the Silicon Valley Linux Technology meetup group
● Ouster.io
● Red Alert Labs
About me
Drew Moseley
○ 10 years in Embedded Linux/Yocto development.
○ Longer than that in general Embedded Software.
○ Project Lead and Solutions Architect.
drew.moseley@mender.io
https://twitter.com/drewmoseley
https://www.linkedin.com/in/drewmoseley/
https://twitter.com/mender_io
Mender.io
○ Over-the-air updater for Embedded Linux
○ Open source (Apache License, v2)
○ Dual A/B rootfs layout (client)
○ Remote deployment management (server)
○ Under active development
Motivation for this topic
● IoT product growth: $520
billion by 20211
● Product lead time and life
cycle time
● Developers lacking
embedded background
● Maker movement
1
https://www.forbes.com/sites/louiscolumbus/2018/08/16/iot-market-predicted-to-double-by-2021-reaching-520b/
Challenges for Embedded Device Development
Hardware variety
Storage Media
Software may be maintained in forks
Cross development
Initial device provisioning
● “A network of internet-connected objects able to collect and exchange data
using embedded sensors.”1
IoT Definition
1
http://www.businessinsider.com/what-is-the-internet-of-things-definition-2016-8
● A “network of physical devices, vehicles, home appliances and other items
embedded with electronics, software, sensors, actuators, and connectivity
which enables these objects to connect and exchange data.”3
● IEEE (86 page PDF)2
● Key characteristics:
⎻ Connected
⎻ Sensors
⎻ Actuators
⎻ Cloud Infrastructure
2
https://iot.ieee.org/definition.html
3
https://en.wikipedia.org/wiki/Internet_of_things
About Beagleboard
Governed by a “non-profit corporation existing to provide education in and
collaboration around the design and use of open-source software and hardware
in embedded computing”1
● Embedded development boards powerful enough to run full Linux system
● Active developer community
● Multiple form-factors
● Multiple OS providers
● Readily available from many vendors
1
https://beagleboard.org/about
About Beagleboard, cont’d
Onboard peripherals
Expandable using capes:
● Beagleboard.org: 8
● Elinux.org: 10 production/many
“legacy”
Cape Features:
● High power
● Servos/Motors
● Robotics
● Prototyping
1
https://beagleboard.org/about
About Debian
Debian is a free operating system (OS) for your
computer. 1
● Over 51000 packages
● 10 CPU architectures
● Used as the basis for many other distros (eg
Ubuntu)
1
https://www.debian.org/
IoT Demo Architecture
Weather station: sensors and actuators
Note: device and system management is not part of this demo
Beaglebone black
Debian
WiFi/Ethernet
Python
MQTT
Step 1: Host PC Prototyping
Python code running on PC
● Any system capable of running python
○ Linux: likely already installed
○ MacOS: preinstalled(?) or from Homebrew
○ Windows: available from python.org
○ Docker: https://hub.docker.com/_/python
1
See also virtenv (https://virtualenv.pypa.io/en/latest/) for creating isolated Python environments
https://github.com/drewmoseley/iot-mqtt-bbb.git
● Using python Paho MQTT library
○ $ sudo apt install python python-paho-mqtt
○ $ pip install paho-mqtt1
● Using public MQTT broker2
2
Warning; any data shared with this server is publicly available.
Step 2: Beaglebone Black Prototyping
1. Install IOT image1
2. Boot the board
3. Login with ssh (debian:temppwd)
4. Verify/install python and paho-mqtt library
5. Download sample code
6. Run it
1
https://beagleboard.org/latest-images
● Use a private MQTT broker
○ Encrypted transport
● Web management UI
○ Device management
○ Updates
● Automate offline image
generation
Ideas for Next Steps
● Device lifetimes.
● Managed vs unmanaged fleet:
○ Will you have direct control of deployed devices?
● Operating Environment:
○ How hostile is it?
○ How reliable is power and connectivity?
● Can the user modify the software?
● Is there some kind of end-user
interface?
● Bandwidth:
○ Network
○ Cloud compute
Production Considerations
● Developer workflow
○ Offline vs on-target steps
○ Incremental vs full image
○ Application vs System developers
○ “Golden Master” media is a
bottleneck
● Manufacturing
○ First-boot actions slow the line
○ Need mechanism to inject data
(certificates, host names, serial
numbers)
Development Considerations
System Software Options - Linux
● Embedded Linux Options
⎻ Desktop Class Distro
■ Direct Install
■ Packaging scripts
⎻ Embedded Distro Builder
■ Yocto
■ Buildroot
■ OpenWRT
⎻ Hybrid
■ ISAR
■ ELBE
I got this!!
1
https://en.wikipedia.org/wiki/Linux_on_embedded_systems
Other Criteria
● Hardware vendor provided
material
● Training and documentation
● Vendor for support
● Developer experience