wpa_supplicant: Fix connection
This commit is contained in:
parent
10a7998495
commit
5532457cdf
1 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue