Can't Connect to Wifi

Hi everyone, I am having the darndest time getting my octoprint on Raspberry Pi 4 connected to my Google Wifi network. I am able to access it through ethernet but I cant have this as a permanent thing.

What did you already try to solve it?

I have reflashed the Octopi image and made sure I was using the correct editor as well as I have looked through so many forums on here in order to not waste anyone's time but I cant seem to get this figured out.
This is my octopi-wpa-supplicant.txt file:

Not sure my Google Wifi is the problem or not. I have figured out my octoprint has a dynamic ip, not sure if thats a problem.

Some of the solutions I've came across are:



I'm not sure how to run those commands if its on the raspberry pi, octoprint or on my computer using a specific program besides the command line.

I've also seen a recommendation to have the raspberry pi scan for wifi zones and see if my network shows up but I'm not sure how to run that.

Complete Logs

octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support! Not log excerpts, complete logs.)

I tried to provide logs but it said it was too long so ill respond to this with logs.

Additional information about your setup

OctoPrint version, OctoPi version, print

browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
connectivity.connection_check: 8.8.8.8:53
connectivity.connection_ok: true
connectivity.enabled: true
connectivity.online: true
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: true
env.hardware.cores: 4
env.hardware.freq: 1500
env.hardware.ram: 3959984128
env.os.bits: 32
env.os.id: linux
env.os.platform: linux
env.plugins.pi_support.model: Raspberry Pi 4 Model B Rev 1.2
env.plugins.pi_support.octopi_version: 0.18.0
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 20.3.3
env.python.version: 3.7.3
env.python.virtualenv: true
octoprint.safe_mode: false
octoprint.version: 1.5.3
printer.firmware: Marlin Ver 1.0.2

Any help would be appreciated. Thank you in advance.serial.log (148 Bytes) octoprint.log (116.1 KB)

The easiest way I find to debug wifi issues is connecting up a monitor so you can avoid flying blind and run the commands above, such as iwconfig etc. and see if it can see your APs. Though, you have it connected via ethernet so you should be able to use SSH to access the command line remotely.

For the logs, there is an upload file button image there in the toolbar. Wifi issues are not generally shown from the octoprint.log but it gives insight into what is running on your system and if it is all going well.

For SSH access, from the windows 10 command line you can run ssh pi@<the-ip>, for example ssh pi@192.168.1.158 etc. The default password is raspberry.

@Trevorgillette17 :

So, what network are you using?

grafik

Thanks for your reply Charlie. I was able to upload the logs and I was able to access the command line using the steps you provided so thank you for that. Ill do some more troubleshooting tomorrow and let you know. Thanks again.

Thanks Ewald for noticing that!
I think everything looks good now:

# 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="Not Your Mother's WiFi"
  psk="12131415"
}

