Cannot get Octoprint to connect to wifi on startup

What is the problem?

I can't seem to connect to the wifi automatically with my RaspberryPi at startup.

Have you tried running in safe mode?

Nope, there is no critical error, simply

Did running in safe mode solve the problem?

Nope not tried

Systeminfo Bundle (41.7 KB) (69.1 KB)


RaspberryPi B+
Fresh install with Raspberry Pi Imager and wifi information
On startup : Only wifi with a good wpa_supplicant.txt
The wifi dongle is TP-Link WN725N
On debug after failed startup : Ethernet connection

What did you already try to solve it?

result of cat /etc/wpa_supplicant/wpa_supplicant.conf

country=FR # France

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

result of lsusb

Bus 001 Device 005: ID 0483:5740 STMicroelectronics Virtual COM Port
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

result of wpa_supplicant -h

  nl80211 = Linux nl80211/cfg80211
  wext = Linux wireless extensions (generic)
  wired = Wired Ethernet driver
  macsec_linux = MACsec Ethernet driver for Linux
  none = no driver (RADIUS server/WPS ER)

result of sudo wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0

rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with 36:94:54:98:7f:48 (SSID='Al&Al4Ever' freq=2412 MHz)
Failed to add supported operating classes IE
ioctl[SIOCSIWFREQ]: Operation not supported
wlan0: Association request to the driver failed
wlan0: Associated with 36:94:54:98:7f:48
wlan0: WPA: Key negotiation completed with 36:94:54:98:7f:48 [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 36:94:54:98:7f:48 completed [id=0 id_str=]

result of sudo wpa_supplicant -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0

Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface

result of sudo iwlist wlan0 scan

Cell 01 - Address: 36:94:54:98:7F:48
                    Protocol:IEEE 802.11bg
                    Frequency:2.412 GHz (Channel 1)
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    Extra:rsn_ie =30180100000fac020200000fac04000fac020100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    Quality:0  Signal level:0  Noise level:0

How far from the WiFi router? According to iwlist wlan0, there is zero signal


I'm at 6.6 meters from the router, the only obstacle is a wooden panel, otherwise it's a straight line.
Also all the other wifi detected have those informations :

          Cell 01 - Address: 36:94:54:98:7F:48
                    Quality:0  Signal level:0  Noise level:0
          Cell 02 - Address: A8:6A:BB:F4:3D:00
                    Quality:0  Signal level:0  Noise level:0
          Cell 03 - Address: 50:39:2F:3A:5E:40
                    Quality:0  Signal level:0  Noise level:0
          Cell 04 - Address: CC:2D:1B:62:A1:6E
                    Quality:0  Signal level:0  Noise level:0

But as you saw in the other commands, it still detected it, and with a command line I could connect to it.

That dongle only supports 2.4 GHz. Have you checked the Wifi hotspot is set to 2.4 GHz?

It is as the scan shows :

1 Like