network: fix Local Play with NetworkManager/iwd - #3276
alexryndin wants to merge 1 commit into
Conversation
db6d301 to
5ab938c
Compare
|
Thanks for looking at this, the only issue I have is that you have removed wifi.adhoc.channel, so you have effectively made the setting redundant in ES as it still exists in ES. |
|
@spycat88 Thanks, I looked into this more closely. With the iwd backend, NM's AP activation calls iwd's So restoring For consistency I've instead removed the LOCAL NETWORK CHANNEL selector from the frontend (ROCKNIX/emulationstation-next#32, updated) and kept the Local Play ID persistence. If NM/iwd gains real AP channel control later, the option can be restored together with working backend support. |
Summary
Fix Local Play, broken since the NetworkManager migration (beb5d8a):
nmcli device set managed noiwd's own autoconnect re-associates the station, and NM's iwd backend forces Device.Mode back to station on deactivation paths (reset_mode in nm-device-iwd.c). The result isiwctl ap start-profilefailing with "Operation aborted" and NETPLAY_AP never appearing.Rework Local Play to be NetworkManager-native (NM: IP + lifecycle, iwd: 802.11):
connection up, the iwd backend fails activation instantly otherwise.Testing
Tested on two handhelds running the stock 20260901 image with only wifictl replaced: RG353V (RK3566) as host, RG34XX SP (H700) as client.
Additional Context
Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on.)
Known limitation: the AP channel is fixed by iwd (6, 2.4GHz) because NM's iwd AP activation calls
Start(ssid, psk)and does not pass a channel through, and iwd falls back to channel 6 when no profile channel is set (ap_load_config()in iwd's src/ap.c, with an upstream TODO to pick the channel via a survey: https://git.kernel.org/pub/scm/network/wireless/iwd.git/tree/src/ap.c?h=3.10#n3685). The LOCAL NETWORK CHANNEL selector is therefore removed from the frontend (network: persist Local Play ID and drop the unused channel selector emulationstation-next#32).Needs the EmulationStation-side fix that persists the local play ID (network: persist Local Play ID and drop the unused channel selector emulationstation-next#32); without it the ID selection reverts to host, as reported in https://www.reddit.com/r/ANBERNIC/comments/1pednpa/rocknix_multiplayer/
AI Usage
While ROCKNIX doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? YES | PARTIALLY | NO
YES — agent assisted (GLM by z.ai, opencode): root-cause analysis, patch and testing driven by the author