6. IoT Platform
• Using AWS IoT, to easily build a server-less system
AWS IoT
Amazon
Machine
Learning
Amazon
DynamoDB
Amazon
lambda
7. MQTT
• Use MQTT for IoT Platform
Publiser
Publiser
Publiser
Broker
Subscriber
Subscriber
Publish messages on topics
layers
Read messages from
subscribed topics
Propagate messages
8. eclipse paho(Open Source MQTT Client)
• The Eclipse Paho project provides an open-source
implementation of MQTT messaging protocol.
• https://eclipse.org/paho/
• https://eclipse.org/paho/clients/c/
9. Two proposals for Architecture
(Linux Boards only)
1. Create a new MQTT thread in ArduPilot task.
2. Create a new MQTT task apart from ArduPilot task.
10. Architecture(Linux Boards) 1
• Use WiFi or LTE(SORACOM etc..) for internet connection
Linux Flight Controller(navio2)
.
.
DroneKit
MAVProxy
ArduPilot
MQTT
AWS IoT
LTE/3G
11. Architecture(Linux Boards) 1
Linux
ArduPilot
Main Loop(ArduCopter.cpp)
HAL specific threads
UART thread
Timer thread
IO thread
Hardware Abstraction Layer(HAL)
SD Card
Platform specific threads and
tasks
idle
init
.
.
Driver specific threads
ToneAlarm thread
RCin thread
MQTT thread
12. Architecture(Linux Boards) 1
How to get logs on the MQTT side
• Use the new ring buffer for MQTT.
• When writing a Dataflash , push it into the ring buffer.
• MQTT thread pops data from the buffer and publish it.
Other Thread Ring Buffer MQTT Thread
Push
PoP Publish
to The Internet
13. Architecture(Linux Boards) 2
• Use WiFi or LTE(SORACOM etc..) for internet connection
Linux Flight Controller(navio2)
.
.
DroneKit
MAVProxy
ArduPilot
MQTT
AWS IoT
LTE/3G
14. Architecture(Linux Boards) 2
Linux
ArduPilot
Main Loop(ArduCopter.cpp)
HAL specific threads
UART thread
Timer thread
IO thread
Hardware Abstraction Layer(HAL)
SD Card
Platform specific threads and
tasks
idle
init
.
.
Driver specific threads
ToneAlarm thread
RCin thread MQTT
.
.
15. Architecture(Linux Boards) 2
How to get logs on the MQTT side
• Use POSIX Message queue for inter-process communication.
ArduPilot Task Message Queue MQTT Task
Send
Receive Publish
to The Internet