set wifi_init_config NVS flash: disabled

This commit is contained in:
Klaus K Wilting 2018-03-20 22:14:43 +01:00
parent 548a1ce22d
commit daa0b2e58e
3 changed files with 21 additions and 2 deletions

View File

@ -326,9 +326,11 @@ void setup() {
ESP_LOGI(TAG, "Starting %s %s", PROGNAME, PROGVERSION);
/*
tcpip_adapter_init(); // not sure if necessary, but seems needed for TTGOv1
// ESP Event Loop
esp_event_loop_init(NULL, NULL); // not sure if necessary -> to be checked
*/
// Print chip information on startup
#ifdef VERBOSE

View File

@ -1,5 +1,5 @@
// program version
#define PROGVERSION "1.2.1" // use max 10 chars here!
#define PROGVERSION "1.2.2" // use max 10 chars here!
#define PROGNAME "PAXCNT"
// Verbose enables serial output

View File

@ -13,6 +13,23 @@
#include <esp_event.h>
#include <esp_event_loop.h>
#define WIFI_INIT_CONFIG_PAXCOUNTER() { \
.event_handler = &esp_event_send, \
.wpa_crypto_funcs = g_wifi_default_wpa_crypto_funcs, \
.static_rx_buf_num = CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM,\
.dynamic_rx_buf_num = CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM,\
.tx_buf_type = CONFIG_ESP32_WIFI_TX_BUFFER_TYPE,\
.static_tx_buf_num = WIFI_STATIC_TX_BUFFER_NUM,\
.dynamic_tx_buf_num = WIFI_DYNAMIC_TX_BUFFER_NUM,\
.ampdu_rx_enable = WIFI_AMPDU_RX_ENABLED,\
.ampdu_tx_enable = WIFI_AMPDU_TX_ENABLED,\
.nvs_enable = 0,\
.nano_enable = WIFI_NANO_FORMAT_ENABLED,\
.tx_ba_win = WIFI_DEFAULT_TX_BA_WIN,\
.rx_ba_win = WIFI_DEFAULT_RX_BA_WIN,\
.magic = WIFI_INIT_CONFIG_MAGIC\
};
// Local logging tag
static const char *TAG = "wifisniffer";
@ -44,7 +61,7 @@ typedef struct {
} wifi_ieee80211_packet_t;
void wifi_sniffer_init(void) {
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_PAXCOUNTER();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_country(&wifi_country) );
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );