IoT : The Alarm Clock
2
Adrien Leravat
Presentation
Witekio
• Germany, France, US, Taiwan
• System / ecosystem
• BSP & drivers, embedded & mobile software
3
Internet of What ?
• Attributes
– Devices, Communicating.
– Acquire data, can grow, intelligent
• Vague but powerful
– Car, home, town
• New challenges
– Networks, Energy consumption, Security
4
Key points
Your own components
• This is about
– Highlighting IoT important keys
– Qt in the picture
• IoT devices
• Security
• Into the clouds
• Let there be light !
IoTdevices
Embedded Qt
6
Embedded
• Our Alarm-clock
– NXP i.MX6 DualLite
– Linux 3.10, Yocto 1.5
• Connectivity is key
• Medium / Long range
– Networks, Energy consumption, Security
• Short range
– BT, BTLE, NFC, RFID
• Even ‘’Cables’’!
7
IoT Sytem Topology
Sensors
- No CPU
- Acquire data
Devices
- ARM
- Screen
- Qt
iMX6
Gateway/Broker
- ARM/x86
- Screen
- Qt
Cloud
- x86/64
- Qt
  Size of Qt
8
Qt’s role
• For graphical applications
– Qt Quick / Widgets
– Depends on GPU, RAM and GUI’s complexity
• For non-graphical applications
– Leverage Qt classes (Networking, Files, DB, …)
– Sharing code, good performances
– Consider alternatives for heavy duty remote
services
Polishing with effectsSecurity
Keep it safe
10
Security
• No one is ‘’safe’’
– Growing number of connected devices, means more
opportunities for hackers
– Shodan: IoT device search engine
11
Security
• System
– Keep it up to date (packages)
– Remove development and unused services
– Firewall
– Security enhancements
– Seal the box
12
Security
• Encrypt communications
– QSslSocket: TCP socket with SSL/TLS (requires
OpenSSH)
– Manually:
• Simplecrypt (Qt), OpenSSH, Crypto++
• Check input data
– Avoid strings when possible
– QString::toHtmlEscaped/replace, QRegExp
– QSqlQuery::bindValue
Make them talk
Into the clouds
14
Example use cases
• Save user alarms and settings
• Set alarms from Smartphone
• News and weather
• Intelligent wake up
– Depending on traffic, weather
15
Cloud services
• Cloud services / dedicated server
– Storage
• User settings, alarms
– Computing
• Traffic and weather, analysis
• Interface
– HTTP + JSON/XLM
• Very easy for Web applications
– Authentication
16
Cloud services
Third party service
– Weather, news
Our server
– User preferences, Alarms
– Qt Cloud Services,
Amazon, etc
• QNetworkAccessManager
– HTTP Get/Post/Put
– QNAM::get(QNetworkRequest(QUrl(“http://myserver.com”);
– QJsonDocument, QDomDocument (XML)
1
2
1
2
17
Cloud services
Sorry I lied…
Gateway device / server
– To third-party services
– Access control
– Formatting
– Caching
2
2
18
Context
Qt Approved
Let there be light!
…but thanks to Qt
20
Adding a light
• Light
– Wifi connected
– Brightness, color
– QUdpSocket on a fixed IP address
– Power on when an alarm rings
21
Notifications
• Remote alarm
– Server has something to say ! “Push notification”
– Device listens on a specific TCP port
– Only accepts connections from server, QHostInfo
QTcpServer server;
server.listen(host, port);
22
IoT Flexibility
?
Sensors Devices Gateway Cloud
• What if more ? New devices ?
– Like a Coffee machine
– … need for flexibility
– Broadcast yourself
23
IoT Flexibility
?
Sensors Clients Broker Client(s)
• What if more ? New devices ?
– Centralizes information
– Clients publish events (temp., lights on, etc.)
– Clients subscribe to events
– MQTT (qmqtt, mosquitto), AMQP, XMPP …

Witekio IoT presentation

  • 1.
    IoT : TheAlarm Clock
  • 2.
    2 Adrien Leravat Presentation Witekio • Germany,France, US, Taiwan • System / ecosystem • BSP & drivers, embedded & mobile software
  • 3.
    3 Internet of What? • Attributes – Devices, Communicating. – Acquire data, can grow, intelligent • Vague but powerful – Car, home, town • New challenges – Networks, Energy consumption, Security
  • 4.
    4 Key points Your owncomponents • This is about – Highlighting IoT important keys – Qt in the picture • IoT devices • Security • Into the clouds • Let there be light !
  • 5.
  • 6.
    6 Embedded • Our Alarm-clock –NXP i.MX6 DualLite – Linux 3.10, Yocto 1.5 • Connectivity is key • Medium / Long range – Networks, Energy consumption, Security • Short range – BT, BTLE, NFC, RFID • Even ‘’Cables’’!
  • 7.
    7 IoT Sytem Topology Sensors -No CPU - Acquire data Devices - ARM - Screen - Qt iMX6 Gateway/Broker - ARM/x86 - Screen - Qt Cloud - x86/64 - Qt   Size of Qt
  • 8.
    8 Qt’s role • Forgraphical applications – Qt Quick / Widgets – Depends on GPU, RAM and GUI’s complexity • For non-graphical applications – Leverage Qt classes (Networking, Files, DB, …) – Sharing code, good performances – Consider alternatives for heavy duty remote services
  • 9.
  • 10.
    10 Security • No oneis ‘’safe’’ – Growing number of connected devices, means more opportunities for hackers – Shodan: IoT device search engine
  • 11.
    11 Security • System – Keepit up to date (packages) – Remove development and unused services – Firewall – Security enhancements – Seal the box
  • 12.
    12 Security • Encrypt communications –QSslSocket: TCP socket with SSL/TLS (requires OpenSSH) – Manually: • Simplecrypt (Qt), OpenSSH, Crypto++ • Check input data – Avoid strings when possible – QString::toHtmlEscaped/replace, QRegExp – QSqlQuery::bindValue
  • 13.
  • 14.
    14 Example use cases •Save user alarms and settings • Set alarms from Smartphone • News and weather • Intelligent wake up – Depending on traffic, weather
  • 15.
    15 Cloud services • Cloudservices / dedicated server – Storage • User settings, alarms – Computing • Traffic and weather, analysis • Interface – HTTP + JSON/XLM • Very easy for Web applications – Authentication
  • 16.
    16 Cloud services Third partyservice – Weather, news Our server – User preferences, Alarms – Qt Cloud Services, Amazon, etc • QNetworkAccessManager – HTTP Get/Post/Put – QNAM::get(QNetworkRequest(QUrl(“http://myserver.com”); – QJsonDocument, QDomDocument (XML) 1 2 1 2
  • 17.
    17 Cloud services Sorry Ilied… Gateway device / server – To third-party services – Access control – Formatting – Caching 2 2
  • 18.
  • 19.
    Let there belight! …but thanks to Qt
  • 20.
    20 Adding a light •Light – Wifi connected – Brightness, color – QUdpSocket on a fixed IP address – Power on when an alarm rings
  • 21.
    21 Notifications • Remote alarm –Server has something to say ! “Push notification” – Device listens on a specific TCP port – Only accepts connections from server, QHostInfo QTcpServer server; server.listen(host, port);
  • 22.
    22 IoT Flexibility ? Sensors DevicesGateway Cloud • What if more ? New devices ? – Like a Coffee machine – … need for flexibility – Broadcast yourself
  • 23.
    23 IoT Flexibility ? Sensors ClientsBroker Client(s) • What if more ? New devices ? – Centralizes information – Clients publish events (temp., lights on, etc.) – Clients subscribe to events – MQTT (qmqtt, mosquitto), AMQP, XMPP …