Octopi Not Connecting to New Router

Hi

Really very much hoping for some help, thanks in advance!!

The Problem:
I've had my Octopi working happily and connected over wifi, all good, for some time. But I recently changed broadband provider and so have a new router. So I set up a new SSID and password on the router, and put them into the octopi-wpa-supplicant.txt. But the printer isn't connecting.

Verifying th problem, I've scanned the network using AngryIPScanner and the router's internal scanner, and I don't see the printer. I've also connected to the printer via the router over ethernet and been able to connect fine so I know Octopi is still working. I have the wifi status app on the Octopi and it also says it's not connected.

Troubleshooting steps I've already carried out:
Redownloading a fresh octopi-wpa-supplicant.txt file in case a somehow bungled that. I'm working with Textmate on Mac so I think that should all be fine - it saves in UTF-8 I believe. I've reinput the password SSID and password about twenty times, I've checked the right things are #ed out and not #ed out. I've tried pressing WPS buttons on a new and untested dongle, then gone back to my old dongle.

I've turned off the WPS.

It does have a more complex password, with capitals, numbers, special characters, while the old password was simpler, but the additional characters are required by the new router. And as I say, I've swapped out the old dongle for a new one, and back again, with no change.

What I think I need help with
I'm assuming that, as nothing has really changed with the Octopi, there must be some setting on the router that needs adjusting. Any help in this area, or anything else, would be greatly, greatly appreciated!

Thanks so much - gotta get my printer going!!!

Jon

You can try to connect via Ethernet cable.
Or you can connect an HDMI monitor/TV and a USB keyboard to the pi to investigate more.

Hi

Thanks. Yes I am currently connected via ethernet but it's not so good as a long term setup. Are there troubleshooting steps or settings to check while I'm connected?

Jon

You can enter via SSH and start

sudo raspi-config

There you can check your WiFi settings

There is a WiFi set-up and Troubleshooting guide you might want to check out:

I wrote most of it some years ago, and others have contributed over the years with updates and edits. You might want to run through that and see if that helps.

If you still have problems, reporting back the results you get from some of the "Other Diagnostic Commands" in the final section of the guide may help us figure out what is going on with your set up.

Hi John

Thanks, yes I'm very familiar with your guide, thanks so much for writing it. It helped me immensely when I was first setting up, and I've been through it again with this issue but haven't found an answer in there. The only thing I did wonder about is some reference to a second hidden wifi settings file that was only accessible via a command line, though there's nothing visible in the file system so maybe it's not there any more.

But yes I will get into diagnostic commands. I've not done a lot of command line stuff but I began to get into it last night and I'll see where it goes.

As I say, my feeling is it's a router issue - are you aware of any idiosyncrasies that pis need re router setups?

Thanks

Jon

The diagnostic commands may help diagnose the problem. One of them will cause your pi to report out every WiFi network is sees, regardless of whether it's connected or not. That report also includes information on how strong a signal the Pi sees. If the pi can see your router, but is not connecting to it, that focuses the troubleshooting in one direction. If it can't see the router at all, that's a different set of problems.

It's been a long time since I have really dug into this stuff, but there are others on here who will chime in once they get an idea of what is happening.

It's very common to have something wrong with the log in credentials (either a typo in the SSID or password, or the editor you used messed up the file somehow. I'm not familiar with Textmate, so can't comment on that.)

What type of Pi are you using? Is it possible your new router is 5 GHz but your PI is an older model that only handles 2.4 GHz?

Pi's don;t have the greatest WiFi antenna, so they can have a problem if there is a weaker signal or electrical interference (When I had my pi in one location in our house, I could only connect if the florescent lights in that area were turned off. I know some LED lights are also very "noisy" in terms of RF emissions: people replacing the light bulb in their garage door opener with the wrong kind of LED bulb will sometimes find their opener no longer works or that the range is greatly reduced.) Determining whether that is an issue or ot is what some of those diagnostic commands are all about.

Continuing the discussion from Octopi Not Connecting to New Router:

Hi,
similar to the guide postet before:

edit the
/etc/wpa_supplicant/wpa_supplicant.conf
as a root in the rootdirectory
like this:

country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
#update_config=1
network={
ssid="MYSSID"
psk="myPASSWORD"
key_mgmt=WPA-PSK // depending n your encryption method
}

But as a first step I would check the wifi settings in the router.

  • which encryption method /WPA 2 or a different one
  • is the mac-dress-filter active or inactive: are new devices set to be allowed to connect
    to your router,

good luck!

There is one other thing to consider with a new AP/router.
Most newer routers have both the 2.4 & 5 Ghz bands available. If the router is using the same SSID for both then it is a crap shoot which may connect and if it is or is not stable.

I have always recommended that users explicitly name the SSID different for each band so the end user can select which band is connecting. This seems to be more reliable for stable connections.

Is your new router one that is using the same SSID for both bands? If it is then maybe you could try switching the SSID on one of the bands and see if that makes a difference. It also would mean that you had to select the specific SSID to connect to the band you wish.

On my RPi4B I have no problems with the 5Ghz band but older PIs may.

Hi Ghost

Thanks, good thought. I've actually turned off the 5GHz on my router to keep things simple anyway, so good call but not going to be an issue here.

I'm moving my router and plugging in any time I need to print currently - not ideal!

Also I was able to connect a standard 2D laser printer to the network no problem so it's an Octoprint thing for sure.

I haven't had time to get into SSHing to generate logs, if anyone has any suggestions for efficient guides please share

Thanks again

Jon

This is where using a hosts file, not a dhcpd server, is most effective, My home net will soon have 10 machines. All have addresses in the 192.168.xx.nn area. Each machine has a unique hostname and a common domainname, and all machines have an copy of the master /etc/hosts file that lists them all
in 'ipv4_address hostname.domainname alias' format.

Each machine has an immutable /etc/resolv.conf specififying "search hosts,nameserver' as line 1,line 2 specs nameserver ipv4_address_of_router. Made immutable so NM can't screw it up.

the router, reflashed to dd-wrt, runs dnsmasq only, so if it does not have the translation buffered, it queries the isp's nameserver it got from the modem. Pinging yahoo.com is typically under 40 milliseconds.

The router does NAT, so Every machine has transparent access to the net. And any machines browser can watch/run octoprint's server on itself or any other machine on my net with aliasname:5000.

Life is trouble free as it Just Works. And octoprint runs Just Fine on a bananapi m5 after removing
anything claiming to be a screenblanker from the latest armbian, that will crash the bpi5. armbian knows about that, so the next release will probably fix that.

Take care & stay well everybody.