Jump to content

Orange Pi Zero Plus WiFi looses connection (tip!)


HansC

Recommended Posts

I had an annoying issue with the WiFi of this board with Armbian 5.65 Ubuntu and Stretch. Sometimes it would spontaneous lose its WiFi connection.

After researching it for a while I noticed that the wlan0 interface sometimes lost it's IP address. At first I thought it had something to do with the DHCP lease or sleep mode of the adapter.

I just couldn't get my head around it and I ended up removing network-manager and going back to creating an interfaces.conf file for setting up my network interfaces.

Somehow this solved the issue, the WiFi connection hasn't failed since!

 

To do this, first create the wpa supplicant configuration file:


~# wpa_passphrase "YOUR_SSID" "YOUR_SUPER_SECRET_WPA_KEY" > /etc/wpa_supplicant.conf

 

This creates a wpa_supplicant.conf file that looks like this:

 

network={
    ssid="YOUR_SSID"
    #psk="YOUR_SUPER_SECRET_WPA_KEY" <- YOU SHOULD REMOVE THIS COMMENT!!
    psk=A_VERY_LONG_HASH_OF_YOUR_SECRET_KEY
}


Than create an /etc/network/interfaces file that is suitable for your network like this example:

 

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

# With a DHCP address
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

# Or with a static IP address
allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

# (Cloudflare Secure DNS, another tip ;-)
dns-nameservers 1.1.1.1 

 

After this you need to remove networkmanager:

 

~# apt remove network-manager

and after rebooting your device you should be able to connect to it.

 

Edited by Tido
added code-box
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines