sigfox makers tour - lisboa

108
#9 LISBOA - 2016.02.11

Upload: nicolas-lesconnec

Post on 16-Jan-2017

750 views

Category:

Engineering


0 download

TRANSCRIPT

#9 LISBOA - 2016.02.11

Schedule

Intro

Slides - All about Sigfox

Demos .. hopefully

Workshop - Your turn to work

Enjoy !

About us

Anthony Charbonnier

Startup Relations Manager

Nicolas Lesconnec

Developer & Maker Evangelist

Pedro Costa

Narrownet Ecosystem Developer

Sigfox basics

About Sigfox

French company, funded in 2009

Operating in +12 countries as of Feb 2016

170 staff, 80 a year ago

About Sigfox

Sigfox is not selling chips

Sigfox is not building connected solutions

Sigfox has invented a radio protocol

Sigfox operates a global network

Why Sigfox ?

Already plenty of communication protocols around !

Gateway-based solutions not suited for independent things

A protocol designed for the IoT, not an existing one tweaked to

address it

New possibilities

Direct connection to the Internet

Years of lifetime on a battery

No configuration

As simple as possible : Detect - Send - Receive

New possibilities

Existing solutions: Cheaper connection & extended battery life

Enables totally new IoT applications

Backup connectivity for higher bandwidth devices

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

Proof ?

How hard ?

Send an AT command

AT$SF=CAFECAFE

You receive an HTTP Request on your application server

Method, Content-Type & Body are customisable

Core concepts

Energy efficiency

The Sigfox protocol has been designed to maximise energy

efficiency

Connectivity solution shouldn’t impact product lifecycle

Only use energy when needed, and use as little as possible

Energy efficiency

Tx: ~20-35 mA during a few seconds (25mW ; 14dB)

Key factor: idle consumption

99.x% of the time, a connected thing is not actively connected

Idle consumption: a few µA

Out of the box

No configuration, no pairing, no signalisation

The network is serving the devices, not the other way round

Base stations are monitoring the radio spectrum, and detect

the messages sent by the devices

A message can be picked up by several base stations ;

validation & reduplication are handled by the network

Very Long Range

Best case scenario

+100km between transmitter & receiver (base station)

Real life

A few kms in urban environment, depending on immediate

surroundings

Tens of kms in the countryside, depending on topography &

land typology

Outdoor & Indoor

Walls don’t stop radio waves

… But there’s some attenuation, no magic here

Indoor coverage maps are available to customers, with an

applied attenuation of 20dB

Sub GHz frequencies have good indoor properties

Two-way communication

Devices can receive updates sent from your application server

Each communication is instigated by the device

A device will ask for an update

No passive Rx mode. (Energy efficiency, remember ?)

Small messages

Useful payload: 12 bytes

Up to 140 times each day

100 bits/s

12 bytes

No multimedia obviously

Forget about XML, JSON, full text, ..

Back to the old days: binary & optimisation

12 bytes = 96 bits = 2^96 available values

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 ?

Payload examples

I need to send the following

Value A - a number

Value B - a 0-32 value

Value C - a state out of 4 possibilities

Payload examples

A : 17568 —> 0100010010100000

B : 17 —> 010001

C : 3 —> 10

Frame: 01000100 10100000 01000110

Frame: 0x44 0xA0 0x46

AT$SF=44A046

140 times a day

Not a technology limit, even at 100 bits/s

Compliant with the regulation

ETSI (ETSI 300-220): 1% duty cycle

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

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

Radio properties

Great tolerance to interferors

Jamming resistant

Interception is hard: UNB & frequency diversity

Jammers

Interférons

Ultra Narrow Band

Background

Ultra Narrow Band isn’t brand new : used for submarines

communications during WW2

Hard part: detect messages, with no sync (time & frequency)

Sigfox use

The network currently monitors a 200KHz part of the spectrum

Each message is ~100Hz wide

UNB Analogy

Spectrum (quiet)

Undesired signals (aka real life)

Sigfox messages

Frequencies

Sigfox uses unlicensed Sub GHz frequencies

Europe : 868MHz

USA: 902MHz

Frequencies

Unlicensed doesn’t mean « do what you want »

Sigfox complies with regulations

ETSI 300-200 : 1% duty cycle

FCC part 15 : duration of emission

Coverage

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

Current coverage

Nationwide coverage

France

Netherlands

Portugal

Spain

Current coverage

Local coverage

Bogota

Brussels

Dublin

London

Milan

Munich

Prague

Rio

Rome

San Francisco

Santiago

Countries under rollout

Belgium

Czech Republic

Denmark

Germany

Ireland

Italy

Luxemburg

Mauritius

United Kingdom

United States

United States

In production now

San Francisco & part of the bay area

In production with a couple of months

10 of the larger metropolis (NY, LA, Chicago, Dallas, ..)

Coverage b

Demo #1BASIC HELLO WORLD MESSAGE

Use casesEXAMPLES OF SOLUTIONS ALREADY IN PRODUCTION

What does IoT means ?

Sexy stuff : connected gadgets

Boring & useful

IoT

Perfect Sigfox use cases

Independant solutions

no user, no power socket, no local network

Shy devices

Doesn’t speak much, but only useful data

Metering & utilities

Smart City

Logistics

Track any good or equipment (Sigfox + GPS)

Aftertheft solutions

If this then that

Press a button

