wpa_supplicant: Fix connection

This commit is contained in:
nemunaire 2026-01-02 17:54:07 +07:00
commit 5532457cdf

View file

@ -154,11 +154,11 @@ func (b *WPABackend) IsScanning() (bool, error) {
func (b *WPABackend) Connect(ssid, password string) error {
// Create network configuration
config := make(map[string]interface{})
config["ssid"] = fmt.Sprintf("\"%s\"", ssid) // wpa_supplicant expects quoted SSID
config["ssid"] = ssid // Raw SSID string, no quotes
if password != "" {
// For WPA/WPA2-PSK networks
config["psk"] = fmt.Sprintf("\"%s\"", password)
config["psk"] = password // Raw password string, no quotes
} else {
// For open networks
config["key_mgmt"] = "NONE"