2

I am using raspeberry pi 0W (Debian) to connect to a specific WiFi network, the problem is that sometimes it connects to other networks (open wifi networks).

I do not want to edit wpa_supplicant.conf every time it discover another network.

I need to set the network and keep this one as the only one RPI would connect.

Any help will be great.

0
2

You can set a special SSID (WiFi network) to the wpa_supplicant.conf:

nano /etc/wpa_supplicant/wpa_supplicant.conf

Add these details of your SSID to that config file like:

network={
    ssid="testing"
    psk="testingPassword"
}  

You can find more about it here.


I do not want to edit wpa_supplicant.conf every time it discover another network.

Add these lines at the end of wpa_supplicant.conf:

network={
    key_mgmt=NONE
    priority=-999
}

You can find more about it here.

2
  • The OP never want to connect to another (open) network so these lines at the end are not needed. – Ingo Feb 7 '20 at 19:37
  • You actually don't need (more precisely: can't use) wpa_supplicant to connect to an unencrypted open wireless network -- which is part of why public wifi providers usually post the password, rather than use no password (WPA requires a password, though WPS can get around that). So you may have to do something with dhcpcd.conf too. – goldilocks Feb 8 '20 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.