Tried everything but to no avail... Wi-Fi is just not working [SOLVED]

My problem is that I'm unable to connect to wifi, no matter what I tried.

I tried 3 different SD cards, tried last nightly, edited my octopi-wpa-supplicant with multiple text editors. I swapped the cards between my Octopi and my Retropie and the Octopi one did connect with the Retropie card so I ruled out hardware issue. I changed country to Canada in the file since this is where I am.

iwlist wlan0 scan does show the networks.

PS. my wifi network is hidden but I also tried to connect to my cell phone configured as an AP with no success.

I have Pi 3's. Tried Octopi 15.1 and 16.0 nightly.

Thanks for your help.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
and add (setting your own country code):

country=IE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="abcd"
psk="password"
}

And then:
sudo nano /etc/dhcpcd.conf
and (for address eg 192.168.1.120 on Router 192.168.1.254) add:

interface wlan0
static ip_address=192.168.1.120/24
static routers=192.168.1.254
static domain_name_servers=8.8.4.4 8.8.8.8

Thanks, will try this tonight and report.

Is the DHCP file part mandatory? I already setted a fixed DHCP lease in my router for Octopi.

Do you know why just editing the /boot/octopi-wpa-supplicant file isnt working ? Luckily I can put my pi on wired ethernet to do the mod, just wondering.

I'm not sure why but I think it didn't work properly for me until I edited dhcpcd.conf. I let my router assign 51-100 addresses to new items and fix the others on the device at addresses over 100.
Also, from the latest Raspbian release notes:

  • WiFi is disabled until wireless regulatory domain is set (Pi 3 B+ only)
    • The domain can be done through 'Raspberry Pi Configuration' (rc_gui),
      'raspi-config' or by setting 'country=' to an appropriate ISO 3166
      alpha2 country code in /etc/wpa_supplicant/wpa_supplicant.conf.
  • Default wireless regulatory domain is now unset

The DHCP part (/etc/dhcpcd.conf) is not necessary unless you want to assign a static IP address.

Every Pi I have (3B, 3B+) has connected to WiFi on the first boot after editing the appropriate file in /boot, octopi-wpa-supplicant.txt in 0.15.x (Stretch), octopi-network.txt in 0.14.x (Jessie). The SSID and the PSK are both case-sensitive.

Make sure the WiFi signal is strong enough where the Pi is located. This can be an issue because the antenna isn't very big. There are log files that should show you what is happening with wlan0 at boot time.

@b-morgan I tried to move the Pi next to the router. My SSID and PSK are both corrects, I'm sure. Where are the logs ? I tried to look for them but didnt know where they were.

Thanks,

The command "dmesg" shows some of it. You might try "grep -i wlan0 /var/log/* | more". Since mine works, I'm not sure exactly what a failure will look like (or where it will show up).

I'd suggest posting a copy of your octopi-wpa-supplicant.txt file here. Change a couple of characters in your SSID and PSK if you are worried about one of us "war driving" past your location but if you change too much, you may mask the error we are trying to find.

Not sure if you have this covered - but I had problems when Iedited the wpa_supplicant.conf file in Notepad++ (on Win10) and forgot to change the EOL Conversion from Windows (CL RF) to Unix (LF) on the text-file. Once done - all the settings were accepted.

Being very novice to Raspberry - I cannot explain why - but I guess it makes a dialect better or worse for the RPi to read or not.

If you edit it from within the Raspberry OS I guess it saves it as LF by default.

Good luck!

