OctoPi WiFi/network connection troubleshooting megatopic

I don't have 2 devices with same ip. I checked, just in case I rebooted the rasp several times and got different ip's each time.
net mask is 255.255.255.0 in all my devices, it's set by the DHCP server

Currently my iPhone sees my octopi, but my laptop doesn't... My cellphone can see my NAS, my laptop can see my NAS as well. Everyone is connected to internet (octopi included).

I stetted my router to give a specific address to the raspberry using his mac adress. It did work for a few minutes, then suddenly my laptop lost it (cannot ping anymore nor connect) I have tried changing the wifi access( I have 2 wifi points) nothing works. I'm currently in despair. Thanks

Edit: I just disabled wifi on my phone, enabled it and octopi is gone, can't contact it in any way nor connect to it from my cellphone anymore. If I reboot everything I'm pretty sure I'll be able to connect to it again, but as soon as my laptop of iPhone disconnects and reconnects to the wifi the octopi will be gone. :frowning:

Edit2: I just rebooted the raspberry nothing else. After reboot my laptop sees it again. If I disconnect my laptop from wifi, then after reconnecting back it doesn't sees the Pi

You should write down a list of...

Things I know

Things I don't know


It would be helpful to confirm that your attempt to give the Raspi a static IP address is working. (Reboot several times and run an ifconfig on it to confirm each time.)

It would be helpful to confirm that your router has the Raspi in its DHCP table and in its Attached Devices table as well.

It would be helpful to know if your workstation now has a hosts file entry for the Raspberry as described earlier.

Interestingly, I'm not seeing ssh broadcast over Bonjour for my OctoPrint install. I rather thought it would.

Did you change the default name of "octopi"? If so, does it have spaces in it or is it longer than 13 characters?

The static ip is working. if I reboot the rapsberry I can access it from the laptop until I disconnect the laptop from the wifi. The hosts file is correctly configured on my laptop. When my laptop sees the rapsberry, ip and octopi.local works well. I haven't changed the default name, it's still octopi.

