Wi-Fi auto connect after boot

I am very happy that Wi-Fi ac is working now in beta 4, and it works stable. After every boot up, I click on my Wi-Fi network and connect to it. I wonder if there is a way to auto connect to my home Wi-Fi. Just for convenience.

1 Like

This is a known bug. It works under some circumstances, but as far as I know the cause of the problem hasn’t been found yet.

See #10162 (WIFI doesn't automatically connect) – Haiku for details

1 Like

Most of the times, it works for me.
Once you have successfully connected once, i.e. the your password was accepted and added to Haiku’s keystore keyring, you can try two things:

  1. create the text file /boot/system/settings/network/wireless_networks manually (which AFAIK should have been created when selecting your wifi from the Network preferences, but maybe wasn’t).
    In it, you enter: network SSDNameOfYourWifi

  2. If that doesn’t work (after a few reboots) try to put this line into your /boot/home/config/settings/boot/UserBootscript:

    ifconfig /dev/net/iprowifi4965/0 join SSDNameOfYourWifi YourSecretPassword

Worth a try. Good luck.

6 Likes

Sadly none of that works. I used my Wi-Fi card “idualwifi7260/0” but nothing happens after a reboot. I have to connect manually.
It’s not a big problem, just a try. Thank you.

1 Like

Just like you none of the above mentioned by humdinger worked for me, so i tried the following and it worked.
Create the dir /system/non-packaged/data/user_launch.
And copy and paste this text to a file

job ifconfig {
	launch /bin/ifconfig /dev/net/YOURCARDNAME/0 join SSDNAME PASSWD
	legacy
	requires x-vnd.Be-TSKB
}

save the file and name it for example “ifconfig” then put it in that newly create directory, this worked for me.
Don’t forget to change YOURCARDNAME with your actuall card name and PASSWD with yours and remove the file /boot/system/settings/network/wireless_networks, because it interferes when connectig this way, hope it’ll help you.

2 Likes

@khallebal thank you for this tip. But this does not work either for me.

same for me :frowning:

Following humdinger’s directions, if you have tried and the network does not come up, it could be that your network card is still initializing. Try this in the UserBootscript:

( sleep 10; /bin/ifconfig /dev/net/YourWirelessDevice/0 join SSDNameOfYourWifi YourSecretPassword ) &

Choose the sleep in 10 second increments like… 10, 20, 30, etc…

4 Likes

I have the same “problem” with my system. Not a major but a bit irritating. When I select my network id it works 100% of the time (since beta 4) and the connection is stable once connected. Have tried with two different PCI cards, same result.

It seems that the interface must be set up before call join.
If I add the up command before join one, the network dialog for SSID popups at boot with params from join command (SSID and password), but the field security is set to none :-/ so i have to select WPA and click OK…
Is there any option to “ifconfig join” to set the WLAN security mode ?

This work for me… thank you :slight_smile:

1 Like

Now it works - for short time.
It connects but after a few minutes the connection is lost and new connection cannot be established. I deleted this command and connect manually. It works stable again.
Weird…

2 Likes

Mhhhm. Now it seems to work. Very nice. :smile:

1 Like

Updating the userbootscript with the sleep included was a success. It now connects automatically on boot. Many thanks! :slight_smile:

2 Likes

mbrumbelow’s solution with the sleep addition in the /boot/home/config/settings/boot/UserBootscript file is working perfectly for me.
Thank you !

1 Like

works here also, thanks! :metal:

This almost works for me, and I use it for a long time already. However, it doesn’t really auto connect. Instead, each time the system is booted it shows the “Connect to a WiFi network” dialog, with the network name and password already set correctly, but Authenication is set to “Open”. So I have to manually choose “WPA/WPA2” authentication and press Enter to connect.

Nothing serious, just a minor annoyance. Is there any way to fix this? As far I can tell you can only set network name and password with ifconfig. I don’t see how you can set authentication as well, as the syntax is

ifconfig /dev/net/iprowifi4965/0 join <network> [<password>]

But I might be missing something here.

3 Likes

FWIW, auto-connecting has been working for me for quite some time now (with a iprowifi4965). If it doesn’t auto-connect on start-up something is wrong with my network in general and it’ll work after a reboot.
Maybe try without the ifconfig command; it may be fixed for you too.

Not sure how you could debug the issue.

  • Have a look if there’s a keyring named “wpa_supplicant” in /boot/home/config/settings/system/keystore/keystore_database. You can check with th “message” command in Terminal or get the app “Kottan” to show the flattened BMessage.
  • See if /boot/system/settings/network/wireless_networks has your SSID listed.

Maybe try deleting those files and manually connect and press “Always allow” in the wpa_supplicant window to save the keyring anew, and see if the wireless_networks file has your SSID now?
I dunno…

1 Like

Mine doesn’t auto-connect either.

It does have the entry in the keyring, but does not have this file.

Thanks for the pointers; I’ll poke at this before I reboot next.

I have to manually restart my laptop everytime just to get WiFi working it annoying and it be resetting all my progress on web search