sigfox makers tour - copenhagen

103
Copenhagen Sigfox Makers Tour #20

Upload: nicolas-lesconnec

Post on 09-Apr-2017

159 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Sigfox Makers Tour - Copenhagen

Copenhagen Sigfox Makers Tour #20

Page 2: Sigfox Makers Tour - Copenhagen

Introduction

Page 3: Sigfox Makers Tour - Copenhagen

Schedule

Intro

Slides - All about Sigfox

Demos .. hopefully

Workshop - Your turn to work

Enjoy !

Page 4: Sigfox Makers Tour - Copenhagen

Sigfox basics

Page 5: Sigfox Makers Tour - Copenhagen

About Sigfox

Sigfox is not selling chips

Sigfox is not building connected solutions

Sigfox has invented a radio protocol

Sigfox operates a global network

Page 6: Sigfox Makers Tour - Copenhagen

Why Sigfox ?

Need for a solution dedicated to the IoT, not an existing one tweaked for it.

We only serve the IoT, that’s why we’re doing it efficiently

Page 7: Sigfox Makers Tour - Copenhagen
Page 8: Sigfox Makers Tour - Copenhagen

New possibilities

Existing solutions: Cheaper connection & extended battery life

Enables totally new IoT applications

Backup connectivity for higher bandwidth devices

Page 9: Sigfox Makers Tour - Copenhagen

How to communicate

Detect something to send (that’s the hard part)

Power on the communication module

Send

Message is picked up by the network

Data is received on your server

Page 10: Sigfox Makers Tour - Copenhagen

How hard ?

Send an AT command

You receive an HTTP Request on your application server

Page 11: Sigfox Makers Tour - Copenhagen

Core concepts

Page 12: Sigfox Makers Tour - Copenhagen

Out of the box

No connection

No configuration

No pairing

No signaling

Page 13: Sigfox Makers Tour - Copenhagen

Energy efficiency

The Sigfox protocol has been designed to maximise energy efficiency

Tx: <50 mA during a few seconds (25mW ; 14dB)

Key factor: idle consumption (unconnected 99.x% of the time)

Idle consumption: a few µA

Page 14: Sigfox Makers Tour - Copenhagen

Very Long Range

Best case scenario

+100km between transmitter & receiver (base station)

Real life

A few kms (city) to tens of kms (countryside), depending on the topography

Page 15: Sigfox Makers Tour - Copenhagen

Outdoor & Indoor

Good indoor propagation properties

Of course, you need to consider signal attenuation (~20dB)

Page 16: Sigfox Makers Tour - Copenhagen

Two-way communication

Devices can receive updates sent from your application server

Each communication is instigated by the device

Page 17: Sigfox Makers Tour - Copenhagen

Small messages

Useful payload: up to 12 bytes

Up to 140 times each day

100 bits/s

Page 18: Sigfox Makers Tour - Copenhagen

Payload examples

GPS coordinates (lat x lng) : 6 bytes

Temperature: 2 bytes

State reporting : 1 byte

Heartbeat, update request : 0 byte

Keep it as simple as possible. Less is more !

Page 19: Sigfox Makers Tour - Copenhagen

Example: Sensit

816b1954 | 10000001 01101011 00011001 01010100

10000001 01101011 00011001 01010100 Active mode (Temp)

10000001 01101011 00011001 01010100 Temp. MSB & LSB

10000001 01101011 00011001 01010100 Humidity x2

Temp : 0110011001 = 409 . (409-200) / 8 = 26.125°C

Humidity: 01010100 = 84. 84/2 = 42%

Page 20: Sigfox Makers Tour - Copenhagen

Security

Page 21: Sigfox Makers Tour - Copenhagen

Security

No keys exchanged over the network, no handshake

Messages can be encrypted or scrambled

Each message is signed with a key unique to the device

Page 22: Sigfox Makers Tour - Copenhagen

Message signature

With each message, a hash is calculated & sent; using:

Device ID

Secret key, unique to the device. Never transmitted OTA

Payload

Internal increment

Page 23: Sigfox Makers Tour - Copenhagen

Radio properties

Great tolerance to interferors

Jamming resistant

Interception is hard: UNB & frequency diversity

Page 24: Sigfox Makers Tour - Copenhagen

Jammers

Page 25: Sigfox Makers Tour - Copenhagen

Interferors

Page 26: Sigfox Makers Tour - Copenhagen

Radio Ultra Narrow Band

Page 27: Sigfox Makers Tour - Copenhagen

Sigfox use

The network currently monitors a 192KHz part of the spectrum

Each message is ~100Hz wide

Page 28: Sigfox Makers Tour - Copenhagen
Page 29: Sigfox Makers Tour - Copenhagen
Page 30: Sigfox Makers Tour - Copenhagen

Sigfox messages

192 KHz

Each repetition is 100Hz

Page 31: Sigfox Makers Tour - Copenhagen

Regulations

Page 32: Sigfox Makers Tour - Copenhagen

Regulations

Sigfox is operating on unlicensed Sub-GHz frequency bands all over the world

We just have to pick the right central frequency

Easy, right ?

Page 33: Sigfox Makers Tour - Copenhagen
Page 34: Sigfox Makers Tour - Copenhagen

ETSI Duty cycle

Page 35: Sigfox Makers Tour - Copenhagen

Unlicensed bands

Compliant with regulations

ETSI 300-220

FCC Part 15

ANATEL 506

AS/NZS 4268

Page 36: Sigfox Makers Tour - Copenhagen

Different bands

Regional regulations affect

Central frequency

Power Output / Data Rate

Spectrum access

Handled by the Sigfox stack

Same hardware can be used, with software switches

Page 37: Sigfox Makers Tour - Copenhagen

Coverage

Page 38: Sigfox Makers Tour - Copenhagen

Global network

Sigfox is offering a global network, not a solution to build private networks

Roaming is included is the standard service

Devices will work the same all over the network

Page 39: Sigfox Makers Tour - Copenhagen
Page 40: Sigfox Makers Tour - Copenhagen
Page 41: Sigfox Makers Tour - Copenhagen
Page 42: Sigfox Makers Tour - Copenhagen

Demo #1

basic hello world message

Page 43: Sigfox Makers Tour - Copenhagen

Current use cases

Examples of solutions already in production

Page 44: Sigfox Makers Tour - Copenhagen

Internet of Things ?

Consumer gadgets

Boring & usefulIoT

Page 45: Sigfox Makers Tour - Copenhagen

Perfect Sigfox use cases

Independent solutions

no user, no power socket, no local network

Shy devices

Doesn’t speak much, but only useful data

Page 46: Sigfox Makers Tour - Copenhagen

Sigfox foundation

Page 47: Sigfox Makers Tour - Copenhagen

Antarctica

Tracking scientists & assets

Long reach

Ease of use

Robust trackers

Page 48: Sigfox Makers Tour - Copenhagen

Wildlife

Rhinos tracking & monitoring

Anti poaching operation

Implant & play

Long reach

Page 49: Sigfox Makers Tour - Copenhagen

Industry

Page 50: Sigfox Makers Tour - Copenhagen

Predictive maintenance

Optimize & anticipate maintenance

Alerts when customer needs support

Lower operation costs

Increased safety and/or customer satisfaction

Page 51: Sigfox Makers Tour - Copenhagen

Health & Assisted living

Page 52: Sigfox Makers Tour - Copenhagen

Assisted Living Box

Elderly people benefiting from home services

Monitor carers come & go

NFC badge reader

ROI : 6 months

Increased service quality

Page 53: Sigfox Makers Tour - Copenhagen

Defibrillators

Guarantee that the equipment is in working order

Reduced costs (easy installation)

Notifications

Central supervision

Page 54: Sigfox Makers Tour - Copenhagen

Public sector

Page 55: Sigfox Makers Tour - Copenhagen

Smart parking

Parking spots monitoring

Real time guidance for users

Traffic optimization

Local enforcement optimization

Page 56: Sigfox Makers Tour - Copenhagen

Waste management

Optimize costs of collection

Plug & play

Years of battery life

Page 57: Sigfox Makers Tour - Copenhagen

