115
Sigfox Makers Tour #18 Bratislava

Sigfox Makers Tour - Bratislava

Embed Size (px)

Citation preview

Page 1: Sigfox Makers Tour - Bratislava

Sigfox Makers Tour #18 Bratislava

Page 2: Sigfox Makers Tour - Bratislava

Introduction

Page 3: Sigfox Makers Tour - Bratislava

Schedule

Intro

Slides - All about Sigfox

Demos .. hopefully

Workshop - Your turn to work

Enjoy !

Page 4: Sigfox Makers Tour - Bratislava

About us

Martin Kominek

SimpleCell (Sigfox Operator SK)

Nicolas Lesconnec

Dev Relations Sigfox

Page 5: Sigfox Makers Tour - Bratislava

Sigfox

Page 6: Sigfox Makers Tour - Bratislava

Sigfox basics

Page 7: Sigfox Makers Tour - Bratislava

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 8: Sigfox Makers Tour - Bratislava

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 9: Sigfox Makers Tour - Bratislava
Page 10: Sigfox Makers Tour - Bratislava

New possibilities

Existing solutions: Cheaper connection & extended battery life

Enables totally new IoT applications

Backup connectivity for higher bandwidth devices

Page 11: Sigfox Makers Tour - Bratislava

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 12: Sigfox Makers Tour - Bratislava

How hard ?

Send an AT command

You receive an HTTP Request on your application server

Page 13: Sigfox Makers Tour - Bratislava

Core concepts

Page 14: Sigfox Makers Tour - Bratislava

Out of the box

No connection

No configuration

No pairing

No signaling

Page 15: Sigfox Makers Tour - Bratislava

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 16: Sigfox Makers Tour - Bratislava

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 17: Sigfox Makers Tour - Bratislava

Outdoor & Indoor

Good indoor propagation properties

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

Page 18: Sigfox Makers Tour - Bratislava

Two-way communication

Devices can receive updates sent from your application server

Each communication is instigated by the device

Page 19: Sigfox Makers Tour - Bratislava

Small messages

Useful payload: up to 12 bytes

Up to 140 times each day

100 bits/s

Page 20: Sigfox Makers Tour - Bratislava

Payload examples

GPS coordinates (lat x lng) : 6 bytes

Temperature: 2 bytes

State reporting : 1 byte

Heartbeat, update request : 0 byte

And … who needs full bytes when 5 bits are enough ?

Page 21: Sigfox Makers Tour - Bratislava

Payload examples

A (int): 17568 —> 0100010010100000

B (0-32): 17 —> 010001

C (state): 3 —> 10

Frame: 01000100 10100000 01000110

Frame: 0x44 0xA0 0x46

AT$SF=44A046

Page 22: Sigfox Makers Tour - Bratislava

More !

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 23: Sigfox Makers Tour - Bratislava

Low cost of communication

Small subscription fees

Short SW development cycle

Low cost HW components

Page 24: Sigfox Makers Tour - Bratislava

Security

Page 25: Sigfox Makers Tour - Bratislava

Security

Each message is signed with a key unique to the device

Messages can be encrypted or scrambled

No keys exchanged over the network, no handshake

Security is an ever ongoing effort

Page 26: Sigfox Makers Tour - Bratislava

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 27: Sigfox Makers Tour - Bratislava

Radio properties

Great tolerance to interferors

Jamming resistant

Interception is hard: UNB & frequency diversity

Page 28: Sigfox Makers Tour - Bratislava

Jammers

Page 29: Sigfox Makers Tour - Bratislava

Interferors

Page 30: Sigfox Makers Tour - Bratislava

Radio Ultra Narrow Band

Page 31: Sigfox Makers Tour - Bratislava

Sigfox use

The network currently monitors a 192KHz part of the spectrum

Each message is ~100Hz wide

Page 32: Sigfox Makers Tour - Bratislava

UNB Analogy

Page 33: Sigfox Makers Tour - Bratislava

Undesired signals (aka real life)

Page 34: Sigfox Makers Tour - Bratislava

Sigfox messages

Page 35: Sigfox Makers Tour - Bratislava

Sigfox messages

Page 36: Sigfox Makers Tour - Bratislava

Regulations

Page 37: Sigfox Makers Tour - Bratislava

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 38: Sigfox Makers Tour - Bratislava
Page 39: Sigfox Makers Tour - Bratislava

ETSI Duty cycle

Page 40: Sigfox Makers Tour - Bratislava

Unlicensed bands

Compliant with regulations

ETSI 300-220

FCC Part 15

ANATEL 506

AS/NZS 4268

