No wifi with wpa-supplicant.conf

Hi, I can't get wifi working with the octopi-wpa-supplicant.conf file.

I tried setting up wifi manually with network interfaces, and managed to get an IP address (but no internet since I think there was a conflict with dhcpcd which I didn't bother to fix, because I'd like it to work the usual way), so the wifi dongle is recognized.

I searched on internet for several solutions, and nothing really work.

I edited the file with nano on manjaro, so it shouldn't be a problem.

I'm using a raspberry pi 2 with a usb wifi dongle.

I have access to the command line because I connected the Pi to an external screen and a keyboard.

Here is my octopi-wpa-supplicant.conf :

# Use this file to configure your wifi connection(s).
#
# Just uncomment the lines prefixed with a single # of the configuration
# that matches your wifi setup and fill in SSID and passphrase.
#
# You can configure multiple wifi connections by adding more 'network'
# blocks.
#
# See https://linux.die.net/man/5/wpa_supplicant.conf
# (or 'man -s 5 wpa_supplicant.conf') for advanced options going beyond
# the examples provided below (e.g. various WPA Enterprise setups).
#
# !!!!! HEADS-UP WINDOWS USERS !!!!!
#
# Do not use Wordpad for editing this file, it will mangle it and your
# configuration won't work. Use a proper text editor instead.
# Recommended: Notepad++, VSCode, Atom, SublimeText.
#
# !!!!! HEADS-UP MACOSX USERS !!!!!
#
# If you use Textedit to edit this file make sure to use "plain text format"
# and "disable smart quotes" in "Textedit > Preferences", otherwise Textedit
# will use none-compatible characters and your network configuration won't
# work!

## WPA/WPA2 secured
network={
 ssid="my_super_ssid_checked_10x"
 psk="my_super_passwd_checked_10x"
}

## Open/unsecured
#network={
#  ssid="put SSID here"
#  key_mgmt=NONE
#}

## WEP "secured"
##
## WEP can be cracked within minutes. If your network is still relying on this
## encryption scheme you should seriously consider to update your network ASAP.
#network={
#  ssid="put SSID here"
#  key_mgmt=NONE
#  wep_key0="put password here"
#  wep_tx_keyidx=0
#}

# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
# For full list see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
#country=GB # United Kingdom
#country=CA # Canada
#country=DE # Germany
country=FR # France
#country=US # United States

### You should not have to change the lines below #####################

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

All help appreciated :slight_smile:

Hi @sandy.locke

Maybe the WiFi dongle is not recognized.
Type in ifconfig and see if you get something like this:
grafik

Hi @Ewald_Ikemann, and thanks for your interest.

I get this exact screen (minus eth0 working since I'm not wired).

My dongle is well recognized since, as I wrote above, when setting up network interfaces manually I manage to get an IP address.

Try following this subsection of the tutorial I created. You're missing the key management line.

I added the "key_mgmt" line from your tutorial, but it still doesn't work :confused:

Did you merely add it or did you delete everything and copy/paste from the example (as suggested in the tutorial)?

I've heard that moving the country wi-fi code and all those directives to the top of the file can sometimes help make this work.

Also, it might be good to add a keyboard/mouse/monitor to the Pi to run that ifconfig locally. Or add an Ethernet cable so that you can remote in and run that ifconfig. (We need to see the output.)

Well it still doesn't work following your tutorial...

I've uploaded a screenshot of the output of ifconfig :

And here is the output of the SSID scan :

Okay, so neither eth0 nor wlan0 include the RUNNING flag so indeed, it's not been issued an IP address from your DHCP server. Assuming that this is your wi-fi zone, we see it's on 2.4Ghz. I see WPA v1 and WPA2. The signal seems strong enough.

I actually just found another old wifi usb dongle somewhere and tried that, and it worked ^^

Seems like I've got an incompatible dongle in the end :confused:

Thank you for your help ! And sorry for the bother.

1 Like

I have this problem too with octoprint wifi .
but i using Rasbbery pi 3 B+ .
is wifi dongle really needed ?

It's important to name everything correctly.

  • The file you edit is /boot/octopi-wpa-supplicant.txt (no underscores)
  • When it sees this it will automatically update /etc/wpa_supplicant/wpa_supplicant.conf

If you attempt to edit the second one at the next boot an OctoPi-imaged Raspberry will overcopy it again from the first one.