1. Building a Network of Things
Chapter 1 - Dragino router
Arduino Mini-Conference
Monday, 24th January 2011
Andy Gelme - @geekscape
andyg@geekscape.org
Linux Conference Australia 2011
2. Network of Things: Design
Choices ...
Design principles ?
Resilient, adaptable, inexpensive, scalable
Open, platform neutral, event-based
Consistent from small devices to large servers
Hardware
Software
3. Network of Things: Conceptual
WAN Backend server Backend server
LAN Router Server Router
PAN
Device Device Device Device Device Device
Device Device Device Device Device Device
4. Network of Things: Hardware
Choices ...
Design principles
Hardware: Router ?
Low power usage, no moving parts, inexpensive
Range of networking options
Hackable !
Software
5. Router: Conceptual
3G
Wi-Fi Ethernet
Router Server
ZigBee Serial Others ?
Device Device Device Device Device
Desired networking options
6. Network of Things: Router
Hardware: Router
Common Off The Shelf (COTS)
Cheap: Astonishing what you get for AUS$50
Comms: 4 + 1 Ethernet ports, Wi-Fi, serial console
USB ports: expansion ... disk, printer, 3G
OpenWRT (Linux distribution): Many packages
Highly hackable :)
8. Router hardware design
3G USB disk
Router
Ethernet USB printer
Motherboard
Wi-Fi
LCD screen
Arduino Touch panel (Nintendo DS)
Sensors
ZigBee
Other devices
9. Network of Things: Software
Choices ...
Design principles
Hardware
Software: Language choices ?
Back-end servers: Java, Ruby and so on
Routers: Hmmm !
Devices: Typically C, C++
10. Router: Software
ASUS Hardware: CPU 240 MHz, Flash 8Mb, RAM 32Mb
Software: Linux (OpenWRT), routing, firewall, web server
Development language choices ?
Java and Ruby ...
Too heavy-weight, tricky installation
Host-based development (slow)
Popular, useful libraries: often not ported
11. Router: Programming language
Weapon of choice ... Lua (http://lua.org)
Quite popular, e.g embedded in World Of Warcraft !
Already installed ...
OpenWRT web-server (Luci) written in Lua
Scriptable ... develop, test, diagnose on the router
Reasonably good for networking
Lots of useful libraries
12. Router: COTS not perfect
So, what’s wrong with the ASUS or other vendor’s router ?
Vendors eventually stop making them :(
14. LCA2010 ... Dragino
First Arduino Mini-conference ... good times !
Brought along the afore mentioned ASUS WL-500gP V2
Bumped into David Rowe (Village Telco, Mesh Potato)
David mentioned “OpenWRT router with Arduino” to Edwin
Bart Van Der Meerssche (Fluksometer), David and Edwin
design the Dragino
The story in more detail ... http://www.dragino.com/?p=11
15. Dragino router overview
Open-source (Creative Commons) hardware router
Currently, in beta testing
Designed specifically for developers
CPU Atheros AR2317 180 MHz, Flash 8 Mb, RAM 16 Mb
Ethernet port, Wi-Fi
On-board headers for attaching MCU daughter-board
18. Dragino router detail
Edge connector: 12 x GPIO for directly connected sensors
MCU connector 1: 2 x 7: Same as edge connector plus ground
MCU connector 2: 2 x 8 ...
5V, 3.3V, ground, power adaptor direct connection
4 x AR2317 GPIO (0, 1, 2, 3), AR2317 reset
AR2317 UART
LED on main motherboard