SigfoxTracker: Difference between revisions
No edit summary |
|||
Line 32: | Line 32: | ||
[[File:sigfox_coverage_1.png|right|thumb|Sigfox coverage, bike trip Gouda-Leidschendam]] | [[File:sigfox_coverage_1.png|right|thumb|Sigfox coverage, bike trip Gouda-Leidschendam]] | ||
=== Existing | === Existing hardware === | ||
==== LWT-100 ==== | ==== LWT-100 ==== | ||
This is a tracker made by Invoxia, features: | This is a tracker made by Invoxia, features: | ||
Line 47: | Line 47: | ||
Apparently this was originally a LoRa tracker, contains a LoRa transceiver, but now uses SigFox! | Apparently this was originally a LoRa tracker, contains a LoRa transceiver, but now uses SigFox! | ||
The radio waveform is created by the SX1272, not by a specialized Sigfox chip. | The radio waveform is created by the SX1272, not by a specialized Sigfox chip. | ||
=== BRKWS01 === | |||
This is a stand-alone module that can be controlled through "AT" commands to perform sigfox communication: | |||
https://partners.sigfox.com/products/sigfox-breakout-board-brkws01 | |||
The module is controlled over a 9600 bps serial port connection. | |||
Further it requires a 3.3V + GND power connection. | |||
==== registration ==== | |||
This module comes with a piece of paper containing the device id and the PAC, 2 of the 3 components needed to communicate over the Sigfox network. | |||
You can register the module using just this information. The third component (key) is known at the backend and is contained in the module itself, | |||
registered before you bought the development kit, so you never really get to see this as end user. | |||
==== callback ==== | |||
I'm using the 'uplink' and 'data advanced' HTTP callbacks to receive the data from the sigfox network: | |||
* Log in to backend.sigfox.com | |||
* Under 'Device types', select a device type and select 'edit' | |||
* Open 'Callbacks' (left hand menu), add a new callback using 'new' (top-right) | |||
* Add an 'uplink' callback: | |||
** Type: DATA / UPLINK | |||
** Channel: URL | |||
** URL pattern: http://stofradar.nl:9001/sigfox/uplink | |||
** Use HTTP method: POST | |||
** Headers: - | |||
** Content-type: application/json | |||
** Body: | |||
<pre> | |||
{ | |||
"device":"{device}", | |||
"time":{time}, | |||
"data":"{data}", | |||
"seqNumber":{seqNumber}, | |||
"deviceTypeId":"{deviceTypeId}" | |||
} | |||
</pre> | |||
* Add an 'data advanced' callback: | |||
** Type: SERVICE / ADVANCED | |||
** Channel: URL | |||
** URL pattern: http://stofradar.nl:9001/sigfox/advanced | |||
** Use HTTP method: POST | |||
** Headers: - | |||
** Content-type: application/json | |||
** Body: | |||
<pre> | |||
{ | |||
"device": "{device}", | |||
"time": {time}, | |||
"data": "{data}", | |||
"seqNumber": {seqNumber}, | |||
"lqi": "{lqi}", | |||
"linkQuality": "{linkQuality}", | |||
"fixedLat": "{fixedLat}", | |||
"fixedLng": "{fixedLng}", | |||
"operatorName": "{operatorName}", | |||
"countryCode": "{countryCode}", | |||
"deviceTypeId": "{deviceTypeId}", | |||
"computedLocation": {computedLocation} | |||
} | |||
</pre> | |||
== Software == | == Software == |
Revision as of 08:07, 28 May 2022
Project SigfoxTracker | |
---|---|
Investigating sigfox location trackers | |
Status | Initializing |
Contact | bertrik |
Last Update | 2022-05-28 |
What
This page is about investigation of Sigfox location trackers, e.g.:
- how existing trackers work
- coverage of the sigfox network
- how to interact with the sigfox backend
- ultimately, help develop a sigfox tracker for tracking small animals, like bats
Investigation
- great page at disk91 about sigfox, part from reverse engineering
- coverage map https://www.sigfox.com/en/coverage
- modulation is D-BPSK, frequency range is 192 kHz is in the 868 MHz band
- a packet consists of max 26 bytes, of which 12 bytes are user payload
Interesting reading:
- https://www.disk91.com/2019/technology/sigfox/make-you-own-1-sigfox-iot-device/
- https://www.disk91.com/2019/news/sigfox-news/i-held-the-first-1-sigfox-iot-device/
- https://www.disk91.com/2018/technology/sigfox/create-a-5-autonomous-tracker-with-esp8266-and-sigfox/
How to get the keys:
coverage
Existing hardware
LWT-100
This is a tracker made by Invoxia, features:
- sends positions using sigfox, configured via bluetooth
- fcc id ZVS-LWT1: https://fccid.io/ZVS-LWT1/Internal-Photos/Internal-Photos-3734578
- ESP-8285 chip, this is a microcontroller similar to ESP-8266, used as a 'WiFi coprocessor'?
- NXP-QN9080, Ultra low power Bluetooth 5 system-on-chip solution, probably the 'main controller', see https://www.nxp.com/docs/en/nxp/data-sheets/QN908x.pdf
- U-blox M8030-CT, GNSS chip,see https://www.u-blox.com/en/product/ubx-m8030-series
- Semtech SX1272, LoRa chip
- LiPo battery, 352044 300 mAh 3.7V
- chip antenna for LoRa/Sigfox, 11x5.5mm
- chip antenna for wifi/bluetooth/gps, 10x3 mm
Apparently this was originally a LoRa tracker, contains a LoRa transceiver, but now uses SigFox! The radio waveform is created by the SX1272, not by a specialized Sigfox chip.
BRKWS01
This is a stand-alone module that can be controlled through "AT" commands to perform sigfox communication: https://partners.sigfox.com/products/sigfox-breakout-board-brkws01
The module is controlled over a 9600 bps serial port connection. Further it requires a 3.3V + GND power connection.
registration
This module comes with a piece of paper containing the device id and the PAC, 2 of the 3 components needed to communicate over the Sigfox network. You can register the module using just this information. The third component (key) is known at the backend and is contained in the module itself, registered before you bought the development kit, so you never really get to see this as end user.
callback
I'm using the 'uplink' and 'data advanced' HTTP callbacks to receive the data from the sigfox network:
- Log in to backend.sigfox.com
- Under 'Device types', select a device type and select 'edit'
- Open 'Callbacks' (left hand menu), add a new callback using 'new' (top-right)
- Add an 'uplink' callback:
- Type: DATA / UPLINK
- Channel: URL
- URL pattern: http://stofradar.nl:9001/sigfox/uplink
- Use HTTP method: POST
- Headers: -
- Content-type: application/json
- Body:
{ "device":"{device}", "time":{time}, "data":"{data}", "seqNumber":{seqNumber}, "deviceTypeId":"{deviceTypeId}" }
- Add an 'data advanced' callback:
- Type: SERVICE / ADVANCED
- Channel: URL
- URL pattern: http://stofradar.nl:9001/sigfox/advanced
- Use HTTP method: POST
- Headers: -
- Content-type: application/json
- Body:
{ "device": "{device}", "time": {time}, "data": "{data}", "seqNumber": {seqNumber}, "lqi": "{lqi}", "linkQuality": "{linkQuality}", "fixedLat": "{fixedLat}", "fixedLng": "{fixedLng}", "operatorName": "{operatorName}", "countryCode": "{countryCode}", "deviceTypeId": "{deviceTypeId}", "computedLocation": {computedLocation} }
Software
The ST package 'STM32Cube_FW_WL_V1.0.0' has examples for Sigfox: https://www.st.com/en/embedded-software/stm32cubewl.html
In directory XX you can find the following examples:
- Sigfox_AT_Slave
- Sigfox_AT_Slave_DualCore
- Sigfox_PushButton
- Sigfox_PushButton_DualCore
It appears that, typically, you should edit a file sigfox_data.h to enter the sigfox credentials (device id, pac and key)
The Sigfox credentials can be retrieved from a STM32WL chip as follows:
- install STM32 cube programmer (I used v2.8.0)
- connect the STM32WL chip through a STLINK2
- select the sigfox logo in the left of the screen
- there is a button "copy chip certificate" and "open sigfox page" that sends you to https://my.st.com/sfxp
- on that page you can submit the chip certificate data and get a zip in return containing the dev id, pac and key