Sends an empty message

Triggers configurable action

« Mom I’m home »

« Send a taxi to Startup Lisboa »

« Deliver me my usual pizza menu »

« Silver Economy »

Lots of use cases :

Heath monitoring, fall detection, ..

Tracking the community-subsidized services

Used by french public councils

Did the carer really came for 2 hours each day ?

Or he is trying to abuse the vulnerability of the person ?

Predictive maintenance

Monitor an equipment (industrial, railroads, public lighting, ..)

Be alerted when it’s about to fail

Schedule maintenance efficiently

Agriculture

Soil & crops monitoring

Temperature, acidity, humidity, …

Optimize yields

Cattle tracking

Health monitoring

Sigfox foundation

Offer free network coverage for non-profit applications

Antarctica

coverage around the Princess Elisabeth station

Track the scientists from the belgian expedition

Rhinos tracking & protection

Wildfires detection

DIY Projects

Connected wine cellar (we’re a french company after all)

Pets tracking

Kitchen garden monitoring

You ?

Electronics are getting easier & cheaper

Very easy to get started using platforms like Arduino

Lot of funny things to make

… And lots of $$ too

Hardware solutions

Hardware

SIGFOX is not a hardware vendor

Ecosystem of established partners : Atim, Atmel, OnSemi,

SiLabs, TI, …

More to come soon

Solutions

Modules

Easy to get started

Adeunis, Atim, Telit,

Telecom Design

Quite expensive for

industrialisation (10-25$)

SoC

Cheaper (5$ and

less)

Atmel, OnSemi

Skills needed

Ref.Designs available

Transceivers

SiLabs, Texas

Instruments

Cheaper solution

Skills++ needed

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

Prototyping

Arduino & Raspberry Pi kits available from various websites

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

Demo#2RFID READER

Cloud

Get your data

View messages : Sigfox web platform

Get messages : REST API (pull)

Receive new messages : HTTP Callbacks (push)

Callbacks

Set your URL, Content-Type & request body

Each message received from your devices will be forwarded

there

Same for downlink : messages to your devices sent through

You can set more than one callback, to push to different

applications or services

3rd party platforms

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

Azure, Telefonica, TheThings.io, OVH, …

Callback setup

Downlink messages

A downlink message can be

Semi automatic : sent directly by the network

Customised : sent by your own application server

Semi automatic callback

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

an hardcoded frame (CAFEDEADBEEFBAD0)

pre defined variables : timestamp, rssi

Downlink callbacks

Same mechanism as for the UPLINK callback

You set up a URL for the BIDIR callback (only one)

Reply with the 8-byte downlink frame

Respect this JSON format : {

'{{deviceId}}': {

'downlinkData':{{data}}

}

}

WorkshopYOUR TURN TO WORK

Contribute

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!

We’re hiring !

Maker In Residence (internship)

Build useful and/or funny prototypes

Test new hardware

Publish & document them

Field Evangelist Europe

Run workshops

Talk at conferences

Support the community

Useful resources

Github

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

http://github.com.nicolsc

Add your own !

First stepsUSING AN AKERU BOARD

Register

http://backend.sigfox.com/activate

Enter:

Personal infos

Device ID (sticker on the board)

PAC (check the list)

Board setup

Plug the antenna first

Plug to your laptop using a micro USB cable

Is the board recognized ?

Mac / Linux

$ ls /dev/tty.*

Windows

Open Powershell

> [System.IO.Ports.SerialPort]::getportnames()

HELLO WORLD

Hello World Sketch

Open the Arduino IDE

Select the board

Board type : Arduino Uno

Try one of the File > Examples samples

Hello World Sketch

#include <SoftwareSerial.h>

#define RX_PIN 4

#define TX_PIN 5

SoftwareSerial sigfox(RX_PIN,TX_PIN);

void setup(){

Serial.begin(9600);

sigfox.begin(9600);

sigfox.write("AT$SF=48 45 4c 4c 4f 20 57 4f 52 4c 44\r");

}

void loop(){

while (sigfox.available()){

Serial.print(sigfox.read());

}

}

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

First callback

Callback setup

Device Type menu

Enter the Callbacks menu

Select new default callback

Callback setup

Callback setup

TYPE : DATA UPLINK

Choose a CHANNEL : URL | EMAIL

Email is good for a quick try

If you choose URL, you can then set the method, content-

type, and format the body as you wish

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

Click the arrow to display details.

KO means at least one of the callbacks failed

Downlink

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

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

How to request a downlink

Same AT command, with additional parameters

AT$SF=[hex byte]*, 2, 1

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

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

Sample input output

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

OK

+RX BEGIN

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

+RX END

Sample code

Arduino

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

master/Akeru/downlink

Server side

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

PR welcome in different languages

Go furtherUSING AN AKERU BOARD

Other AT commands

AT&V : Detailed info about the module

AT$SF=[hex byte]* : Send a frame

ATS300=[int] Schedule the emission of a keep-alive frame every [int] hours

AT&W : Save settings

ATI26 :Module temperature in °C

ATI27 : Module idle power supply voltage

Other AT commands

Arduino sample code + link to full references of the TD1208

module

https://github.com/sigfox/makers-tour-resources/tree/master/Akeru/mirror

Use the module only

The module has a Cortex M3 than you can reprogram

Checkout the TD Next website for instructions

http://rfmodules.td-next.com/sdk/