Files
esp-idf/examples/network/simple_sniffer/main/Kconfig.projbuild
glmfe b4d7ede1c3 fix(network): Fix Sniffer Build with SD Card
- Added sdkConfig to cover all available SoC's
 - Defaults to the official devkit with Micro SD Card Available (ESP32 ESP-WROVER-KIT)
2025-11-12 23:05:19 -03:00

122 lines
4.2 KiB
Plaintext

menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config SNIFFER_STORE_HISTORY
bool "Store command history into flash"
default y
help
Linenoise line editing library provides functions to save and load command history.
If this option is enabled, initializes a FAT filesystem and uses it to store command history.
choice SNIFFER_PCAP_DESTINATION
prompt "Select destination to store pcap file"
default SNIFFER_PCAP_DESTINATION_SD
help
Select where to store the pcap file.
Currently support storing files to SD card or to host via JTAG interface with 'Trace memory' enabled.
config SNIFFER_PCAP_DESTINATION_SD
bool "SD Card"
help
Store pcap file to SD card.
config SNIFFER_PCAP_DESTINATION_JTAG
bool "JTAG (App Trace)"
depends on APPTRACE_DEST_JTAG
help
Store pcap file to host via JTAG interface.
config SNIFFER_PCAP_DESTINATION_MEMORY
bool "Memory"
help
Store pcap file to memory.
endchoice
if SNIFFER_PCAP_DESTINATION_SD
choice SNIFFER_SD_MODE
prompt "Select SD card work mode"
default SNIFFER_SD_SDMMC_MODE
help
Select which peripheral SD card should use.
config SNIFFER_SD_SDMMC_MODE
bool "SDMMC"
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3
help
Use SDMMC mode (Not support on esp32c3).
config SNIFFER_SD_SPI_MODE
bool "SPI"
help
Use SPI mode.
endchoice
menu "SD card pin configuration (SPI)"
depends on SNIFFER_SD_SPI_MODE
config SNIFFER_PIN_MOSI
int "MOSI GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 15
help
GPIO pin number for SPI MOSI (Master Out Slave In).
config SNIFFER_PIN_MISO
int "MISO GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
default 2
help
GPIO pin number for SPI MISO (Master In Slave Out).
config SNIFFER_PIN_CLK
int "CLK GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 14
help
GPIO pin number for SPI Clock.
config SNIFFER_PIN_CS
int "CS GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 13
help
GPIO pin number for SPI Chip Select.
endmenu
config SNIFFER_MOUNT_POINT
string "SD card mount point in the filesystem"
default "/sdcard"
help
Specify the mount point in the VFS (Virtual File System) for SD card.
config SNIFFER_PCAP_FILE_NAME_MAX_LEN
int "Max name length of pcap file"
default 32
help
Specify maximum name length of pcap file.
endif
if SNIFFER_PCAP_DESTINATION_MEMORY
config SNIFFER_PCAP_MEMORY_SIZE
int "Memory size of the '.pcap' file in memory"
default 4096
help
Max memory size to storage packet in memory.
endif
config SNIFFER_WORK_QUEUE_LEN
int "Length of sniffer work queue"
default 128
help
The sniffer callback function should not do heavy work, so we put all heavy IO operation to another task.
The task gets some basic info of sniffer packet via queue.
Here you should specify the length of queue.
config SNIFFER_TASK_STACK_SIZE
int "Stack size of sniffer task"
default 4096
help
Stack size of sniffer task.
config SNIFFER_TASK_PRIORITY
int "Priority of sniffer task"
default 2
help
Priority of sniffer task.
endmenu