Commit Graph

163 Commits

Author SHA1 Message Date
Robert McMahon c73e694b9a Add MAC filter, histograms, and enhanced debug logging to ESP32 monitor
- Add MAC address filter for debug logging (monitor filter command)
- Add histograms for AMPDU aggregation, MCS distribution, and spatial streams
- Display RA (Receiver Address) in data frame debug logs alongside TA
- Add periodic diagnostic summary (every 10s) showing data frame stats
- Add filtered frame diagnostic logging when filter is active
- Fix MCS extraction to properly cap values based on HT/VHT/HE standards
- Add esp_timer dependency to wifi_monitor component
- Display frame type breakdown and histograms in monitor status
- Show debug and filter status in monitor status output

These changes help debug WiFi traffic by filtering on specific MAC addresses
and providing detailed statistics about frame characteristics.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 16:38:21 -08:00
Robert McMahon 8ba4bff040 Add Raspberry Pi 5 monitor mode scripts for RA/TA capture
- Add rpi_monitor_setup.sh: Basic monitor mode setup script
- Add rpi_capture_ra_ta.sh: Bash script for capturing RA/TA addresses
- Add rpi_capture_ra_ta_python.py: Python script using scapy for detailed 802.11 frame parsing
- Add RPI_MONITOR_GUIDE.md: Comprehensive guide for monitor mode setup and usage
- Add RPI_INSTALL_SCAPY.md: Installation instructions for scapy on Raspberry Pi

These scripts help debug WiFi traffic by capturing and displaying Receiver Address (RA) and Transmitter Address (TA) from 802.11 frames, useful for comparing with ESP32 monitor mode captures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 16:37:48 -08:00
Robert McMahon bb6bd568ce Add channel frequency display to monitor status
- Display channel number, frequency (MHz), width, and center frequency
- Format: 'Channel: 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz'
- Supports both 2.4GHz (channels 1-14) and 5GHz (channels 36-177)
- Use PRIu32 format specifier for portable uint32_t formatting

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 10:50:16 -08:00
Robert McMahon 0311ad21a1 Fix telemetry dropped counter and improve SD card list display
- Fix dropped telemetry calculation to account for bytes in batch buffer
- Add human-readable file sizes to sdcard list output (bytes with human-readable in parentheses)
- Update monitor status to show SD card status inline with telemetry label
- Add pending bytes display when telemetry is in batch buffer

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 10:05:13 -08:00
Robert McMahon 6d1dfe4da6 README: use absolute Gitea blob URLs for documentation links
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 21:54:16 -08:00
Robert McMahon c85a0f4c10 README: use explicit relative paths (./doc/) for Gitea compatibility
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 21:52:57 -08:00
Robert McMahon 55f613c492 README: expand app_console project structure with individual cmd_* files
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 21:46:38 -08:00
Robert McMahon 0b8c3ae03a README: document SD card commands, fiwi-telemetry, and telemetry capture workflow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 21:42:44 -08:00
Robert McMahon 74eb6cb553 Fix telemetry: snprintf truncation, open/write for SD, append NDJSON, capture LED
- mcs_telemetry: fix snprintf truncation in to_json (advance offset by actual
  bytes written, reserve tail for closing brackets)
