Hello!
First time I have a board with onboard wifi and I was wondering whether there is a quick way to set it to connect to a specific wifi network at boot.
I've set up the network adapter section in dietpi-config, but when I reboot it will not automatically connect to the network (it does after I set it manually in dietpi-config, though).
All this on an OPi Zero, if this helps.
Thanks.
Connect to Wifi network automatically at boot
Re: Connect to Wifi network automatically at boot
Hi,Sciamano wrote:Hello!
First time I have a board with onboard wifi and I was wondering whether there is a quick way to set it to connect to a specific wifi network at boot.
I've set up the network adapter section in dietpi-config, but when I reboot it will not automatically connect to the network (it does after I set it manually in dietpi-config, though).
All this on an OPi Zero, if this helps.
Thanks.
Yep known issue with OPi Zero currently. Workaround is here:
WiFi: If you experience issues with the WiFi module not loading during boot, please try this workaround: https://github.com/Fourdee/DietPi/issue ... -266006050
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Connect to Wifi network automatically at boot
Fact is I have already applied that workaround...
My problem is not that the board loses the "wifi card" at boot (it does not after using the workaround) but "simply" that it does not autoconnect to my wifi network at boot.
Also, I can't seem to set the country in the wifi settings, it errors out:
My problem is not that the board loses the "wifi card" at boot (it does not after using the workaround) but "simply" that it does not autoconnect to my wifi network at boot.
Code: Select all
root@OPiZero:/etc/samba# systemctl status xradio_wlan.service
● xradio_wlan.service - xradio_wlan
Loaded: loaded (/etc/systemd/system/xradio_wlan.service; enabled)
Active: active (exited) since Thu 2017-02-09 14:57:34 CET; 32min ago
Main PID: 1020 (code=killed, signal=TERM)
CGroup: /system.slice/xradio_wlan.service
Feb 09 14:57:33 OPiZero bash[1020]: Error for wireless request "Set Encode" (8B2A) :
Feb 09 14:57:33 OPiZero bash[1020]: invalid argument "xxxxx".
Feb 09 14:57:34 OPiZero systemd[1]: Started xradio_wlan.
root@OPiZero:/etc/samba#
Code: Select all
Error: Country Code ├───────────────┐
│ │
│ Country code (GB) could not been applied. Please │
│ check the country code and try again.
Re: Connect to Wifi network automatically at boot
OK, I think I've solved... but I think there is something wrong in the dietpi setup in a particular situation. Ill try to explain:
- fresh install of DietPi
- selected "Rome" for the Timezone
- set up wifi workaround
- set up wifi config...
Here comes the problems, because it seems that moving the timezone to Rome caused the locale to be set to it-IT_UTF8.UTF8 even though this had never been installed.
I don't know why but this also caused the wifi country not to be settable.
As soon as I installed the IT_UTF8 locale, everything went back to normal (and it also autoconnect to the wifi network now).
An important question: is there a way to have wifi take precedence over ethernet while still keeping ethernet enabled?
I have noticed that in order to make the Zero autoconnect to the wifi at boot the ethernet card has to be disabled, but it would be much better IMO if one could keep it enabled in order to be able to connect to the board via ethernet in case the wifi connection does not work for any reason.
- fresh install of DietPi
- selected "Rome" for the Timezone
- set up wifi workaround
- set up wifi config...
Here comes the problems, because it seems that moving the timezone to Rome caused the locale to be set to it-IT_UTF8.UTF8 even though this had never been installed.
I don't know why but this also caused the wifi country not to be settable.
As soon as I installed the IT_UTF8 locale, everything went back to normal (and it also autoconnect to the wifi network now).
An important question: is there a way to have wifi take precedence over ethernet while still keeping ethernet enabled?
I have noticed that in order to make the Zero autoconnect to the wifi at boot the ethernet card has to be disabled, but it would be much better IMO if one could keep it enabled in order to be able to connect to the board via ethernet in case the wifi connection does not work for any reason.
Re: Connect to Wifi network automatically at boot
You've probably done this - and it may not fix this problem - but after I upgraded to latest kernel my two OP Zero's have had much more stable wifi connections (one runs DietPi the other Armbian).
John
John
Re: Connect to Wifi network automatically at boot
How do you do that? Thanks.johnvick wrote:You've probably done this - and it may not fix this problem - but after I upgraded to latest kernel my two OP Zero's have had much more stable wifi connections (one runs DietPi the other Armbian).
John
Re: Connect to Wifi network automatically at boot
It was just apt-get update apt-get upgrade
Re: Connect to Wifi network automatically at boot
Oh, OK... I guess I have already done that, then 

Re: Connect to Wifi network automatically at boot
This question is still unanswered:

I think this is an important issue.is there a way to have wifi take precedence over ethernet while still keeping ethernet enabled?
I have noticed that in order to make the Zero autoconnect to the wifi at boot the ethernet card has to be disabled, but it would be much better IMO if one could keep it enabled in order to be able to connect to the board via ethernet in case the wifi connection does not work for any reason.
