Issues connecting to Octoprint when connects at 2.4 ghz

What is the problem?

First off Octoprint works great. My issue is I have an ASUS Router that both my 2.4 and 5ghz have the same SSID. I have 3 Octoprint Pi Setups. 1 3b+ works perfect it always connects to the 5ghz channel. My issue is with the other 2. I have 1 Pi 3B and it only connect at 2.4ghz to my wireless. And I have a Pi4 that does not alwaya connect at 5ghz. When the Pi4 connects at 5Ghz I can hit the IP for it and comes right up. When they connect at 2.4Ghz I have to keep refreshing the IP until it finally connects. This can sometime take up to 10 min of messing to get it to come up. I know they are on the netowrk as I can see them on the list when I log into my router.

First off I am only using 2 printers So the 3B+ that connects and is always running is great.
The 3B that is only 2.4Ghz (Is Back up only)

SO the main question is there anyway of forcing the Pi4 to only see 5Ghz?
Again Octoprint works great and 100% no problems once my browser actually connects to it on 2.4Ghz.

What did you already try to solve it?
I have given each Octoprint set up I have their OWN IP address.

Logs (syslog, dmesg, ... no logs, no support)

Additional information about your network (Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ...)

My router is an ASUS RT-AC3100. Again the SSID for both 2.4Ghz and 5Ghz is the same. No I do not want to rename my 2.4 as I have 6 security cams that were all set up prior to setting up Octoprint and I do not feel like climbing ladders to take them down to reconfigure the cameras to a new SSID.

This might help you

Thanks that worked Perfect. Nailed it on the first try.

Crap...... Well It worked on first Pi Reboot then came back up 2.4 on second boot.

Which file did you edit and are you using OctoPi? Contrary to that link on OctoPi you should edit octopi-wpa-supplicant.txt that you also used for initially setting up WiFi.

1 Like

That is the one I edited(octopi-wpa-supplicant.txt). I added the frequencies for the 5Ghz channels my Router is using.

Can you share the freq_list line from your /boot/octopi-wpa-supplicant.txt as well as the line(s) which include the word country?

I'm also sharing a screencap of my Orbi router's 5Ghz configuration screen (revealing my 5Ghz channel selection).

I and using US. I will share My Supplicant later when I am at home. I looked at the list of 5Ghz channels My Router was using then went to the https://en.wikipedia.org/wiki/List_of_WLAN_channels#5GHz page to get the Center Frequencies that I then put into my supplicant.txt file that I put on my PI4.

So this is what is in my supplicant txt file

# 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="Geomoto-5G"
  psk="*********"
  freq_list=5180 5200 5220 5240 5745 5765 5805 5825
}

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

Okay, so it looks like you're specifying channels:

36, 40, 44, 48, 149, 153, 161, 165

What we don't know is what your router is using. What if it's using 5190 (which is legitimate for the U.S.)?

I said In my first Post what router I am using. Asus RC-AC3100.

Let me be more specific: "what we don't know is what CHANNEL your router is using".

Well it is in Auto. and when I select the list of what it is using as shown that is why I selected the center frequencies I did.
image

Okay. And the one it selected today is 153 and that's on your list. (HUZzah...!)

But what happens tomorrow when it sees your neighbor's wifi router and moves to a channel centered on 5190 and that's not in your list?

For the last maybe five years I've lived in apartments. The wifi landscape out there is ugly in this case. All your neighbors have wifi routers and many of these are "smarter" so they try to dynamically change channels to "help" you since they're also set to AUTO.

Imagine then being in a concert hall and several songs are being performed at the same time. Only in this case at random intervals Nickelback decides to start doing a cover of Alanis Morissette as karaoke with a mid-song change. So now Alanis—on the stage to their left—hears the change and adjusts what she's singing as well, etc.

It might be easier to turn off AUTO on your router and adjust your octopi-wpa-supplicant.txt to this.

1 Like

I do not know. I just want to know how to get the Raspberry Pi to always connect to the 5Ghz side of my router instead of the 2.4Ghz.

Well setting it to a fixed Channel did not work. I guess I am just going to say screw it and put a small spare switch by the Printers then just hard wire them. Cause it seem to be no problem if I had wire ran to it was able to connect right away to them.

You could try...

name the two zones differently, create two paragraphs in octopi-wpa-supplicant.txt, decorate the 5ghz one with priority=1 and the 2.4ghz one with priority=2.

Also, you might read this. It's the wildest thing. Basically the HDMI driver is creating EMF noise as a harmonic within the 2.4Ghz that's throwing off that side of the networking.

"...just touching the insulation of the microHDMI to HDMI adapter cable at the wrong position stopped the ping reaching router."

How do you specify Priority in the suplicant file?

Also I do not have any HDMI connected to any of my Octoprint Pi s

You just add it as I typed it into one of the two paragraphs in the file which refer to the zone. It needs to be the same indentation as the other fields.

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

network={
  ssid="Geomoto-5G"
  psk="*********"
  priority=1
}

network={
  ssid="Geomoto-2G"
  psk="*********"
  priority=2
}

Guess this is the part where I refer back to the original message. I would not have to bother with priority if I could rename my 2.4 on my router. But since this is the Only item on my network that is dependent upon having separate names to connect correctly Im not going to reconfigure 10-15 other devices on my network that are using 2.4.
In my original post I mentioned the fact that when I set this up I did not have any PIs. And that My router was set up with the SAME SSID for both 2.4 and 5. And that all of my Security Cameras and other Misc. Items that run 2.4 Only are connected to my router and only way to change them would be to take every single one down and reconfigure them.

So with that said I believe I am back to square one. With no real way to force Pi4 to 5G and basically running CAT6 to my Pis would at this point be my best option.until such time as I there becomes a way.

1 Like