Option to switch off wifi sniffing
This commit is contained in:
parent
ae0ffe2273
commit
77e795dbf8
16
src/main.cpp
16
src/main.cpp
@ -346,9 +346,8 @@ void setup() {
|
||||
strcat_P(features, " IF482");
|
||||
#endif
|
||||
|
||||
// show compiled features
|
||||
ESP_LOGI(TAG, "Features:%s", features);
|
||||
|
||||
#if (WIFICOUNTER)
|
||||
strcat_P(features, " WIFI");
|
||||
// start wifi in monitor mode and start channel rotation timer
|
||||
ESP_LOGI(TAG, "Starting Wifi...");
|
||||
wifi_sniffer_init();
|
||||
@ -356,6 +355,15 @@ void setup() {
|
||||
// arduino-esp32 core. Note: do this *after* wifi has started, since
|
||||
// function gets it's seed from RF noise
|
||||
get_salt(); // get new 16bit for salting hashes
|
||||
#else
|
||||
// switch off wifi
|
||||
WiFi.mode(WIFI_OFF);
|
||||
esp_wifi_stop();
|
||||
esp_wifi_deinit();
|
||||
#endif
|
||||
|
||||
// show compiled features
|
||||
ESP_LOGI(TAG, "Features:%s", features);
|
||||
|
||||
// start state machine
|
||||
ESP_LOGI(TAG, "Starting Interrupt Handler...");
|
||||
@ -401,7 +409,9 @@ void setup() {
|
||||
#endif
|
||||
|
||||
// cyclic function interrupts
|
||||
#if (WIFICOUNTER) || (BLECOUNTER)
|
||||
sendcycler.attach(SENDCYCLE * 2, sendcycle);
|
||||
#endif
|
||||
housekeeper.attach(HOMECYCLE, housekeeping);
|
||||
|
||||
// button interrupt
|
||||
|
@ -13,9 +13,10 @@
|
||||
#define SENDCYCLE 30 // payload send cycle [seconds/2], 0 .. 255
|
||||
#define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=Cayenne LPP dynamic, 4=Cayenne LPP packed
|
||||
|
||||
// Set this to include BLE counting and vendor filter functions
|
||||
// Set this to include BLE counting and vendor filter functions, or to switch off WIFI counting
|
||||
#define VENDORFILTER 1 // set to 0 if you want to count things, not people
|
||||
#define BLECOUNTER 0 // set it to 1 if you want to use BLE count, at expense of memory
|
||||
#define BLECOUNTER 0 // set it to 1 if you want to use BLE count, at expense of power & memory
|
||||
#define WIFICOUNTER 0 // set it to 0 if you want to switch off WIFI count
|
||||
|
||||
// BLE scan parameters
|
||||
#define BLESCANTIME 0 // [seconds] scan duration, 0 means infinite [default], see note below
|
||||
|
Loading…
Reference in New Issue
Block a user