commit
d257b1dd4e
@ -144,6 +144,8 @@ You can select different payload formats in [paxcounter.conf](src/paxcounter.con
|
|||||||
|
|
||||||
If you're using [TheThingsNetwork](https://www.thethingsnetwork.org/) (TTN) you may want to use a payload converter. Go to TTN Console - Application - Payload Formats and paste the code example below in tabs Decoder and Converter. This way your MQTT application can parse the fields `pax`, `ble` and `wifi`.
|
If you're using [TheThingsNetwork](https://www.thethingsnetwork.org/) (TTN) you may want to use a payload converter. Go to TTN Console - Application - Payload Formats and paste the code example below in tabs Decoder and Converter. This way your MQTT application can parse the fields `pax`, `ble` and `wifi`.
|
||||||
|
|
||||||
|
To add your device to myDevices Cayenne platform select "Cayenne-LPP" from Lora device list and use the CayenneLPP payload encoder.
|
||||||
|
|
||||||
To track a paxcounter device with on board GPS and at the same time contribute to TTN coverage mapping, you simply activate the [TTNmapper integration](https://www.thethingsnetwork.org/docs/applications/ttnmapper/) in TTN Console. The formats *plain* and *packed* generate the fields `latitude`, `longitude` and `hdop` required by ttnmapper.
|
To track a paxcounter device with on board GPS and at the same time contribute to TTN coverage mapping, you simply activate the [TTNmapper integration](https://www.thethingsnetwork.org/docs/applications/ttnmapper/) in TTN Console. The formats *plain* and *packed* generate the fields `latitude`, `longitude` and `hdop` required by ttnmapper.
|
||||||
|
|
||||||
Hereafter described is the default *plain* format, which uses MSB bit numbering. Under /TTN in this repository you find some ready-to-go decoders which you may copy to your TTN console:
|
Hereafter described is the default *plain* format, which uses MSB bit numbering. Under /TTN in this repository you find some ready-to-go decoders which you may copy to your TTN console:
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
#ifndef _BLESCAN_H
|
#ifndef _BLESCAN_H
|
||||||
#define _BLESCAN_H
|
#define _BLESCAN_H
|
||||||
|
|
||||||
|
#include "globals.h"
|
||||||
#include "macsniff.h"
|
#include "macsniff.h"
|
||||||
|
|
||||||
|
// Bluetooth specific includes
|
||||||
|
#include <esp_bt.h>
|
||||||
|
#include <esp_bt_main.h>
|
||||||
|
#include <esp_gap_ble_api.h>
|
||||||
|
#include <esp_blufi_api.h> // needed for BLE_ADDR types, do not remove
|
||||||
|
#include <esp_coexist.h>
|
||||||
|
|
||||||
void start_BLEscan(void);
|
void start_BLEscan(void);
|
||||||
void stop_BLEscan(void);
|
void stop_BLEscan(void);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <esp_coexist.h> // needed for showing coex sw version
|
#include <esp_coexist.h> // needed for showing coex sw version
|
||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
#include "blescan.h"
|
||||||
#include "wifiscan.h"
|
#include "wifiscan.h"
|
||||||
#include "configmanager.h"
|
#include "configmanager.h"
|
||||||
#include "cyclic.h"
|
#include "cyclic.h"
|
||||||
|
@ -2,16 +2,7 @@
|
|||||||
https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner
|
https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Basic Config
|
#include "blescan.h"
|
||||||
#include "globals.h"
|
|
||||||
#include "macsniff.h"
|
|
||||||
|
|
||||||
// Bluetooth specific includes
|
|
||||||
#include <esp_bt.h>
|
|
||||||
#include <esp_bt_main.h>
|
|
||||||
#include <esp_gap_ble_api.h>
|
|
||||||
#include <esp_blufi_api.h> // needed for BLE_ADDR types, do not remove
|
|
||||||
#include <esp_coexist.h>
|
|
||||||
|
|
||||||
#define BT_BD_ADDR_HEX(addr) \
|
#define BT_BD_ADDR_HEX(addr) \
|
||||||
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
|
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
|
||||||
|
Loading…
Reference in New Issue
Block a user