Utilities

Page 58: Sigfox Makers Tour - Copenhagen

Metering

Different solutions

Smart or add-on to existing meters

Low cost of installation & operation

Page 59: Sigfox Makers Tour - Copenhagen

Home & lifestyle

Page 60: Sigfox Makers Tour - Copenhagen

Home Alarm System

Backup connectivity for GSM solution

Jamming resistant

Continuity of service

Self deployment

High capacity network

Page 61: Sigfox Makers Tour - Copenhagen

Water quality monitoring

Swimming pool water quality monitor

Long reach (> WiFi)

No install

Page 62: Sigfox Makers Tour - Copenhagen

GPS Trackers

Low cost, high precision trackers

No setup

No companion device required

Long reach

Cross borders

Page 63: Sigfox Makers Tour - Copenhagen

Agriculture

Page 64: Sigfox Makers Tour - Copenhagen

Crop management

Smart irrigation

Environnement sensors

Ease of use

Yield optimisation

24/7 data

Page 65: Sigfox Makers Tour - Copenhagen

Connected Beehives

Automate & optimize honey production

Scales

Remote monitoring

Long battery life

Page 66: Sigfox Makers Tour - Copenhagen

Weather monitoring

Accurate & personal weather data

Affordable

Easy installation

Long battery life

Page 67: Sigfox Makers Tour - Copenhagen

Retail & other services

Page 68: Sigfox Makers Tour - Copenhagen

Button

Simplest interface possible

Press a button ; trigger a service

No installation

Cloud-based service

Page 69: Sigfox Makers Tour - Copenhagen

Customer Satisfaction

Effortless customer feedback

No wiring

No pairing

Long battery life

Page 70: Sigfox Makers Tour - Copenhagen

Hardware solutions

Page 71: Sigfox Makers Tour - Copenhagen

Hardware

SIGFOX is not a hardware vendor

Ecosystem of established partners

Page 72: Sigfox Makers Tour - Copenhagen

Solutions

Modules

Easy to get started

Atim, Telit, TD

Chipsets

Cheaper

Atmel, OnSemi

Transceivers

SiLabs, Texas

Instrument

Quite expensive

for industrialisation

Skills needed

Ref.Designs

Cheapest solution

Skills++ needed

Certification

program

Page 73: Sigfox Makers Tour - Copenhagen

Antenna

Not optional :)

Best way to ruin a great device is to mess the antenna integration

Balance between design & performance

We’re here to help you get in touch with specialists if needed

Page 74: Sigfox Makers Tour - Copenhagen

Prototyping

Arduino & Raspberry Pi kits available from various websites

Check out http://partners.sigfox.com for the full details

Page 75: Sigfox Makers Tour - Copenhagen

Cloud

Page 76: Sigfox Makers Tour - Copenhagen

Get your data

View messages : Sigfox web platform

Get messages : REST API (pull)

Receive new messages : HTTP Callbacks (push)

Page 77: Sigfox Makers Tour - Copenhagen

Callbacks

Each message received from your devices will be forwarded to your application server

Customisable headers & body

You can set more than one callback

Page 78: Sigfox Makers Tour - Copenhagen

3rd party platforms

You can easily push your data to a 3rd party platform :

AWS, Azure, Telefonica, thethings.iO, IBM, Samsung…

Page 79: Sigfox Makers Tour - Copenhagen

Downlink messages

A downlink message can be

Semi automatic : sent directly by the network

Customised : sent by your own application server

Page 80: Sigfox Makers Tour - Copenhagen

Semi automatic callback

Simply set up the message to send, it can be:

an hardcoded frame

pre defined variable (timestamp, rssi)

Page 81: Sigfox Makers Tour - Copenhagen

Downlink callbacks

Same mechanism as for the uplink callback, set an URL

Reply with the 8-byte downlink frame

Respect this JSON format : {

'{{deviceId}}': {

'downlinkData':{{data}}

}

}

Page 82: Sigfox Makers Tour - Copenhagen

Workshop session

Using SmartEverything boards

Page 83: Sigfox Makers Tour - Copenhagen

Contribute back

