RPI 4B: Cannot connect to Wifi

  • chewitt thanks much, good info and good to know LE is on top of it. Such a strange progression of errors the config causes, that it causes quite a bit of head scratching and frustration. Thanks again for the info it saved me a lot of time.

  • Same problem here, none of the workarounds suggested above helped. I was unable to identify the problem based on the log-entries accessible via the UI. Therefore, my working solution is as follows:

    1. enable SSH using the UI (no wifi needed)
    2. move your raspi and connect it to your router by cable (no UI needed)
    3. connect via ssh and setup your wifi using connmanctl as described here:
      External Content gist.github.com
      Content embedded from external sources will not be displayed without your consent.
      Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    4. your raspi should now be connected via cable and via wifi
    5. move your raspi back to your tv (cable connection no longer needed)

    For difficult cases, i would recommend to always use command line (via ssh) for wifi setup. In my case, the problem might have been caused by a combination of unusual SSID / long password / special characters in the password. This is not a problem if you configure using connmanctl directly.

  • July 2021, Im having the same problem as the OP. I thought perhaps best not to open a new thread and go through all this again. Just to say Im a novice LibreElec user and just installed it. I have limited experience with Rpi and hate trying to do anything at all to my router.

    I think I will struggle to connect Ethernet due to location of router and equipment.

    I read though most of the above but got a little lost in places where probably people understood more how to get to where they were being directed.

    Is there a basic version of the answer for newbies please?

  • The problem here was needing to set the wireless country code, but it appears as though others are looking to solve a similar problem with the pi4 and wifi connectivity found in what seems to be all distros based off libreelec. I can't speak to the actual cause of the problem, but fortunately, once a connection is established, it's solid and will hold until disconnected.

    Below is a script that can be added to an autostart.sh. On boot it'll test to see if the system was able to connect on its own and if not it will try to reconnect and test again up to three more times. Altogether, the script runs for 60 seconds so as not to interfere with manual use any more than it needs to.

    Bash
    #!/bin/bash
    
    { sleep 18; N=0; WLANSTAT="$(ping -q -w 1 -c 1 4.2.2.1 >/dev/null 2>&1 && echo 1 || echo 0)"; until [ "$N" = "3" ] || [ "$WLANSTAT" = "1" ]; do ifconfig wlan0 down; rfkill unblock all; ifconfig wlan0 up; sleep 14; WLANSTAT="$(ping -q -w 1 -c 1 4.2.2.1 >/dev/null 2>&1 && echo 1 || echo 0)"; N=$(( N + 1 )); done } &

    Between the various distros based on libreelec, there are quite a few other posts out there regarding this issue, but they generally seem to be obfuscated by other problems found with the Pi4's built-in wifi. I hope this workaround is helpful until a better solution to the problem can be found.

    Edited 3 times, last by mediamogul (August 26, 2021 at 8:52 AM).