Merge pull request #252 from cyberman54/master

sync master to dev
This commit is contained in:
Verkehrsrot 2019-01-28 00:47:01 +01:00 committed by GitHub
commit d257b1dd4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 42 deletions

View File

@ -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`.
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.
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:

View File

@ -1,8 +1,16 @@
#ifndef _BLESCAN_H
#define _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>
void start_BLEscan(void);
void stop_BLEscan(void);

View File

@ -7,6 +7,7 @@
#include <esp_coexist.h> // needed for showing coex sw version
#include "globals.h"
#include "blescan.h"
#include "wifiscan.h"
#include "configmanager.h"
#include "cyclic.h"

View File

@ -42,7 +42,7 @@ keyfile = ota.conf
platform_espressif32 = espressif32@1.6.0
board_build.partitions = min_spiffs.csv
monitor_speed = 115200
lib_deps_lora =
lib_deps_lora =
MCCI LoRaWAN LMIC library@^2.3.1
lib_deps_display =
U8g2@>=2.25.5
@ -55,7 +55,7 @@ lib_deps_rtc =
lib_deps_basic =
ArduinoJson@^5.13.1
Time@>=1.5
lib_deps_all =
lib_deps_all =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
@ -84,10 +84,10 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 115200
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -99,11 +99,11 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 115200
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_rgbled}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -115,11 +115,11 @@ framework = arduino
board = heltec_wifi_lora_32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -131,11 +131,11 @@ framework = arduino
board = heltec_wifi_lora_32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -147,11 +147,11 @@ framework = arduino
board = ttgo-lora32-v1
board_build.partitions = ${common.board_build.partitions}
upload_speed = 115200
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -163,11 +163,11 @@ framework = arduino
board = ttgo-lora32-v1
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -179,11 +179,11 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -195,11 +195,11 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -211,7 +211,7 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
@ -228,12 +228,12 @@ framework = arduino
board = ttgo-t-beam
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_gps}
; ${common.lib_deps_display}
build_flags =
build_flags =
${common.build_flags_all}
-mfix-esp32-psram-cache-issue
upload_protocol = ${common.upload_protocol}
@ -246,11 +246,11 @@ framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_rgbled}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -262,12 +262,12 @@ framework = arduino
board = lopy
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_rgbled}
${common.lib_deps_gps}
build_flags =
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
@ -297,7 +297,7 @@ framework = arduino
board = lolin32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_rgbled}
@ -309,11 +309,11 @@ monitor_speed = ${common.monitor_speed}
[env:lolin32lora]
platform = ${common.platform_espressif32}
framework = arduino
framework = arduino
board = lolin32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_rgbled}
@ -325,11 +325,11 @@ monitor_speed = ${common.monitor_speed}
[env:lolin32lite]
platform = ${common.platform_espressif32}
framework = arduino
framework = arduino
board = lolin32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_rgbled}
build_flags =
@ -352,7 +352,7 @@ monitor_speed = ${common.monitor_speed}
[env:generic]
platform = ${common.platform_espressif32}
framework = arduino
framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
@ -360,4 +360,4 @@ lib_deps = ${common.lib_deps_all}
build_flags = ${common.build_flags_all}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed}
monitor_speed = ${common.monitor_speed}

View File

@ -2,16 +2,7 @@
https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner
*/
// Basic Config
#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>
#include "blescan.h"
#define BT_BD_ADDR_HEX(addr) \
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]