SSH to add wifi

Is there a way to pre-add some Wifi SSIDs and passwords via SSH? I take my Odroid with me when I travel and I’ve wound up having an issue where no remotes worked and I couldn’t use my phone wifi remote because I couldn’t get onto the system to tell it the wifi info.

So is there a way to pre-add some of it now before I travel so that, once I get to my destination, the wifi will already be known by Coreelec and automatically connect? Thanks.

Hey, have a look in /storage/.cache/connman, all the network definitions go there, and you can prepare one yourself. It’s not trivial as you apparently need to know the network IDs beforehand…

Another approach I used is to use a WiFi hotspot on my phone that the device knows.

Thanks. I tried the hotspot method but you need a second device as well to use as a remote control since my phone (Android) can’t be both a hotspot and connected to a Wifi network at the same time.

I was trying to think of a way to take my Odroid everywhere with just my phone but I can’t see how to do it. Is there a way to have Correlec load remote codes from every manufacturer? That might also work, but I couldn’t figure out how to do that last time and I tried like 5 different IR remotes and 2 more modern remotes that I think used CEC but none of them worked and it was very difficult to use the Odroid on the go so I was trying to figure out a solution for next time I travel.

When your phone is a hotspot, you should be able to use it as a remote just fine. Use ip neighbor to see what IP did the Odroid get and connect to that with the Kore remote. Even more, you should be able to ssh into it to scan for wifi networks that you would then be able to prepare a connman config for.

Why not bring a known-working remote with you, BTW? No device can have codes for all the remotes out there, there’s loads of them and they are bound to conflict.

Conflicting ir codes is the very reason that we can’t just enable all remote codes by default.

If you don’t want to travel with a large remote, you can get a small keychain ir remote for $2, and configure that on the odroid. That way you always have a remote with you, that can work well enough to setup the wifi where ever you are.

Thanks. I guess I’m trying to avoid bringing an actual remote because it’s bulky and between the Odroid, power supply, and HDMI cable that’s bulky enough. Keychain remote might do the trick. I also found this thing on Amazon ( that adds IR to your phone so that might do the trick.

The only other thing I could think of was to add a bluetooth dongle but I couldn’t get it to work with my phone even though it was detected by my Odroid.