fix: use base64 BWIFI for WiFi credential provisioning#1745
fix: use base64 BWIFI for WiFi credential provisioning#1745JeromeRGero wants to merge 7 commits intoSlimeVR:mainfrom
Conversation
SSIDs containing non-alphanumeric characters (periods, hyphens, etc.) fail to connect when sent via the plain-text SET WIFI serial command. The firmware already supports SET BWIFI which accepts base64-encoded SSID and password, eliminating all parsing issues. This change switches both the desktop and Android serial handlers to use it.
server/android/src/main/java/dev/slimevr/android/serial/AndroidSerialHandler.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/serial/DesktopSerialHandler.kt
Outdated
Show resolved
Hide resolved
server/desktop/src/main/java/dev/slimevr/desktop/serial/DesktopSerialHandler.kt
Outdated
Show resolved
Hide resolved
server/android/src/main/java/dev/slimevr/android/serial/AndroidSerialHandler.kt
Outdated
Show resolved
Hide resolved
|
Forgot to mention in my review, this would put a minimum tracker firmware version for serial of at least firmware v0.4.0, as that's when the BWIFI command was added. We could possibly add a fallback for the older one? But idk, it's been over 2 years and we have automatic updates now... It's probably fine; we just need to consider that when merging this. |
…dSerialHandler.kt Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
…pSerialHandler.kt Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
…pSerialHandler.kt Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
…dSerialHandler.kt Co-authored-by: Butterscotch! <bscotchvanilla@gmail.com>
server/desktop/src/main/java/dev/slimevr/desktop/serial/DesktopSerialHandler.kt
Outdated
Show resolved
Hide resolved
ButterscotchV
left a comment
There was a problem hiding this comment.
Looks good, thanks for the PR! This was meant to happen a long while ago when BWIFI was added to firmware, but it seems to have been lost to time.
Re-iterating to make it clear, this will set the minimum firmware version for setting WiFi through the server to be at least v0.4.0.
|
Can we parse the response and use a different command if it's unknown command? |
I think that would come down to either parsing the serial response for the unrecognized command error and falling back to 'SET WIFI', or checking the firmware version before sending and picking the command. Version checking is probably the cleaner approach since setWifi is fire-and-forget. |
SSIDs containing non-alphanumeric characters (periods, hyphens, etc.) fail to connect when sent via the plain-text SET WIFI serial command.
The firmware already supports SET BWIFI which accepts base64-encoded SSID and password, eliminating all parsing issues. This change switches both the desktop and Android serial handlers to use it.