OctoPi WiFi/network connection troubleshooting megatopic

Hi all. My OctoPi install is working wonderfully, but there's one tiny little problem...

Boots right up, and I can log in remotely just fine. Connects to my printer perfectly. Web pages load blindingly fast (it IS on the local network).

So what's the problem?

In my router, I have the Pi reserved with an IP address of 192.168.0.51. Triple checked the MAC address, and everything is fine. BUT, for some blasted reason, the Pi keeps demanding the IP of 192.168.0.244. Wouldn't be a problem, but that IP is assigned to something else already, and can't be reassigned to the Pi.

Looking through syslog, I see that my router is offering the correct address (192.168.0.51) to the Pi, but it gets rejected by the Pi for whatever reason.

Any ideas on fixing this?

Jan 17 09:48:40 octopi systemd[1]: Started dhcpcd on all interfaces.
Jan 17 09:48:48 octopi dhcpcd[553]: wlan0: no IPv6 Routers available
Jan 17 09:48:49 octopi dhcpcd[553]: docker0: waiting for carrier
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: NAK: static lease available from 192.168.0.1
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: message: static lease available
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: deleting route to 192.168.0.0/24
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: deleting default route via 192.168.0.1
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: soliciting a DHCP lease
Jan 17 09:53:53 octopi dhcpcd[553]: wlan0: offered 192.168.0.51 from 192.168.0.1
Jan 17 09:53:54 octopi dhcpcd[553]: wlan0: probing address 192.168.0.51/24
Jan 17 09:53:54 octopi dhcpcd[553]: wlan0: hardware address 70:f3:95:03:78:ba claims 192.168.0.51
Jan 17 09:53:55 octopi dhcpcd[553]: wlan0: soliciting a DHCP lease
Jan 17 09:53:58 octopi dhcpcd[553]: wlan0: offered 192.168.0.244 from 192.168.0.1
Jan 17 09:53:58 octopi dhcpcd[553]: wlan0: probing address 192.168.0.244/24
Jan 17 09:54:03 octopi dhcpcd[553]: wlan0: leased 192.168.0.244 for 600 seconds
Jan 17 09:54:03 octopi dhcpcd[553]: wlan0: adding route to 192.168.0.0/24
Jan 17 09:54:03 octopi dhcpcd[553]: wlan0: adding default route via 192.168.0.1

https://www.raspberrypi.org/forums/viewtopic.php?t=191140#p1200017

Just use ip a instead of ifconfig and do the whole thing for wlan0 instead of the ethernet interface

That doesn't really answer my question, or have anything to do with the situation. I'm not using ifconfig. The section of syslog I posted is what the pi is doing on boot, all on its own.

Well my suggestion was to use a static ip as workaround. I don't know why it's beheaving like this but I think got much to do with the situation as it solves your problem.

The ifconfig part is an addition to the link

No joy. Tried setting it to static, and it's still on 192.168.0.244. It's actively rejecting any offers from the router except that.

You saw that, right? It has the IP address you're trying to issue from the router. Try another IP address.

In fact—and you can trust me since I'm an old I.T. guy—issue your static addresses from high in the range not low in the range of available IP addresses. All my static addresses are in the 200 zone.

Well, it took half the day, but I tracked it down. SOMEBODY had an unauthorized machine on the network!

All good now, thanks!

Just assembled my Prusa MK3S Kit and it worked without any further fixes, to my complete surprise. Turns out that getting it to run with OctoPi would be the true challenge. I bought a Pi 3A+, flashed OctoPi and configured the wifi following the instructions. My router shows that it has connected to the network and has been assigned an IP. However, I cannot reach it from my computer or any other device on octopi.local or using the IP address directly in the browser. Any ideas what could be the cause of this?

Note that the 3A+ model includes support for the 5Ghz wifi zones as well. Hopefully your wifi router will forward (Bonjour) broadcasts from one zone to another (in case your workstation is attached to, say, the 2.4Ghz zone.

Normally, I'd say to attach an Ethernet cable manually but this model doesn't have one.

Instead, I guess, disconnect the serial cable, plug in a keyboard and display and login locally to the Pi to run commands like ifconfig to see what's going on. Odds are good that your /boot/octopi-wpa-supplicant.txt is the problem here.

Troubleshooting

Hello everybody,

found the link in many other forums about problems with the WLAN connection on a octopi install - so i hope i am in the right place here...
So here is the problem giveing me a headace for since about 3 days and 10 hours forums post reading....
The setup is a raspberry pi B running an octoprint buster lite 0.17.0 image. I got a WLAN Stick attached (Model: TP-Link TL-WN725N).
Already edited the wpa supplicant txt file with notepad ++, adjusted the country code and filled in ssid and psk as told.
Sidenote: Is a password containing stuff like " ! or @" a problem? or a WLAN SSID containing blanks an "," ?
Running this setup i got no problems connecting to octoprint server with a LAN cable but i wont get the pi to join my WLAN.

Got some further technical information here:
Tunneling ssh to the pi and using "ifconfig" shows:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.98 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 fe80::929:d3d5:5b4:cdee prefixlen 64 scopeid 0x20
inet6 2003:c4:f713:5200:7ab0:56c2:c7f8:461b prefixlen 64 scopeid 0x0
ether b8:27:eb:05:73:89 txqueuelen 1000 (Ethernet)...

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)...

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether e8:94:f6:21:2c:15 txqueuelen 1000 (Ethernet)...