- sd_card: use open/write/close instead of fwrite to bypass stdio buffering
- wifi_controller: append telemetry as NDJSON (one object per line)
- status_led: blink blue only when frames captured in monitor mode

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 21:39:57 -08:00
Robert McMahon 2b7ef9cb19 README: add SD card commands, project structure, doc links
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:49:50 -08:00
Robert McMahon 8acd9ba9c0 Rename to Wi-Fi Telemetry Capture, add SD card to README
- README: title Wi-Fi Telemetry Capture, add SD card feature
- Doc scenarios and GPS guide: Wi-Fi telemetry capture wording

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:46:31 -08:00
Robert McMahon cf7748960f TELEMETRY_CAPTURE: Option B requires no device interaction
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:37:42 -08:00
Robert McMahon 07b3283518 Add doc/TELEMETRY_CAPTURE.md: how to enable and capture telemetry
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:31:47 -08:00
Robert McMahon 1eb04acd25 Add HTTP/serial file transfer, broadcast beacon, SD telemetry
- HTTP server on port 8080: GET /sdcard/<path> for SD file download
- Serial: sdcard send <file> streams hex-encoded; tools/sdcard_recv.py receives
- Broadcast beacon (UDP 5555): advertise IP, MAC, fiwi-telemetry for discovery
- tools/beacon_listen.py: listen and optionally download fiwi-telemetry per device
- SD commands: list, send, delete; status shows fiwi-telemetry and telemetry-status
- Monitor start: MCS telemetry -> fiwi-telemetry on SD by default (every 10s)
- telemetry-status on SD: persist download stats across reboots
- Kconfig: BEACON_INTERVAL_SEC, TELEMETRY_AUTO_DELETE_AFTER_DOWNLOAD

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 12:30:04 -08:00
Robert McMahon a4e81c9852 SD card (SPI + CD), GPS PPS polarity/diagnostics, wiring docs
- Add sd_card component: SPI mode for ESP32-C5, optional CD (GPIO -1 to disable)
- Add sdcard console command; CD shift fix for CONFIG_SD_CD_GPIO=-1
- GPS: pps_active_low support, gps pps-test / pps-scan console commands
- board_config: ESP32-C5 SD pins (7,8,9,10,26), GPS PPS polarity
- doc/SD_CARD_WIRING.md, doc/GPS_WIRING.md: pin diagrams, Y-cable power note
- sdkconfig.defaults.esp32c5: SD CD GPIO 26
- php/mcs_fiwi.php: Fi-Wi demo page

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 11:42:03 -08:00
Robert McMahon 4ff7ed53b1 update README 2025-12-31 08:17:35 -08:00
Robert McMahon 0e514cbbda Fix documentation links: convert inline doc references to proper markdown links 2025-12-28 18:04:11 -08:00
Robert McMahon 2118556fbd Add note that get_idf must be run before all idf.py commands 2025-12-28 18:00:13 -08:00
Robert McMahon e0c9dc5f2a Add ESP-IDF v6 setup instructions with get_idf() function 2025-12-28 17:58:12 -08:00
Robert McMahon 2275dced88 Add USB port mapping instructions to README.md
- Introduced a new section detailing the `gen_udev_rules.py` script for stable USB port mapping.
- Explained features, usage, and installation steps for generated udev rules to ensure consistent device identification across reboots.
2025-12-28 17:54:00 -08:00
Robert McMahon bed4c3f5f5 Fix README: use --start-ip instead of --target-ip in deployment example 2025-12-28 17:50:54 -08:00
Robert McMahon 78bc0effc4 Move README.md to root and update with comprehensive project documentation 2025-12-27 19:47:20 -08:00
Robert McMahon c58e70a658 Fix strncpy warnings and remove duplicate license headers
- Fix stringop-truncation warnings in wifi_cfg.c and cmd_wifi.c
- Remove duplicate license headers from multiple source files
- Update dependencies.lock
2025-12-27 19:38:23 -08:00
Robert McMahon a303b7171a Enhance error handling and logging in WiFi connection process
- Added error checks in wifi_do_connect to handle potential failures during connection attempts.
- Improved logging to provide clearer insights into connection status and errors for better debugging.
2025-12-27 19:35:25 -08:00
Robert McMahon 1eddb8e84f Refactor file headers and clean up comments in multiple source files
- Updated file headers in iperf.c to include trip-time support in the brief description.
- Removed unnecessary comment blocks in cmd_ip.c, cmd_nvs.c, app_console.c, and wifi_cfg.c to streamline the codebase.
2025-12-27 19:34:21 -08:00
Robert McMahon 56ea987f75 Improve WiFi configuration handling by ensuring proper string termination
- Updated strncpy calls in wifi_cfg_apply_from_nvs and wifi_do_connect to prevent buffer overflows by reserving space for null termination.
- Added explicit null termination for SSID and password fields in the wifi_config_t structure.
2025-12-27 18:00:19 -08:00
Robert McMahon 128596bd67 Clean up repository and improve console initialization
- Remove Emacs backup files (cmd_ip.c~, cmd_wifi.c~)
- Add new_rules.part to .gitignore (temp file used by gen_udev_rules.py)
- Update version to 2.1.0-CONSOLE-DEBUG for debugging
- Add debug logging around console REPL initialization
- Improve error handling for console initialization failures
- Remove unreachable code after esp_console_start_repl()
2025-12-27 17:56:46 -08:00
Robert McMahon d4cd861b80 Add error handling for UART and GPIO configurations in gps_sync_init
- Implemented error checks for uart_driver_install, uart_set_pin, gpio_config, gpio_install_isr_service, and gpio_isr_handler_add to ensure robust initialization of GPS synchronization components.
- Enhanced logging to provide detailed error messages for easier debugging.
2025-12-27 17:07:45 -08:00
Robert McMahon feb0d4d142 Remove deprecated Python scripts and clean up repository
- Removed 13 deprecated deployment/configuration scripts superseded by esp32_deploy.py:
  * flash_all.py, flash_all_parallel.py, flash_all_serial_config.py
  * flash_and_config.py, mass_deploy.py, async_mass_deploy.py
  * async_batch_config.py, batch_config.py, config_device.py
  * esp32_reconfig.py, reconfig_simple.py, reconfig_simple_nextip.py
  * map_usb_to_ip.py

