-
Notifications
You must be signed in to change notification settings - Fork 17
Refactor packet parsing, fix issues #22/#32/#33, and modernize dependencies #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
davidchatting
merged 17 commits into
davidchatting:master
from
davidchatting-bot:refactor-packet-parsing
Feb 9, 2026
Merged
Refactor packet parsing, fix issues #22/#32/#33, and modernize dependencies #37
davidchatting
merged 17 commits into
davidchatting:master
from
davidchatting-bot:refactor-packet-parsing
Feb 9, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define control frame subtypes (wifi_ctrl_subtypes_t), data frame subtypes (wifi_data_subtypes_t), ToDS/FromDS direction constants, and dedicated C structs for management, control (RTS, ACK, BAR), and data frame headers. Add Information Element (IE) struct and common IE ID constants. Change fctl subtype field to unsigned to support all frame types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse IEEE 802.11 management frames (probe requests, beacons, authentication, association, deauthentication) and control frames (RTS, Block Ack, PS-Poll) to extract device MAC addresses and RSSI for proximity detection. Add new PROBE DeviceEvent type. Change PacketSniffer subtype parameter from wifi_mgmt_subtypes_t to int to support all frame types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PlatformIO does not auto-generate function prototypes from .ino files like the Arduino IDE does, so add explicit forward declarations for all callback functions in existing examples. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ProbeDetect demonstrates the new PROBE event for detecting devices via management frames. ProximityZones classifies devices into RSSI- based zones. DeviceFilter shows OUI-based filtering with addActiveDeviceFilter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add library.json for PlatformIO registry compatibility with Arduino-List dependency. Add platformio.ini with ESP32 and ESP8266 environments for building examples with pio ci. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update library.properties version from 1.4 to 2.0.0 with updated description noting management and control frame parsing. Upgrade GitHub Actions workflows from actions/checkout@v2 to v4. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document new management/control frame parsing, PROBE event, new examples, PlatformIO installation, and updated DeviceEvent types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Register ProbeDetect, ProximityZones, and DeviceFilter in the examples array so PlatformIO surfaces them correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse Information Elements in probe request management frames to extract the SSID a device is scanning for. Adds ssid field to Device with setSSID, getSSIDAsString, and hasSSID methods. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse IEEE 802.11 Country Information Element (IE id 7) from beacon and probe response frames originating from the local BSSID, storing the country code and environment character as static members with public getters (getCountryCode, getCountryEnvironment, hasCountryInfo). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ffer Move wifi_mgmt_frame_to_Device, wifi_ctrl_frame_to_Device, wifi_promiscuous_pkt_to_Device, and wifi_csi_info_to_Channel from Approximate into PacketSniffer as parseMgmtFrame, parseCtrlFrame, parseDataFrame, and parseCSI. This separates reusable low-level 802.11 frame parsing from the proximate interaction logic. Extract MAC address conversion utilities (MacAddr_to_eth_addr, eth_addr_to_String, etc.) into free functions in eth_addr.h/cpp. Approximate static methods are kept as thin wrappers for API compatibility. Move countryCode/countryEnvironment storage and localBSSID to PacketSniffer. Device.cpp and Network.cpp now use free functions directly instead of depending on Approximate.h. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow manual triggering of ESP32 and ESP8266 build workflows in addition to push and pull_request events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The latest ESP32 Arduino Core (3.x) removed deprecated tcpip_adapter and esp_event_loop_init APIs. Pin to 2.0.17 which is the last 2.x release compatible with the existing codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use getFrameStart() to skip 4-byte AMPDU delimiter on ESP8266 when the Aggregation flag is set in rx_ctrl. This ensures frame control and MAC addresses are read from the correct offset for HT packets. Remove the arbitrary sig_mode==1 && len>512 type override hack from Approximate::parsePacket() since the type is now correctly determined from the properly-offset frame control field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and decouple ARP scanning from onceWifiStatus callbacks (issue davidchatting#32) Issue davidchatting#33: Replace deprecated tcpip_adapter_init(), esp_event_loop_init(), and tcpip_adapter_dhcpc_start() with esp_netif equivalents in both PacketSniffer.cpp and Approximate.cpp. Remove ESP32 core version pin from CI workflow so it builds against the latest version. Issue davidchatting#32: Move ARP scanning and packet sniffer initialization out of the onceWifiStatus callback mechanism in begin(). Use a beginPending flag handled directly in onWifiStatusChange() so user-registered onceWifiStatus callbacks cannot silently override the initialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
ApproximateintoPacketSnifferand MAC address utilities intoeth_addr.h/cpp. Approximate now only handles proximate interaction logic (ARRIVE/DEPART/SEND/RECEIVE) and delegates all frame parsing to PacketSniffer. Public API unchanged.sig_mode == 1 && len > 512type override hacktcpip_adapterAPI withesp_netifequivalents so the library compiles on modern ESP32 Arduino cores (v2.x and v3.x)onceWifiStatuscallback system so user callbacks can't silently override initializationgetRSSI()return value,isLocal()operator precedence checking wrong bit,isGroup()precedencedavidchatting/Arduino-Listfork to upstreamluisllamasbinaburo/Arduino-List(case-sensitivity fix merged upstream)workflow_dispatchtrigger, remove ESP32 version pin, useListLibviarequired-librariesTest plan
🤖 Generated with Claude Code