(I cut of the RX and TX Packetloss information stuff)

Running sudo iwlist wlan0 scan the pi can actually see my WLAN and it gives back:

Cell 04 - Address: C8:0E:14:56:63:25
ESSID:"xyzxyz 2,4GHz"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.442 GHz (Channel 7)
Encryption key:on
Bit Rates:144 Mb/s
Extra:wpa_ie= "i cut it out here"
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra:rsn_ie="i cut that out aswell"
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: "here where many capital letters and numbers"
Quality=0/100 Signal level=70/100

What i found irratating is that it says Quality 0/100...
Note: A installation of Volumio works with exact the same hardware just 100% fine (in the same WLAN, with the same WLAN Stick - so i doubt hardware issues).

Does anyone have a clue what is going on?

Edit: Just found out that the wpa supplicant.txt gets changed after i boot up the raspy to a version from this afternoon... - no idea why...

If that's the original Raspberry Pi Model B (not a 3B or a 4B) then it's probably underpowered for all this. I was just talking about this with a user whose OctoPrint is randomly losing its connection to the printer.

Thanks for the fast reply.
Yes it is an original Raspberry Pi Model B (which btw just killed my SD Card so i cant test right now with octopi installation)...
That was a great hint you gave. I thought a 40W 5V DC charger would do but i failed ... Measuring the Voltage between TP1 and TP2 on the raspy gave me values from 5.05V (in idle state) down to 4.55V on "heavy load"(== LED Flashing like crazy during bootup).

So i assume you were right. I will order a proper power supply and check if the problems persist. If not i mark my question as solved.
Thank you so much so far!

image

2 Likes

Did some measurements... i am not sure yet if the problem is / really was the charger...
Laboratory power supply (150W active PFC control and that stuff): TP1 - TP2 Voltage down to 4.6 V
raspberry pi 3 charger (2,5 Amps 5 V): about the same result (4,6V)
Cheap charger 40 W: 4,55V
That is really close to each other values...
Somehow weird is the fact that i am measuring these values where the USB Port got around 5.05 V (Stable).
Obviously i cant check the waveform and (faster then 50Hz) occuring voltage dips but that power supply issue does not seem like the real problem...
So far ... more tests to be done...

Raspbian triggers an undervoltage condition at/below the 4.64VDC threshold. If you powered the Pi at this level and you're seeing 5.05VDC on the serial line then it's possible that the other connected device is back-powering it...

Thanks for the threshold value, ill keep that in mind.
I wondered aswell if an attached LAN Cable could backpower, but the last measurements i discribed were with nothing else then a wifi plug, a sd card and the power supplies.
Actually the TP1 TP2 voltage is 4.92V without anything attached to the pi although the micro usb got 5.05V... That seems weird to me...

Could you try instead BOARD pins 2 and 39 as seen in the link? It should show you 5V if you're in opposite corners of the GPIO pins.

Measurement 1: 5V to Ground: During Boot-Up voltage drops down to about the same values like before with the weak charger. Actually it seems to be exactly the same values -> 4.53V (cheap charger)

Measurement 2: 5V to Ground: During Boot-Up voltage drops slightly less down to 4.6V with the raspi charger. Somehow new: the voltage comes back to about 5.05 V a coulpe secounds after unplugging the wifi-stick and does not go down immediately after plugging it back in. Around 10 seconds after plugging it back in the voltage drops again. (Tested with TP-Link and Edimax stick, same performance)

Measurement 3: 5V to Ground: Doing the same with my laboratory power supply looks precisely the same as discribed above already.

So summing up: Looks like the same behaviour... maybe slightly different voltage levels. Honestly i dont know what i thought i could expect from these measurements but i would guess TP1 TP2 is just the 5V and Ground on the GPIO Pin. Guessing they are electrically the same...

This, in combination of your wifi dongle appears to be a combination for failure. Remove the wifi dongle, boot it up and test. If it can't maintain a solid 5V using the Raspberry Pi official 5V @ 2.5A power adapter then it's time to replace that Pi with a Raspberry Pi 3B, 3B+ or a 4B.

Hello again,

thanks so far for all the hints and help provided. The raspi couldnt really maintain the 5V on the GPIO Pins at all. So the Wifi Stick will be all the load it has to manage. No more experiments.
With the work done and the hints provided i did a cut here and ordered a raspi 3b+.
The raspi 1 B will serve as only a volumino server in the kids room playing via 2 active speakers.

Thanks again to everyone who helped me out there !
eaZy