testing
This commit is contained in:
parent
c7fd32068c
commit
5ae8f47b9d
@ -102,7 +102,7 @@ Paxcounter generates identifiers for sniffed MAC adresses and collects them temp
|
|||||||
- Quick blink (20ms on each 1/5 second): joining LoRaWAN network in progress or pending
|
- Quick blink (20ms on each 1/5 second): joining LoRaWAN network in progress or pending
|
||||||
- Small blink (10ms on each 1/2 second): LoRaWAN data transmit in progress or pending
|
- Small blink (10ms on each 1/2 second): LoRaWAN data transmit in progress or pending
|
||||||
- Long blink (200ms on each 2 seconds): LoRaWAN stack error
|
- Long blink (200ms on each 2 seconds): LoRaWAN stack error
|
||||||
- Single long flash (2ec): Known beacon detected
|
- Single long flash (2sec): Known beacon detected
|
||||||
|
|
||||||
**RGB LED:**
|
**RGB LED:**
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||||
[platformio]
|
[platformio]
|
||||||
;env_default = generic
|
;env_default = generic
|
||||||
;env_default = heltec
|
env_default = heltec
|
||||||
;env_default = ttgov1
|
;env_default = ttgov1
|
||||||
;env_default = ttgov2
|
;env_default = ttgov2
|
||||||
;env_default = ttgov21
|
;env_default = ttgov21
|
||||||
env_default = ttgobeam
|
;env_default = ttgobeam
|
||||||
;env_default = lopy
|
;env_default = lopy
|
||||||
;env_default = lopy4
|
;env_default = lopy4
|
||||||
;env_default = fipy
|
;env_default = fipy
|
||||||
@ -27,8 +27,8 @@ env_default = ttgobeam
|
|||||||
description = Paxcounter is a proof-of-concept ESP32 device for metering passenger flows in realtime. It counts how many mobile devices are around.
|
description = Paxcounter is a proof-of-concept ESP32 device for metering passenger flows in realtime. It counts how many mobile devices are around.
|
||||||
|
|
||||||
[common_env_data]
|
[common_env_data]
|
||||||
;platform_espressif32 = espressif32@1.0.2
|
platform_espressif32 = espressif32@1.0.2
|
||||||
platform_espressif32 = espressif32@1.1.2
|
;platform_espressif32 = espressif32@1.1.2
|
||||||
;platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage
|
;platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage
|
||||||
board_build.partitions = no_ota.csv
|
board_build.partitions = no_ota.csv
|
||||||
lib_deps_all =
|
lib_deps_all =
|
||||||
@ -45,8 +45,8 @@ build_flags =
|
|||||||
; otherwise device may crash in dense environments due to serial buffer overflow
|
; otherwise device may crash in dense environments due to serial buffer overflow
|
||||||
;
|
;
|
||||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
|
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO
|
||||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||||
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
||||||
;
|
;
|
||||||
; override lora settings from LMiC library in lmic/config.h and use main.h instead
|
; override lora settings from LMiC library in lmic/config.h and use main.h instead
|
||||||
|
@ -10,6 +10,8 @@ static const char TAG[] = "main";
|
|||||||
|
|
||||||
// do all housekeeping
|
// do all housekeeping
|
||||||
void doHomework() {
|
void doHomework() {
|
||||||
|
static uint64_t uptimecounter;
|
||||||
|
|
||||||
// read battery voltage into global variable
|
// read battery voltage into global variable
|
||||||
#ifdef HAS_BATTERY_PROBE
|
#ifdef HAS_BATTERY_PROBE
|
||||||
batt_voltage = read_voltage();
|
batt_voltage = read_voltage();
|
||||||
@ -37,6 +39,9 @@ void doHomework() {
|
|||||||
reset_counters(); // clear macs container and reset all counters
|
reset_counters(); // clear macs container and reset all counters
|
||||||
reset_salt(); // get new salt for salting hashes
|
reset_salt(); // get new salt for salting hashes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update uptime counter
|
||||||
|
uptimecounter = uptime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkHousekeeping() {
|
void checkHousekeeping() {
|
||||||
|
@ -12,15 +12,16 @@
|
|||||||
// Local logging tag
|
// Local logging tag
|
||||||
static const char TAG[] = "wifi";
|
static const char TAG[] = "wifi";
|
||||||
|
|
||||||
|
/*
|
||||||
static wifi_country_t wifi_country = {WIFI_MY_COUNTRY, WIFI_CHANNEL_MIN,
|
static wifi_country_t wifi_country = {WIFI_MY_COUNTRY, WIFI_CHANNEL_MIN,
|
||||||
WIFI_CHANNEL_MAX, 0,
|
WIFI_CHANNEL_MAX, 0,
|
||||||
WIFI_COUNTRY_POLICY_MANUAL};
|
WIFI_COUNTRY_POLICY_MANUAL};
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
static wifi_country_t wifi_country = {WIFI_MY_COUNTRY, WIFI_CHANNEL_MIN,
|
static wifi_country_t wifi_country = {WIFI_MY_COUNTRY, WIFI_CHANNEL_MIN,
|
||||||
WIFI_CHANNEL_MAX,
|
WIFI_CHANNEL_MAX,
|
||||||
WIFI_COUNTRY_POLICY_MANUAL};
|
WIFI_COUNTRY_POLICY_MANUAL};
|
||||||
*/
|
|
||||||
|
|
||||||
// globals
|
// globals
|
||||||
uint16_t salt;
|
uint16_t salt;
|
||||||
@ -95,6 +96,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
|
|||||||
if (cfg.monitormode) {
|
if (cfg.monitormode) {
|
||||||
beaconID = isBeacon(addr2int);
|
beaconID = isBeacon(addr2int);
|
||||||
if (beaconID) {
|
if (beaconID) {
|
||||||
|
ESP_LOGI(TAG, "Beacon ID#%d detected", beaconID);
|
||||||
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
#if (HAS_LED != NOT_A_PIN) || defined(HAS_RGB_LED)
|
||||||
blink_LED(COLOR_WHITE, 2000);
|
blink_LED(COLOR_WHITE, 2000);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user