I just wanted to share this issue and the steps I took to resolve it. This is a RaspberryPI 2. Initially, I installed Noobs on the SD card and then installed LibreElec 9.
Pi booted up. Ethernet worked fine, but for the location where this pi would be, wifi had to work. I'm using the Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter Realtek RTL8188CUS.
Try and try again, LibreElec would not connect to wifi. I searched every dang forum and github gist trying to find a solution. 100% positive wifi password correct. Copy/pasted from laptop source. No dice.
Back to noobs. Install Raspian. Wifi works. Hmm. Why does it work on Raspian but not LibreElec? I see wpa_supplicant running on Raspian (and recalled connman being libreElec) so I copy this wpa config.
Back to noobs. Install LibreElec again. Again, no wifi success. Using ssh, connmanctl, it sees my wifi just fine. Created config at /storage/.cache/connman/mywifi.config. (I did this earlier as well) Still no success.
ps -Af | grep wpa I notice there's no config provided for wpa_supplicant. So I create one, /storage/.cache/wpa_supplicant.conf, with same contents as the config running under Raspian, and then edited the systemctl script for wpa_supplicant to, again, match what Raspian was running:
ExecStart=/usr/bin/wpa_supplicant -u -iwlan0 -Dnl80211,wext -c/storage/.cache/wpa_supplicant.conf
Restarted wpa_supplicant and tried connmanctl connect wifi_801f02d3902b_566f6c74726f6e3234_managed_ps again. Same errors as before. Bad password. Bull crap.
Reboot pi. LibreElec boots. Wifi is up and connected. wpa_supplicant is running with my copied Raspian config.
No idea why LibreElec cannot connect to my wifi from the get-go, no idea why would not accept password from beginning, but I got it working. This was one giant PITA. I hope future versions of LibreElec have better wifi support.