Skip to content

masaleiro/sigfox-downlink

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

#SIGFOX Downlink

##About Sigfox

Sigfox operates a global network, dedicated to the IoT.
Very low energy consumption, allowing devices to last years on battery.

The network is all about small messages (12 bytes of useful payload) every now and then (up to 140 times per day.

As the network is bi-directionnal, you can send data from your server to your devices whenever they ask for an update

Check out our makers website to get more informations about Sigfox.

##Downlink details

A downlink message is a message sent to a connected device/thing.
Using the Sigfox network, this message can be sent either by the network itself (direct, with a few built-in vars), or by the user's application server (callback)

Each downlink message is an 8-bytes frame.

Every time one of your devices will request a downlink message, the callback URL you defined will be called. You need to send back an HTTP 200 OK response, and the 8 bytes response. In some cases, you may have no data to send, then simply reply with a HTTP 204 No Content. This way, no message will be sent to your device.

When sending back some data, you must comply with the following:

Header : Content-Type: application/json

Response body:

{
  '{{deviceId}}': {
	'downlinkData':{{data}}
 }
}

##Set up your callback URL

  • Log in your SIGFOX account.
  • Navigate to the appropriate device type menu
  • Edit the device type, to set the Downlink mode to callback
  • In the Callbacks menu, add a new default one, with the following settings :
    • Type: DATA / BIDIR
    • Channel: URL
    • Url pattern : Your domain + endpoint
    • Check the POST checkbox
    • Content type : application/json
    • Body : the data that will be sent to your service. Customize to your needs

In this samples, the body was set as:

{
	"deviceId":"{device}",
	"rssi":"{rssi}",
	"data": "{data}"
}

Edit Downlink Mode

Downlink Callback

##This repo

This repository contains boilerplate examples in different languages. The goal is to help you getting started with your favorite languauge.
Fixes, pull requests, ... are all welcome :)

###Available Code Samples ####Php

  • Vanilla Php
  • Basic Silex app (+Composer)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%