Something strange, if I plug the network wire both ip's work (192.168.0.33 and 192.168.0.69) if I unplug the network wire nothing works...
Now that I've formatted your output with backticks (three to start, three to end), it now looks a little easier to analyze.
Your MacBook has the following bound IPv4 addresses:
- en0: 192.168.0.17 with a netmask of /24 broadcast 192.168.0.255 (presumably wi-fi)
Your Raspberry Pi has the following bound IPv4 addresses:
- wlan0: 192.168.0.69 with a netmask of /24 broadcast 192.168.0.255 (wi-fi)
- enxb827eb022c1f: 192.168.0.33 with a netmask of /24 broadcast 192.168.0.255 (presumably Ethernet but this is the strangest device name)
On the Raspberry, are you using an Ethernet network dongle or an additional wi-fi network dongle (USB-based)? That device name is just unreal for want of a better term.
Initially, it looks good. The netmask/broadcast address for each look reasonable.
On the MacBook, netstat -nr|grep default|grep -v "::"
should indicate your MacBook's default route in the second column which ought to be something like 192.168.0.1 for your router (assuming that this is its address). If it's instead the IP address of one of the access points then this is probably a setup problem with your network.
Similarly on the Raspberry, netstat -nr|grep UG
should indicate its default route in the second column. Again, it should be 192.168.0.1 in your case. I'm guessing that this one is correct.
As for that odd-looking device name, it's possible that this got toggled in sudo raspi-config
-> Network:
From your add-on message, if the Raspberry Pi's Ethernet device has a default route set (but not the wi-fi device), then it could work in the way you described.
Well it's something related to my network for sure. I installed dietpi with octo print 0.13 on a second raspberry pi, same behaviour, installed octo print 0.14 same behaviour. Reinstalled octoprint 0.15 and rebooted everything in my house (switch, router, nas, access point) and suddenly it works again. The wifi is responding I have the web page octopi.local, everything works as expected. Problem solved?
Edit: I lost contact again with the pi problem is back (currently it's printing, but I can't access it)
@Drake_Coldwinter Yes and no. If you're into troubleshooting things, you might look at the DHCP lease length that your router is handing out (or the access points themselves). It's possible and even likely that your leases were causing you these troubles.
DHCP Lease time 1 hour. What should I put ?
Just got the record, those version numbers up there were those of OctoPi (the SD card image including OctoPrint, among other things).
Assuming that your home network has less than twenty devices within approximately 250 or so unique addresses within a Class C, you could easily set that to 30 days.
A one-hour DHCP lease is what you'd have in a typical coffee shop where you need to quickly recycle the same set of addresses over and over during a typical 8-hour shift.
[Solved] Using gnome-disk-utility 3.26.1 to flash OctoPi 0.15.1 with Ubuntu 17.10
When I diagnosed (i.e. with a keyboard and screen) the Pi 3B+ with sudo iwlist wlan0 scan | grep ESSID
, it discovered the wireless access point, yet ifconfig wlan0
showed that no address was obtained despite having configured the network in /boot/octopi-wpa-supplicant.txt.
I just wanted to share how I solved my own problem, essentially by re-flashing OctoPi, on Ubuntu 17.10 / Gnome, Wayland. What I noticed as a red flag initially was a filesystem owned by root. Files in /boot didn't allow themselves to be edited as user.
- Installed gparted
sudo apt install gparted
- Ran gparted
xhost +si:localuser:root && sudo gparted
- Selected /dev/mmcblk, erased all partitions on microSD
- Went to Device > Create Partition Table > msdos
- Ran
gnome-disk-utility
, Menu>Restore File> 2018-04-18-octopi-stretch-lite-0.15.1.img - Waited 2 minutes to write, then reinserted/remounted
- Uncommented lines in /boot/octopi-wpa-supplicant.txt and added network information
- Used a Leviton 3.6A USB outlet and a thick PS4 cable to suppress low power warnings
- Inserted the card/filesystem into the Pi 3B and plugged it in
- Installed an IP discovery tool to avoid diagnosing the IP address
sudo apt install nmap
and found the IP address remotelynmap -v -sn 192.168.x.0/24
(found 'x' by runninggnome-control-center
> WiFi > Details > IPv4 Address) and ssh'd into the pi
@Jordan That sounds a bit like overkill to me. The first installation was likely missing something in the area of wi-fi setup. For example, the country code needs to be set and before the network paragraph in octopi-wpa-supplicant.txt
.
I got mine to work finally , I connected the internet straight from the ISP WIFI/Modem box into the NightHawk instead of the ISP WIFI/Modem>Switch>Nighthawk then connected my switch to the ports on the back of the Nighthawk . I can access through WiFi now through any device but order for me to access it through my main desktop(LAN) since its on a different network I would need to disconnect it from the ISP box instead, into the Nighthawk or the switch, which isn't hard but I'm too lazy but I think I'd solved it.
I'm still having troubles. If I reboot the octopi and the router, then just afterwards my laptop may connect (or not, doesn't always work) to the octopi web page (using ip only). Then a few hours later it will simply not work. I have set the dhcp lease to 70 days and I tried to enable the dhcp on my switch(disable router dhcp) but it was still not working at all.
I have been reading that if other hardware on the network uses a .local adress then it can cause troubles. I have my NAS who uses http://wdmycloud.local can it be the source of the troubles?
@Drake_Coldwinter I don't think your NAS is the problem here, to be honest.
Possible reasons
- If two devices on your network get the same IP address then oddness like this can occur (intermittent connectivity).
- If any of your devices have the wrong netmask set, it can be problematic.
- If any of your devices have two network connections and a default gateway set for more than just one adapter, then it can cause problems.
Sometimes helpful
- Issue a static IP address to your Raspberry Pi by its MAC address in your router
- Add an entry into your workstation's
/etc/hosts
(Linux),/private/etc/hosts
(OSX) orC:\Windows\SYSTEM32\drivers\etc\hosts
(Windows) file for your Raspberry Pi. This reasonably cuts out DNS, NETBIOS and Bonjour for name resolution. -
ping octopi.local
should make sure that its entry is in your local ARP cache, helping things.
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.
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.