Page 41: Sigfox Makers Tour - Bratislava

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 42: Sigfox Makers Tour - Bratislava

Coverage

Page 43: Sigfox Makers Tour - Bratislava

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 44: Sigfox Makers Tour - Bratislava

Nationwide coverage

! France " Netherlands

# Czech Republic $ Portugal

% Ireland & Spain

' Luxembourg

Page 45: Sigfox Makers Tour - Bratislava

Europe - under rollout

( Belgium ) Italy

* Denmark + Malta

, Finland - Slovakia

. Germany / United Kingdom

Page 46: Sigfox Makers Tour - Bratislava

Americas - under rollout

0 Mexico 1 Brazil

2 United States 3 Colombia

Page 47: Sigfox Makers Tour - Bratislava

AMEA - under rollout

4 Australia 5Mauritius

6 Japan 7 Oman

8 New Zealand 9 Singapore

: Taiwan ;South Africa

Page 48: Sigfox Makers Tour - Bratislava
Page 49: Sigfox Makers Tour - Bratislava
Page 50: Sigfox Makers Tour - Bratislava
Page 51: Sigfox Makers Tour - Bratislava

Demo #1

basic hello world message

Page 52: Sigfox Makers Tour - Bratislava

Current use cases

Examples of solutions already in production

Page 53: Sigfox Makers Tour - Bratislava

Internet of Things ?

Consumer gadgets

Boring & usefulIoT

Page 54: Sigfox Makers Tour - Bratislava

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 55: Sigfox Makers Tour - Bratislava

Sigfox foundation

Page 56: Sigfox Makers Tour - Bratislava

Antarctica

Tracking scientists & assets

Long reach

Ease of use

Robust trackers

Page 57: Sigfox Makers Tour - Bratislava

Wildlife

Rhinos tracking & monitoring

Anti poaching operation

Implant & play

Long reach

Page 58: Sigfox Makers Tour - Bratislava

Industry

Page 59: Sigfox Makers Tour - Bratislava

Predictive maintenance

Optimize & anticipate maintenance

Alerts when customer needs support

Lower operation costs

Increased safety and/or customer satisfaction

Page 60: Sigfox Makers Tour - Bratislava

Health & Assisted living

Page 61: Sigfox Makers Tour - Bratislava

Assisted Living Box

Elderly people benefiting from home services

Monitor carers come & go

NFC badge reader

ROI : 6 months

Increased service quality

Page 62: Sigfox Makers Tour - Bratislava

Defibrillators

Guarantee that the equipment is in working order

Reduced costs (easy installation)

Notifications

Central supervision

Page 63: Sigfox Makers Tour - Bratislava

Public sector

Page 64: Sigfox Makers Tour - Bratislava

Smart parking

Parking spots monitoring

Real time guidance for users

Traffic optimization

Local enforcement optimization

Page 65: Sigfox Makers Tour - Bratislava

Waste management

Optimize costs of collection

Plug & play

Years of battery life

Page 66: Sigfox Makers Tour - Bratislava

Fire hydrants

Detect faulty hydrants

Fraud detection

Increased security

Long battery life

Easy integration

Page 67: Sigfox Makers Tour - Bratislava

Utilities

Page 68: Sigfox Makers Tour - Bratislava

Metering

Different solutions

Smart or add-on to existing meters

Low cost of installation & operation

Page 69: Sigfox Makers Tour - Bratislava

Home & lifestyle

Page 70: Sigfox Makers Tour - Bratislava

Sound detector

« Shazam » of home security

Out of the box connectivity

Low TCO

Easy pan-european deployment

Page 71: Sigfox Makers Tour - Bratislava

Home Alarm System

Backup connectivity for GSM solution

Jamming resistant

Continuity of service

Self deployment

High capacity network

Page 72: Sigfox Makers Tour - Bratislava

Smoke detector

Get alerted even when out

Easy install

Fault detection

Page 73: Sigfox Makers Tour - Bratislava

GPS Trackers

Low cost, high precision trackers

No setup

No companion device required

Long reach

Cross borders

Page 74: Sigfox Makers Tour - Bratislava

Agriculture

Page 75: Sigfox Makers Tour - Bratislava

Crop management

Smart irrigation

Environnement sensors

Ease of use

Yield optimisation

24/7 data

Page 76: Sigfox Makers Tour - Bratislava

Connected Beehives

Automate & optimize honey production

Scales

Remote monitoring

Long battery life

Page 77: Sigfox Makers Tour - Bratislava

Weather monitoring

Accurate & personal weather data

Affordable

Easy installation

Long battery life

