Sometimes when my pi2 reboots, it wont connect to my wireless router. I have to go and select my network again and manually connect to it by putting the password again.
Before on my pi1 there was a /etc/network/interfaces file where i could manually connect to my network before the pi even boots to kodi.
How can i do this now ? I really dont trust osmc to do this for me…and because the pi is at my parents house, i cant keep going there to fix it.
They look fine to me…but is there a way to force the pi to reconnect to the above settings if there is no connection ?
I dont care if its a crontab or shell script…I just want the pi to autoconnect to the wifi router when it boots up or keep trying if it goes/or is down, because now…if i dont manually connect to it from the GUI, it will never connect on its own.
It will already periodically auto reconnect to a saved wifi network - you shouldn’t need to do anything.
If it doesn’t it’s either because you have ethernet plugged in as well (it won’t auto connect wifi with ethernet plugged in) or there is some connectivity problem that is preventing it getting a connection, such as a driver issue, signal issue or so on.
There is no /etc/network/interfaces support in OSMC at the moment, so don’t waste any time trying to use that.
BTW, Kodi loading is nothing to do with the network coming up - auto reconnection of wifi is handled by connman regardless of whether Kodi is even set to load or not.
Yeah i know, that kodi doesnt have anything to do with it. it just reads the conf files.
I dont have any ethernet cable connected to it. Just wifi. But is there any log file somewhere about the network to see why its failing to connect ? No matter how long i wait it wont autoconnect…I have to do it manually.
The router is literally 3m away, so its not a signal problem, and the wifi dongle was working fine with p1. Autoconnect and everything.
I do have an ethernet folder in my connman folder settings…But thats for when i bring the pi to my pc to do some stuff.
Should i delete it and just leave the wifi folder ? Does it matter ?
The settings file does have ethernet disabled.
The only place you’re likely to see log entries pertaining to auto connect are in the system journal and/or dmesg - upload those if you can so we can have a look.
It is there, are you sure your install is up to date ? Here is what you should have:
Preferred technologies sets the order of preference when multiple devices are attached - we set Ethernet to have higher priority, but wireless will auto connect if Ethernet is not plugged in.
Yeah ok, i have /etc/connman.conf and its exactly in that order you copy/pasted here. I was looking for it in the connman folder.
I did 2 reboots now. In the first one the pi didnt connect. I tried to connect through the GUI and it wouldnt connect after i set my password. I tried disabling and reenabling the adapter and got the same thing…so i thought of going to the console and do a manual connect there…but by the time i openen a console and go through connman to manually connect, i saw that it had already connected to the net…so i went back to kodi and did a reboot again.
The second time it connected immediately. When i was back in kodi it was already connected to the wifi.
I saved both journal files…one during my failed attempts to connect from the GUI and a clean one after the 2nd reboot.
I only kept the 2nd dmesg log though…dont know if that helps