## Open/unsecured
network={
#  ssid="12131415"
#  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

@Trevorgillette17, If that is the file you are using, the network={ line after
## Open/unsecured needs to be commented (add a #).

1 Like

Thanks @b-morgan!
How does this look?

# 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="SAMPLE"
  psk="SAMPLE"
}

## 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

@Charlie_Powell I did the iwconfig and got:

OctoPrint version : 1.5.2
OctoPi version    : 0.18.0
------------------------------------------------------------------------------

pi@octopi:~ $ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"SAMPLE"
          Mode:Managed  Frequency:5.18 GHz  Access Point: D8:6C:63:EC:44:77
          Bit Rate=24 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-40 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

It appears to me like it's trying to connect to the 5gz side and is unable.
I also did sudo iwlist wlan0 scan and got:

          Cell 04 - Address: D8:6C:63:EC:44:7B
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=70/70  Signal level=-30 dBm
                    Encryption key:on
                    ESSID:"SAMPLE"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000000000000000
                    Extra: Last beacon: 100ms ago
                    IE: Unknown: 00134E6F7420596F7572204D6F6D27732057694669
                    IE: Unknown: 010882848B960C121824
                    IE: Unknown: 03010B
                    IE: Unknown: 0706555320010B1E
                    IE: Unknown: 2A0100
                    IE: Unknown: 32043048606C
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 46057200000000
                    IE: Unknown: 3B025100
                    IE: Unknown: 2D1AED111BFFFF000000000000000000000100000000000000000000
                    IE: Unknown: 3D160B000400000000000000000000000000000000000000
                    IE: Unknown: 7F080400080200000040
                    IE: Unknown: DD1A00904C0408BF0CB2398133FAFF0000FAFF0000C005000000FCFF
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
                    IE: Unknown: DD0CF4F5E80502FF0000FFFFFFFF
          Cell 05 - Address: D8:6C:63:EC:44:77
                    Channel:36
                    Frequency:5.18 GHz (Channel 36)
                    Quality=70/70  Signal level=-38 dBm
                    Encryption key:on
                    ESSID:"SAMPLE"
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000000000000000
                    Extra: Last beacon: 100ms ago
                    IE: Unknown: 00134E6F7420596F7572204D6F6D27732057694669
                    IE: Unknown: 01088C129824B048606C
                    IE: Unknown: 030124
                    IE: Unknown: 050401020000
                    IE: Unknown: 070A55532024041E95051E00
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 46057200000000
                    IE: Unknown: 3B028000
                    IE: Unknown: 2D1AEF011BFFFF000000000000000000000100000000000000000000
                    IE: Unknown: 3D1624050400000000000000000000000000000000000000
                    IE: Unknown: 7F09040008020000004040
                    IE: Unknown: BF0CB2398133FAFF0000FAFF0000
                    IE: Unknown: C005012A00FCFF
                    IE: Unknown: C304023C3C3C
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00
                    IE: Unknown: DD0CF4F5E80502FF0000FFFFFFFF

So I know its seeing the 2.4GHz but I need to somehow force it to connect to that.

Have you tried sudo raspi-config? I just tested it here and I can use it to connect to different wifi networks. You just need to know the SSID and password first since there's no way to look up from the config menu.

sudo raspi-config > 1. System settings > S1. Wireless LAN

The file looks good now.

You appear to have the same SSID for 5GHz and 2.4GHz. By default, the RPi is free to choose which one to use.

While the WiFi connection to 5GHz looks good, there are no IP addresses assigned so the connection isn't very useful. Can you provide details on the rest of your network? What device is providing the WiFi connection and how is it configured?

There should be a DHCP server somewhere in your local area network but it isn't seeing the request for an address from the RPi.

Thanks for your response @lantren. I got a little lost in the ssh on how to do that. Can you tell me the exact commands after raspi-config? Do I literally type 1. System Settings then S1. Wireless LAN?

@b-morgan, I will try to provide more details when I get home but it's a Google Wifi router. How would I tell you how it's configured?

First, we need to understand the physical topology.

  1. How does the internet come into your house (Cable, DSL, etc.)?
  2. What does it connect to (ISP supplied modem or router or ...)?
  3. What does this device provide (ethernet ports, WiFi, etc.)?
  4. What devices do you have on your Local Area Network (LAN) and how do they connect?

Once we know the physical topology, we can provide additional instructions on how to obtain configuration details. We will need to know how the Google WiFi router is connected? It should have a web interface which can be used to fine-tune the settings.

sure. no problem!

On the command line you type "sudo raspi-config"

You will then get a old school terminal menu that you can navigate with the arrow keys on your keyboard.

It will look like this

Your up/down arrows navigate the menu items and the left/right arrow navigates the two operators at the bottom of the menu, in this case "Select" and "Finish". The return key activates your selection.

Choose "1 System Options" with the up/down arrow keys. Choose "Select" with your left/right keys and hit the return key and you will get this....

Choose "S1 Wireless LAN" . Choose "Select" and hit return.

The rest gives you these windows, just enter the SSID and password as indicated.

That's it ! You're done! (fingers crossed!) Your Raspberry Pi should connect to your wireless network.
If this doesn't work you may need to look at log_on_your_router to see why the connection request was denied.

FWIW , use "ifconfig" instead of "iwconfig" there's more useful information about connection details for all network interfaces.

@b-morgan My internet is cable, it connects to a modem I purchased myself ARRIS SURFboard (16x4) DOCSIS 3.0, it provides one ethernet port that the Google Wifi is hooked into. I have a couple computers, iPads, Chromecasts, TVs, all connected wirelessly. There is an app I use to manage the network and I just confirmed there isn't a more complex version with more settings on pc.

@lantren I was able to locate the screen you mentioned by following your excellent directions (thank you!) and was able to enter my SSID and passcode but because the 2.4 and 5 GHz options have the same name it didn't seem to change anything.
ifconfig came up with:

pi@octopi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.28  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::7800:2577:919c:53a8  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:a0:f5:b8  txqueuelen 1000  (Ethernet)
        RX packets 15401  bytes 15484571 (14.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4602  bytes 1865579 (1.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 545  bytes 2279266 (2.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 545  bytes 2279266 (2.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.31  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::3ce2:72d9:8cec:46f3  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:a0:f5:b9  txqueuelen 1000  (Ethernet)
        RX packets 1802  bytes 450132 (439.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 198  bytes 56440 (55.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

That means you ARE connected to your WIFI and have 192.168.86.31 as an IP Address, so your router seems to be not part of the problem . Without rebooting, can you connect via SSH with the enet cable removed?

If you can , there's no reason you shouldn't be able to put http://192.168.86.31:5000 in the address field in the web browser on your PC and connect to Octoprint.

The ifconfig output looks good (sorry about my confusing response to the iwconfig). With both a wireless and a wired connection, your DHCP server and DNS server (both should be running in the Google WiFi) may be confused as to which IP address to assign to the name, but connections via the IP address should work.

@lantren, @b-morgan I can't thank you both enough for your time and expertise in trying to help me. I got it to work and you wont believe how I fixed it.
I read on a google Wi-Fi forum that someone disconnected their Google Wi-Fi completely and turned on their hotspot to their phone with the credentials being the same and setting the connection to 2.4GHz. When it connects to the hotspot plug in the Google Wi-Fi and once that's up and running disconnect the hotpot and low and behold http://octopi.local/ actually works now!

I had sort of the same issue connecting 2.4GHz devices after my ISP router was replaced with a "NEW" one. The new routers assign the same SSID to both the 2.4 and 5 GHz channels. When the router detects a device trying to connect, it tries to determine which channel to connect with. If it cannot determine this, it assigns the 5 GHz channel to that connection. On my router, I had to configure it to break out the 2.4 and 5 GHz channels and assigned different SSID's to each. After that whenever I needed to connect to a 2.4 GHz SSID, I just chose that one.

That's a great idea if your router supports it. One of my few complaints with Google WiFi is they don't have this option.