- Updated .gitignore to exclude:
  * Emacs backup files (#filename#)
  * firmware/ directory and flash_args_* build artifacts

- Repository now contains only active scripts:
  * esp32_deploy.py (main unified deployment tool)
  * detect_esp32.py, control_iperf.py, parse_csi.py
  * add_license.py, gen_udev_rules.py, identiy_port.py
  * async_find_failed.py (diagnostic utility)
2025-12-27 16:42:09 -08:00
Robert McMahon 4ed4391068 final fixes for commands 2025-12-22 16:57:51 -08:00
Robert McMahon 2590a96b15 fix led so it works now 2025-12-22 15:52:02 -08:00
Robert McMahon 98b013569d some led work 2025-12-22 15:19:10 -08:00
Robert McMahon 64446be628 more cmd stuff 2025-12-22 15:00:54 -08:00
Robert McMahon b769dbc356 more on gps time 2025-12-22 13:06:05 -08:00
Robert McMahon 9974174d5b use sub commands for iperf major command 2025-12-22 12:27:12 -08:00
Robert McMahon b4b40de64d wifi connect without requiring reboot 2025-12-22 11:55:20 -08:00
Robert McMahon 099c28f9c7 wifi scan 2025-12-21 18:54:18 -08:00
Robert McMahon 42905200ea more on commands 2025-12-21 15:54:30 -08:00
Robert McMahon 6c214e8e92 udp with trip-times 2025-12-20 18:35:06 -08:00
Robert McMahon 969abb5ae4 update license 2025-12-19 18:13:49 -08:00
Robert McMahon 2a41edf491 add bssid to scan output 2025-12-19 18:10:02 -08:00
Robert McMahon 46f0cdb07b add ping support 2025-12-19 17:46:31 -08:00
Robert McMahon e8f7e2f75c more on gps 2025-12-19 14:50:06 -08:00
Robert McMahon 1b78440309 gps --status command 2025-12-19 14:46:24 -08:00
Robert McMahon 88a585408a add gps to nvs 2025-12-19 14:30:29 -08:00
Robert McMahon e5baa7cec5 fix gps sync 2025-12-19 12:10:35 -08:00
Robert McMahon 3969c5780d nvs saves 2025-12-19 10:36:10 -08:00
Robert McMahon ca8b382a40 more on console 2025-12-19 10:21:08 -08:00
Robert McMahon 0f1c5b3079 more on console 2025-12-19 10:12:32 -08:00
Robert McMahon 796ef43497 more command & console work, including save and reload 2025-12-18 21:43:18 -08:00