feat: Unified Ethernet interface with settings manager and web UI#201
feat: Unified Ethernet interface with settings manager and web UI#201craigmillard86 wants to merge 1 commit intoCarlosDerSeher:developfrom
Conversation
|
Have added this PR to verify the move from the unified-ethernet branch based on master to a new one based on Develop. |
|
I have double checked and do not believe there are any other cross overs remaining to other features. @luar123 do you agree this looks clean now? |
There was a problem hiding this comment.
Pull request overview
This pull request implements a unified network interface system with automatic Ethernet/WiFi handover, static IP configuration support, and playback-aware network switching to prevent audio disruptions.
Changes:
- Added network event coordination system using FreeRTOS EventGroups to synchronize interface switching with playback state
- Implemented Ethernet configuration (DHCP/Static IP) with settings persistence in NVS and web UI controls
- Enhanced network selection logic with Ethernet priority, automatic fallback to WiFi, and reconnect handling
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| main/main.c | Implements Ethernet/WiFi priority selection, reconnect checks at multiple points in connection loop, and moves player settings notification before chunk insertion |
| components/ui_http_server/ui_http_server.c | Adds HTTP handlers for Ethernet settings (GET/POST/DELETE for eth_mode, static_ip, netmask, gateway, dns) |
| components/ui_http_server/html/index.html | Adds restart device button to navigation bar with confirmation dialog |
| components/ui_http_server/html/general-settings.html | Implements Ethernet configuration UI with mode selection, static IP fields, IPv4 validation, and netmask validation |
| components/ui_http_server/html/dsp-settings.html | Adds initialization call and duplicate parameter update (likely a bug) |
| components/settings_manager/settings_manager.c | Implements NVS storage for Ethernet settings with IPv4 validation, includes get/set/clear functions for all Ethernet parameters |
| components/settings_manager/include/settings_manager.h | Declares public API for Ethernet settings management |
| components/network_interface/wifi_interface.c | Adds include for private network interface header |
| components/network_interface/priv_include/network_interface_priv.h | Defines private inter-component functions for event coordination and playback state checking |
| components/network_interface/network_interface.c | Implements FreeRTOS EventGroup-based coordination for reconnect requests and playback state signaling, adds network_has_ip() function |
| components/network_interface/include/network_interface.h | Declares public API for network events, playback coordination, and IP checking |
| components/network_interface/eth_interface.c | Major rewrite implementing static IP configuration with gateway ping verification, Ethernet takeover state machine with playback awareness, auto-disable on init failure, and background task for non-blocking IP configuration |
| components/network_interface/CMakeLists.txt | Conditionally includes Ethernet source and ping dependency only when Ethernet is enabled |
| components/lightsnapcast/player.c | Adds playback state notifications to network layer, implements shutdown guard to prevent restart during cleanup, adds chkInFrames validation |
| components/lightsnapcast/CMakeLists.txt | Adds network_interface to component dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
player and main look ok now, thanks. Did not look into the other files and can't judge the network parts, maybe @anabolyc could have a look at the settings/ui part? |
97deb5d to
9878098
Compare
9878098 to
1cc2a85
Compare
|
Resolved the copilot issues and squashed the changes. |
Add unified network interface with Ethernet/WiFi handover and playback coordination
Add settings manager with Ethernet configuration (DHCP/Static IP)
Add web UI for network with restart capability
Integrate network layer with player for playback coordination