Page 78: Sigfox Makers Tour - Bratislava

Retail & other services

Page 79: Sigfox Makers Tour - Bratislava

Button

Simplest interface possible

Press a button ; trigger a service

No installation

Cloud-based service

Page 80: Sigfox Makers Tour - Bratislava

Customer Satisfaction

Effortless customer feedback

No wiring

No pairing

Long battery life

Page 81: Sigfox Makers Tour - Bratislava

Hardware solutions

Page 82: Sigfox Makers Tour - Bratislava

Hardware

SIGFOX is not a hardware vendor

Ecosystem of established partners

Page 83: Sigfox Makers Tour - Bratislava

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 84: Sigfox Makers Tour - Bratislava

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 85: Sigfox Makers Tour - Bratislava

Prototyping

Arduino & Raspberry Pi kits available from various websites

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

Page 86: Sigfox Makers Tour - Bratislava

Cloud

Page 87: Sigfox Makers Tour - Bratislava

Get your data

View messages : Sigfox web platform

Get messages : REST API (pull)

Receive new messages : HTTP Callbacks (push)

Page 88: Sigfox Makers Tour - Bratislava

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 89: Sigfox Makers Tour - Bratislava

3rd party platforms

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

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

Page 90: Sigfox Makers Tour - Bratislava

Downlink messages

A downlink message can be

Semi automatic : sent directly by the network

Customised : sent by your own application server

Page 91: Sigfox Makers Tour - Bratislava

Semi automatic callback

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

an hardcoded frame

pre defined variable (timestamp, rssi)

Page 92: Sigfox Makers Tour - Bratislava

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 93: Sigfox Makers Tour - Bratislava

Workshop session

Using SmartEverything boards

Page 94: Sigfox Makers Tour - Bratislava

Contribute back

Page 95: Sigfox Makers Tour - Bratislava

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 96: Sigfox Makers Tour - Bratislava

About the Board

The SmartEverything is a multi-purpose development board distributed by Arrow.

Using a Cortex M0+ MCU with an Arduino bootloader, it features a Telit LE-868S Sigfox module, BLE, a GPS and various environnement sensors

Full documentation available on smarteverything.it

The Sigfox module documentation is available on telit.com

Page 97: Sigfox Makers Tour - Bratislava

Useful Resources

Workshop slides http://bit.ly/SMTSmartEverything

Questions ? http://ask.sigfox.com

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

Github http://github.com/nicolsc

Page 98: Sigfox Makers Tour - Bratislava

Register

http://backend.sigfox.com/activate

Provider: Arrow // SmartEverything

Country : Slovakia

Device ID & PAC: Sticker + Paper

Page 99: Sigfox Makers Tour - Bratislava

Hello World

Page 100: Sigfox Makers Tour - Bratislava

SmartEverything test

Open the Arduino IDE

Select the board

Board type : Smart Everything Fox (USB)

Try one of the File > Examples > SmartEverything samples

Sigfox : File>Examples>SmartEverything>Sigfox>DataModeEu

Page 101: Sigfox Makers Tour - Bratislava

Hello World Sketch

#include <Arduino.h> #include <Wire.h>

void setup() { SerialUSB.begin(115200); SigFox.begin(19200); delay(500);

Sigfox.print("+++"); }

void loop() { char output;

SigFox.print("AT$SF=CAFECAFE"); SigFox.print(« \r");

delay(600000);

}

Page 102: Sigfox Makers Tour - Bratislava

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 103: Sigfox Makers Tour - Bratislava

First callback

Page 104: Sigfox Makers Tour - Bratislava

Callback setup

Device Type menu

Click on your device type name

Enter the Callbacks menu

Select new default callback

Page 105: Sigfox Makers Tour - Bratislava

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 106: Sigfox Makers Tour - Bratislava

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 107: Sigfox Makers Tour - Bratislava

Downlink

Page 108: Sigfox Makers Tour - Bratislava

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 109: Sigfox Makers Tour - Bratislava

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 110: Sigfox Makers Tour - Bratislava

How to request a downlink

Same AT command, with additional parameters

AT$SF=[hex byte]*, 1

Page 111: Sigfox Makers Tour - Bratislava

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 112: Sigfox Makers Tour - Bratislava

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 113: Sigfox Makers Tour - Bratislava

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 114: Sigfox Makers Tour - Bratislava

Sample code

Arduino

https://github.com/sigfox/makers-tour-resources/tree/master/SmartEverything/downlink

Server side

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

PR welcome in different languages

Page 115: Sigfox Makers Tour - Bratislava

Keep in touch

[email protected]

twitter: @nlesconnec