Page 84: Sigfox Makers Tour - Copenhagen

Contribute

Don’t forget to publish your experiments

Code Samples, HW design, fails … will be useful to other people

We all start by copy/pasting ;)

Your own website, github, hackster.io, instructables … your call!

Page 85: Sigfox Makers Tour - Copenhagen

Useful Resources

Session resources http://github.com/sigfox/makers-tour

Questions ? http://ask.sigfox.com

Github

http://github.com/sigfox

http://github.com/nicolsc

Page 86: Sigfox Makers Tour - Copenhagen

Register

http://backend.sigfox.com/activate

Provider: Snootlab

Country : Denmark

Page 87: Sigfox Makers Tour - Copenhagen

Hello World

Page 88: Sigfox Makers Tour - Copenhagen

Arduino Setup

Open the Arduino IDE

Select the board (ports)

Board type : Arduino Uno

Page 89: Sigfox Makers Tour - Copenhagen

Hello World Sketch

#include <SoftwareSerial.h>

SoftwareSerial sigfox(5,4); void setup() { Serial.begin(9600); sigfox.begin(9600); delay(300);

sigfox.write("AT$SB=1\r"); }

void loop() {

// put your main code here, to run repeatedly: while (sigfox.available()){

Serial.write(sigfox.read()); }

}

Page 90: Sigfox Makers Tour - Copenhagen

Message received ?

http://backend.sigfox.com

Navigate to the devices menu in the top bar

Click on the ID of your device

Enter the messages menu from the left navigation column

Page 91: Sigfox Makers Tour - Copenhagen

First callback

Page 92: Sigfox Makers Tour - Copenhagen

Callback setup

Device Type menu

Click on your device type name

Enter the Callbacks menu

Select new default callback

Page 93: Sigfox Makers Tour - Copenhagen

Callback setup

TYPE : DATA UPLINK

Choose a CHANNEL : URL (EMAIL for a quick test)

Url pattern: URL of your own server

Use HTTP method: GET/POST/PUT

Page 94: Sigfox Makers Tour - Copenhagen

Callback status

In the Devices > Messages panel, you have a indicator of the callback status (an arrow)

Black : in progress

Green : Callback OK

Red : Callback KO (at least one of the callbacks failed)

Click the arrow to display details.

Page 95: Sigfox Makers Tour - Copenhagen

Downlink

Page 96: Sigfox Makers Tour - Copenhagen

How does it work ?

Send a message, with a downlink flag

Once message is sent, the module gets back to sleep

After 20s, it will wake up automatically, in Rx mode

It will wait 20s for a downlink message

Afterwards it will get back to sleep

Page 97: Sigfox Makers Tour - Copenhagen

Downlink setup

To setup an automatic callback :

Device Type > Info > Edit

In the Downlink data settings, set the following :

Downlink Mode : DIRECT

Set the following value : 123400000BADCAFE

Page 98: Sigfox Makers Tour - Copenhagen

How to request a downlink

Same AT command, with additional parameters

AT$SF=[hex byte]*, 1

Page 99: Sigfox Makers Tour - Copenhagen

Handle the response

When entering Rx mode, the module will display

+RX BEGIN

Received frame (if any) will be displayed as: +RX= [byte] [byte] [byte] [byte] [byte] [byte] [byte] [byte]

End of Rx mode

+RX END

Page 100: Sigfox Makers Tour - Copenhagen

Downlink callback

In Device Type > Info > Edit

change Downlink mode to CALLBACK

Create a new default callback, with TYPE : DATA | BIDIR

Then set up your URL

Page 101: Sigfox Makers Tour - Copenhagen

Sample input output

AT$SF=55 50 4C 49 4E 4B,1

OK

+RX BEGIN

+RX=44 4F 57 4E 4C 49 4E 4B

+RX END

Page 102: Sigfox Makers Tour - Copenhagen

Sample code

Arduino

https://github.com/sigfox/makers-tour

Server side

https://github.com/nicolsc/sigfox-downlink

PR welcome in different languages

Page 103: Sigfox Makers Tour - Copenhagen

Keep in touch

[email protected]

twitter: @nlesconnec