Existing OctoPi-3B+ won't connect to new WiFi network

OctoPi won't connect to new WifI network

I edited wpa_supplicant file to new network information using Notepad++ then rebooted. Didn't work. Then tried to go into raspi-config and re-enter info there, rebooted. Still doesn't work.

If I temporarily boot up old router it will connect and work just fine with the old IP and old router as if it is a hardcoded IP. On old Wifi I can open web interface etc and all is well. I just can't get it to connect to the NEW Wifi network even though it sees it (and many others) if I run a scan as per this command:

sudo iwlist wlan0 scan

I have two of these systems that are identical and having he same issue with both of them.

My old router is a Ubiquiti AmpliFi-HD. Hate it. I'm going back to my Asus RT-AC68U.

OctoPi are the only client I'm having any issues with.

Is there a way to just reset the network so it will just work again. I don't mind resetting up the supplicant file, but I could have built two new Pi clients from scratch in less time than I've spent trying to get this to work.

Help.....

If you installed via the OctoPi image then with each bootup the /boot/octopi-wpa-supplicant.txt file contents will overwrite your attempts to change the file system's wpa_supplicant.conf file. You need to make your edits to the one in the boot partition.

2 Likes

Yes, I used the image and as per the setup instructions, the txt file in the boot folder is the only one I altered.

I’m at a loss to be honest. I didn’t change anything in either octopi that I have running except try to connect them to my new Wi-Fi. Changing that network information did not change the IP address that it pulled. It’s almost like it has a hardcoded IP address somewhere in the system. I let it connect to my old router and logged into the UI to see if there was some setting in there that I was missing somehow but nothing.

Do you know if there’s someplace in the system where a static IP could even be set?

OK, I got this to "work". I do not know if this is the correct solution and I have no idea how it got this way to begin with. However this helped:

Modifying this file resolved it:

/etc/wpa_supplicant/wpa_supplicant.conf

The contents were this:

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

network={
        ssid="OldWifiSSID"
        psk="PASSWORD"
}

I changed it to the new SSID and magically it just started working.

So the sum total of the changes were to update the wpa_supplicant.txt file then this file described above. No idea of the how or why, but both my OctoPis are running fine now and connected as usual.

Have you rebooted, though? I'm suggesting that the standard OctoPi-imaged instance will keep overwriting yours in /etc/supplicant/wpa_supplicant.conf.

Yes, several times in both Pi's.

Like I said though, I had already changed the /boot/octopi-wpa-supplicant.txt file and it didn't change my network connectivity or the IP it had. It took manually changing the conf file to make it work so BOTH files had to be updated. It's like the system wasn't taking the TXT data and overwriting the CONF data like you mention.

Could it be a file permissions issue?

From what I understand, the update_config attribute of one means, I give you the rights to update this.

Was curious so checked out the conf file you called out and it is nothing more thatn a link to the file in the boot directory?

It's just a marked-up bit of text/code which shows the location of something on your Pi. It's not an actual HTML link if that's what you're asking. That file though is where it's configured.

OMG!! I cant believe you figured this out! This has been driving me INSANE!!! :crazy_face: I wanted to put my head through the wall repeatedly!! I don't know if there is something different with your/my pi setup, or if nobody else has actually tried to change the wifi parameters after the initial setup. I think I tried updating the octopi-wpa-supplicant.txt something like a billion times now and every time someone was like, "Oh, you just have to update octopi-wpa-supplicant.txt" I think I'd shoot fire from my eyes. Could there be a problem with our version of the file? I tried re-copying it from somewhere online thinking I had something weird in the file which was causing it to not read properly with no success. I had resorted to using my guest network to mimic the old wifi SSID and password (which bugged me) but now it works!!

2 Likes

Oddly, last night I turned this printer on and it again took the random IP it had before I created the reserved IP in my router. What should happen is anytime it sees that MAC the router should hand it the IP I reserved for it and that did work for weeks. I’m not sure what’s going on this minute.

So, this Pi works, but not with the IP I assigned it in the router. It was working with the assigned IP for weeks until yesterday for some reason. I don't know what that reason is though.

I went back in and looked at the supplicant file in the boot directory and nothing changed.

Went back in and looked at the /etc/supplicant/wpa_supplicant.conf file and magically the WPA-PSK network info for my OLD network was there again. It inserted itself in front of the current network info which was still there.

Where did that come from? The only thing I can think of is that it's coming from the raspi-config info somehow? Where does that info get stored on these things?

I rebooted and it pulled an IP immediately preceding the random one that it pulled yesterday. Neither is the one I have assigned to it in my router.

Went back into raspi-config and re-added my current network. Then looked at the /etc/supplicant/wpa_supplicant.conf file and it didn't bring back my old network.

Rebooting now.....

Read my post #5 here on this thread.

Thanks. I interpreted your comment to mean that the network settings will be dictated by what's in the wpa_supplicant file. That's also the way I interpreted the official docs for configuration.

It DID work for a while, but somehow the credentials for a network that hasn't existed in months found it's way back onto this pi into the /etc/supplicant/wpa_supplicant.conffile. I have no idea how. If I'm interpreting your comment correctly, the contents of the wpa_supplicant file should override that.

Currently I have rebooted twice and even restarted my router. It is still pulling a random IP from DHCP on my router.

Frustrating......I'm considering completely starting over.

The expected interpretation would be that—on an OctoPi-imaged Raspbian install—the /boot/octopi-wpa-supplicant.txt if it includes the update_config attribute set to true will overwrite /etc/wpa_supplicant/wpa_supplicant.conf's contents on every boot.