It's very strange. If I reboot the Pi, then just after it reboots I can ping it's ip from the laptop. If I disconnect the laptop from wifi(or put the laptop to sleep) then the ping ip stops working. I have tryed with 2 laptops. The first one will do a constant ping to the Pi, the second one I would do ping, then unconnect from wifi, reconnect and then the ping will not work at all (while still working on the first laptop, so the Pi it's well alive and still has the same ip). The laptop receives the same ip configuration when reconnecting to the wifi.

The only thing I haven't tried is setting static ip on my laptop, I'll try that this evening.

Edit: I have been thinking for a while about getting a mesh system fro my house, currently thinking about swapping out all my wifi access points for a single mesh and try to get a better network stability.

That sounds familiar. Is your laptop UNIX (Linux/Debian/Ubuntu or similar)? The Broadcom chip is probably the most popular wi-fi chip because it's so inexpensive. And the drivers in the UNIX world for it are painfully stupid in the area of returning from the power-saving or sleep modes.

Another possibility is if you have multiple access points using the same wi-fi zone name, that simple action of disconnecting-then-reconnecting could be changing access points. It's possible then that one of your access points has a bad routing table.

You mentioned that you can't ping the Raspi when you've disconnected wi-fi on the laptop. I have to assume that you also have a wired Ethernet connection. Since that has to be the case, your router has a problem routing between the two. If you've setup your wi-fi as a Guest network then this would be a possible reason. That implies segregation and blocking of data to/from each.

I explained bad, sorry. I have a macbook pro with mojave. If I disconnect from wifi and then reconnect to wifi I will loose contact with octopi, only way to regain contact would be to reboot the router and the pi. The NAS, the router and both wifi access points are reachable from my laptop no matter what I do. Also no matter the circonstances, the Pi is able to reach then as, internet, the routers, etc. I have even tested 2 laptops, both pinging the pi, then I would disconnect my laptop's wifi and reconnect to the same wifi point, then the laptop would not see anymore the pi. Also if I connect a wired connection to the pi, everything works as expected, even if I use the wifi ip of the rasp, everything just works.

It's very difficult to properly explain. I'm thinking something is not right with the wifi access points or the router DHCP not properly working.

Did you mention Mojave earlier?

It's entirely possible that Apple is "doing their thing" again where they exercise something called "planned obsolescence". In my case, my two older iPad IIs, the iPhone 4 and the older MacBook no longer receive updates. In the case of the mobile ones, this means that newly-compiled apps won't work on them. On the Developer's side of things, they can't compile to new things unless they update X-Code. And the new X-Code won't allow you to compile to earlier iOS versions. In the aggregate, Apple is forcing obsolescence.

Take this now to what we're seeing. What if the version of Bonjour running in the OctoPi-image of OctoPrint is so old that Mojave doesn't always see it? Bonjour of course is a hostname/service discovery protocol.

But of course, it could be just buggy new code from Apple since Mojave isn't really released yet, right?

When I teach this evening, I will likely have to connect an Ethernet cable at the school. Their own wi-fi network has a variety of problems. Perhaps it's time for you to just compromise with the all-wired solution until Apple coughs up a few updates for your wi-fi drivers, etc.

I do have an ethernet cable attached, that's how i've been able to SSH in to make changes.
dmesg gives me a ton of information, none of which appears to be about wifi at a glance. The main thing that sticks out is red text after cdc_acm and brcmfmac.

Locales were configured for en_GB UTF-8, so I got it switched to en_US UTF-8. I was also able to change country and timezone to US and PDT, as they should be. Wifi legal channels switched to US.

Unfortunately, i'm still not able to connect via wifi. After implementing these changes, the only thing i've noticed is that I no longer have dropped packets on wlan0 - or any other sign of packet activity.

Also, the Mac Address for wlan0 now shows up in my router's ARP table as having had an address assigned to it - it's just disconnected, and I can't ping it.

Sounds familiar to this, to be honest. And this appears to be the open issue regarding it. Follow the second link and read the one about disabling power management on the wifi.

It might fix itself if you do a:

sudo apt-get update
sudo apt-get -y upgrade
# reboot

Hello all,

I believe this is where I respond if I am looking for troubleshooting help, someone please correct me if I am wrong.

What I have
I have a Pi 3 model B+ running octopirint 0.15.1

The Problem
I can't seem to connect to the wifi. I am a novice at best when it comes to raspberry Pi's, but I was able to figure out through the "ifconfig" command that I simply am not connected and I am not getting an IP from the network. As per the troubleshooting guides, I see that it says "UP, BROADCAST, MULTICAST" where it should be showing me my IP address.

What I Tried
So, I searched using "sudo iwlist wlan0 scan" and I found the wifi network I was trying to connect to in that output. The ESSID displayed by the scan is identical to the one in my WPA2 cupplicant file. I have triple checked the password and I know its right. However, I still have no IP and no connection.

Where do I go from here my friends? it seems to be seeing the network, just refusing to make any attempt to connect.

Hello, I am using octopi software for the wifi in my printer, but i am unable to get the ip address of the same can you please help me out with this. The green light on the pi is blinking continously and i am using the ANGRY IP ADDRESS software, but i cannot find the octopi.local option anywhere. Please help me out .

Hi Rishabh_Tyagi,

you could try to log in to your WiFi Router/AP device, that device should have a list of connected clients somewhere. Maybe you can find your R-Pi there. If your WiFi Router/AP is also your DHCP server (the device assigning an IP address) there should also be a list of DHCP leases that you could look for. It would usually show up with the host name.

The other way would be to connect a screen and keyboard to your R-Pi, log in and issue:

ifconfig

That should present you with a list of interfaces and the ip address would be there as well

pi@parvus:~ $ ifconfig 
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:2b:fa:d7  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.200.0.138  netmask 255.255.255.0  broadcast 10.200.0.255
        inet6 fe80::de4d:d7f4:cb77:c963  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:7e:af:82  txqueuelen 1000  (Ethernet)
        RX packets 1295977  bytes 1316970066 (1.2 GiB)
        RX errors 0  dropped 24598  overruns 0  frame 0
        TX packets 390609  bytes 35328255 (33.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The 2nd line on interface wlan0 after inet in the case above. Thats obviously not your output but it should be in the same location.

Regards
Jan P.

Hi rennoc99,

if your R-Pi is connected to the WiFi network you should be able to issue the following:

sudo iwgetid

If connected it should give you the SSID you are connected to. If not then its not actually connected.

Regards
Jan P.

PS: My guess is its not actually connected, just noticed you wrote that ifconfig is giving you "UP, BROADCAST, MULTICAST", if connected it should be "UP,BROADCAST,RUNNING,MULTICAST".

Hello,

I've also been struggling with getting the network working on the pre-built octopi image (0.15.1). This is a long post, but I've already tried every trick I know to diagnose this issue. So to bypass all the usual suggestions which would waste time, I've outlined everything I've done so far. I'm clearly missing something and have used the RPi (and Linux before that) for many years.

The adapters are enabled and appear in the list of adapters (ifconfig).

This is where it gets weird; the adapters are getting an ip address from... someplace... however the address is not from my local subnet. My subnet is 192.168.4.x, whereas the ip addresses the Pi is getting are from 192.168.7.x.

I'm using another RPi on my network to handle DHCP and DNS (using dnsmasq). The main router and all Wifi access points DO NOT have DHCP enabled. For all other devices on the network, it functions correctly. When I assign a static IP address to the Wifi which lies in the proper range for the local subnet, it works. Aside from the RPi DHCP/DNS server, I have another RPi running Raspian, and it functions just fine, like all other devices.

When I look at the syslog, I can see the DHCP queries and someone is answering with an ip address of 192.168.7.39. The logs show it's coming from 192.168.7.1. The DHCP client also sets the router/gateway to that address. I cannot ping that address (destination host unreachable)... nor can I even get a MAC address for it using arp. I have no idea where that response is coming from. I can even plug in a physical ethernet cable, and it too gets and address from the wrong subnet, 192.168.7.40. I am wondering if there is some left-over configuration on the Octopi image that is somehow interfering with the DHCP query.

I've tried deleting the cached DHCP lease files from /var/lib/dhcpcd5/ and manually run sudo dhclient -i wlan0 -v with the same results (getting a bogus ip address from some mystery dhcp server). I've even looked for a rogue access point from a neighbor using a wifi analyzer tool. sudo iwlist wlan0 scan shows all the same available networks as other devices.

Kylix.rd,

if that would be the case then nobody would have success setting up their Octoprint. I did a quick search through the files in /etc/ and can not find any file containing 192.168.7.

However, if you have other Linux devices in your network you could check for a rogue DHCP server with nmap from one of those devices that have success via DHCP.

sudo nmap --script broadcast-dhcp-discover -e wlan0

Change the inteface to eth0 or what ever is connected to your local LAN.

Jan P.

PS: You could also run a search yourself on your Octoprint host:

grep -Ril "192.168.7." /etc/

If it were me, I'd chase the other end of that Ethernet cable so that I could find what's issuing 192.168.7.0/24.

Thanks for responses,

I've tried the nmap thing (on both eth0 & wlan0) and it doesn't show anything... not even the DHCP negotiation logs... odd.

I've tried to search /etc/ for any references to 192.168.7 and also came up empty.

As for the other end of the ethernet cable, it lands back at the same physical switch on which other devices are working just fine. Swapping ports around on the switch yields no change in behavior.

I'm sure it is something up with my local network. I'm just not sure what it could be since all other devices work on the same hardwired ethernet cable and/or the same WiFi access point.

The next thing I may have to do is plug into a hub and fire up wireshark on another machine... I'm also going to flash the latest full Raspian image and boot that up and see if that works.

When I assign a valid ip address to the Wifi adapter, I can use dhcping to get a lease from the actual RPi dhcp server (192.168.4.75). If I use dhclient, it then forces the Wifi adapter back to 192.168.7.39...

I know it works as long as I assign a static IP... I'd just rather not have to do that.

Okay, so the Ethernet switch has several RJ-45 jacks. You could reasonably rule out the one which goes to your Raspberry Pi since it's the DHCP client. On the good side, at least it's not one of your neighbors' routers which is open. You know that your DHCP server is on one of those other Ethernet cables going to that Ethernet switch.

You assert that your router's DHCP server is turned off but I'm guessing you might be wrong about that. Use trial and error to figure out which computer is serving up 192.168.7.0. Verify that your router doesn't have a Guest network.

Again, thanks for the responses and the ideas.

As for the router and access points, I've verified that they indeed do not have DHCP enabled.

Ok, now for the really strange; I got home from work this afternoon and found that sometime during the day, the whole house had lost power... Computers off or rebooted, microwave and oven clock flashing, security cameras parked in their home positions, etc...

On a lark, I plugged back in the cable to eth0, then ran ifconfig... Now it's getting the right IP addresses! Wherever this phantom DHCP server was, it's now gone! I then ran sudo dhclient -i wlan0 and after it completed, ran ifconfig and wlan0 has the right IP (192.168.4.136).

I really hate phantom problems that go away when power-cycled. Grrr...

If this ever comes back, I'll have to start isolating sections of the network by unplugging the various switches and access points throughout the house.

Boy, I feel sheepish...

Thanks for the help.

You might want to verify that your security camera isn't serving this up. It's also worth attempting to verify that it hasn't been hacked. Literally thousands of them are, btw.

hello sir thank you for the useful information

But i have tried the following

  1. I have used the software angry ip address and then looked for the ip address of the pi i couldnt find it

  2. i installed all the necessary software in the pi and got the ip address 192.168.137.101. when i am writing the octopi to PI and then entering the before mentioned ip address i am not getting the required page from putty.

Please help me out

Waiting for your reply

Regards,

Rishabh