Here is the output:
[sudo] password for pi:
grep: /var/log/apt: Is a directory
/var/log/auth.log:Jun 10 15:15:32 octopi sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/grep -i wlan0 /var/log/alternatives.log /var/log/apt /var/log/auth.log /var/log/auth.log.1 /var/log/boot.log /var/log/bootstrap.log /var/log/btmp /var/log/daemon
.log /var/log/daemon.log.1 /var/log/debug /var/log/debug.1 /var/log/dpkg.log /var/log/faillog /var/log/haproxy.log /var/log/haproxy.log.1 /var/log/kern.log /var/log/kern.log.1 /var/log/lastlog /var/log/messages /var/log/messages.1 /var/log/regenerate_ssh_host_keys.log /v
ar/log/samba /var/log/syslog /var/log/syslog.1 /var/log/syslog.2.gz /var/log/syslog.3.gz /var/log/user.log /var/log/user.log.1 /var/log/webcamd.log /var/log/wtmp
/var/log/auth.log.1:Jun 6 18:33:21 octopi sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/iwlist wlan0
/var/log/auth.log.1:Jun 6 18:33:39 octopi sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/iwlist wlan0 scan
/var/log/auth.log.1:Jun 6 18:33:45 octopi sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/iwlist wlan0 scan
/var/log/auth.log.1:Jun 7 03:55:13 octopi sudo: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/sbin/ifconfig wlan0 up
/var/log/daemon.log.1:Apr 18 01:08:14 octopi dhcpcd[304]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Apr 18 01:08:14 octopi dhcpcd-run-hooks[360]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Apr 18 01:08:15 octopi dhcpcd[304]: wlan0: waiting for carrier
/var/log/daemon.log.1:Apr 18 01:08:15 octopi dhcpcd[304]: wlan0: carrier acquired
/var/log/daemon.log.1:Apr 18 01:08:16 octopi dhcpcd[304]: wlan0: IAID eb:6d:f3:cd
/var/log/daemon.log.1:Apr 18 01:08:16 octopi dhcpcd[304]: wlan0: adding address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Apr 18 01:08:16 octopi dhcpcd[304]: wlan0: carrier lost
/var/log/daemon.log.1:Apr 18 01:08:16 octopi dhcpcd[304]: wlan0: deleting address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd[327]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd-run-hooks[373]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: waiting for carrier
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: carrier acquired
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: IAID eb:45:74:0e
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: adding address fe80::6f39:500a:318b:906b
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: carrier lost
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[327]: wlan0: deleting address fe80::6f39:500a:318b:906b
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd[335]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd-run-hooks[378]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: waiting for carrier
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: carrier acquired
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: IAID eb:45:74:0e
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: adding address fe80::6f39:500a:318b:906b
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: carrier lost
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[335]: wlan0: deleting address fe80::6f39:500a:318b:906b
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd[312]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:03 octopi dhcpcd-run-hooks[377]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: waiting for carrier
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: carrier acquired
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: IAID eb:6d:f3:cd
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: adding address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: carrier lost
grep: /var/log/samba: Is a directory
/var/log/daemon.log.1:Jun 7 02:17:04 octopi dhcpcd[312]: wlan0: deleting address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 03:57:54 octopi dhcpcd[325]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 03:57:54 octopi dhcpcd-run-hooks[410]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: waiting for carrier
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: carrier acquired
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: IAID eb:6d:f3:cd
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: adding address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: carrier lost
/var/log/daemon.log.1:Jun 7 03:57:55 octopi dhcpcd[325]: wlan0: deleting address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 21:19:02 octopi dhcpcd[303]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 21:19:02 octopi dhcpcd-run-hooks[374]: wlan0: starting wpa_supplicant
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: waiting for carrier
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: carrier acquired
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: IAID eb:6d:f3:cd
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: adding address fe80::165e:c404:352b:1cd2
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: probing address 192.168.169.250/24
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: carrier lost
/var/log/daemon.log.1:Jun 7 21:19:03 octopi dhcpcd[303]: wlan0: deleting address fe80::165e:c404:352b:1cd2
/var/log/kern.log.1:Apr 18 01:08:15 octopi kernel: [ 9.741522] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/kern.log.1:Jun 7 02:17:03 octopi kernel: [ 5.719644] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/kern.log.1:Jun 7 02:17:03 octopi kernel: [ 5.938374] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/kern.log.1:Jun 7 02:17:03 octopi kernel: [ 5.260476] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/kern.log.1:Jun 7 03:57:54 octopi kernel: [ 5.176163] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/kern.log.1:Jun 7 21:19:02 octopi kernel: [ 5.238274] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Apr 18 01:08:15 octopi kernel: [ 9.741522] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Jun 7 02:17:03 octopi kernel: [ 5.719644] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Jun 7 02:17:03 octopi kernel: [ 5.938374] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Jun 7 02:17:03 octopi kernel: [ 5.260476] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Jun 7 03:57:54 octopi kernel: [ 5.176163] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
/var/log/messages.1:Jun 7 21:19:02 octopi kernel: [ 5.238274] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

And here is my octopi-wpa-supplicant.txt. I edit it with nano from Xubuntu 18.04 once dd'ed the imageoctopi-wpa-supplicant.txt.zip (1.1 KB)

OK guys I finally found it !
Two things, first one, problem was my hidden network. I need to set
scan_ssid=1 in my network section in my octopi-wpa-supplicant.txt.
I also remove power management on the wifi interface :slight_smile:
@foosel @b-morgan @guysoft should include it commented in future versions.

Also, this was helpful: https://dontpressthat.wordpress.com/2017/11/03/prevent-raspberry-pi-dropping-wifi/

I don't feel like I should set power management on on an Octopi instance.

Thanks,

1 Like

@GeekFisher Could you send a PR against CustomPiOS? The network module can be found here.

I'm btw surprised that the RPi wlan driver is still causing power management issues for some people (personally can't reproduce it) - I thought they'd fixed that two years or so ago, but apparently not for everyone.

1 Like

I've mentioned before in another thread that the Broadcom chip's Linux drivers really can't handle the state management for power correctly. So as a work-around, you try to get the Pi to boot with power to the network adapter and keep the power on until it gets shutdown again. Any attempts to conserve power on the wifi network adapter will result in a stupid driver that can't recover itself.

Unfortunately, that link points to the previous /etc/network/interfaces style of modding it and Stretch is now using dhcpcd/wpa_supplicant to the best of my knowledge. I'm guessing that the new Stretch image is coming in with the sleep option set for the wifi by default.