OctoPi WiFi/network connection troubleshooting megatopic

troubleshooting
wifi

#121

Note that in booting up, OctoPi's setup will take the contents of /boot/octopi-wpa-supplicant.txt and apply this to /etc/wpa_supplicant/wpa_supplicant.conf at the moment of truth if that update_config=1 is set.

In the Pixel (Desktop) panel applet at the top of the menu when you make changes there it directly goes to /etc/wpa_supplicant/wpa_supplicant.conf but it won't write any changes to '/boot/octopi-wpa-supplicant.txt` since it knows nothing about that.


#122

Hello all,

I'm experiencing the same problem connecting to my WiFi network with OctoPi.
Nothing i have tried worked!

I have raspberry pi 3 b+ and i am using it for more than 6 months and i know for sure the WiFi is working properly.

However when i try to connect from OctoPi It just wont work.
Mind that i have flushed multiple times back and forth from OctoPi and official raspbian OS.
On raspbian OS the WiFi works perfectly and connects immediately as i configure the wlan0 settings with my ssid and password.

However when i flush the OS to OctoPi it wont work no matter what i do.
I tried upgrading OctoPI's OS, I tried not upgrading, tried 2 different USB WiFi adapters.
I have even tried disabling the encryption my WiFI router i even tried several different inscription combinations.

Not to mention all the possible configurations of the config files.
/boot/octopi-wpa-supplicant.txt
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/network/interfaces

It just wont connect, i have spent the last 2+ days trying to make it work.
I even tried to create a hot spot using my galaxy S7 and noting.

OctoPi just wont connect...
The most frustrating thing is that i can see mine and others network ssid when scanning with iwlist wlan0 scan
and when i flush the OS to something else it will connect with no problems.

I'm beginning to think there is an inherent problem with OctoPi it self.
Connecting the raspberry directly to the router works fine by the way, its only the WiFi that wont connect.

Any ideas on how to fix it?


#123

@NeoLoger Share the contents of your /boot/octopi-wpa-supplicant.txt file (redacting your password).


#124

Here is my /boot/octopi-wpa-supplicant.txt in it's all entirety to make sure i'm not missing anything.

# Use this file to configure your wifi connection(s).
#
# Just uncomment the lines prefixed with a single # of the configuration
# that matches your wifi setup and fill in SSID and passphrase.
#
# You can configure multiple wifi connections by adding more 'network'
# blocks.
#
# See https://linux.die.net/man/5/wpa_supplicant.conf
# (or 'man -s 5 wpa_supplicant.conf') for advanced options going beyond
# the examples provided below (e.g. various WPA Enterprise setups).
#
# !!!!! HEADS-UP WINDOWS USERS !!!!!
#
# Do not use Wordpad for editing this file, it will mangle it and your
# configuration won't work. Use a proper text editor instead.
# Recommended: Notepad++, VSCode, Atom, SublimeText.
#
# !!!!! HEADS-UP MACOSX USERS !!!!!
#
# If you use Textedit to edit this file make sure to use "plain text format"
# and "disable smart quotes" in "Textedit > Preferences", otherwise Textedit
# will use none-compatible characters and your network configuration won't
# work!

## WPA/WPA2 secured
network={
  ssid="Hell_Yeah"
  psk="mypass"
}

## Open/unsecured
#network={
#  ssid="Hell_Yeah"
#  key_mgmt=NONE
#}

## WEP "secured"
##
## WEP can be cracked within minutes. If your network is still relying on this
## encryption scheme you should seriously consider to update your network ASAP.
#network={
#  ssid="put SSID here"
#  key_mgmt=NONE
#  wep_key0="put password here"
#  wep_tx_keyidx=0
#}

# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
# For full list see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
country=IL
#country=CA # Canada
#country=DE # Germany
#country=FR # France
#country=US # United States

### You should not have to change the lines below #####################

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

#125

It looks reasonably good. You might try moving the network paragraph to be at the end. And try adding the key management as I've done below.

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

network={
  ssid="Hell_Yeah"
  psk="mypass"
  key_mgmt=WPA-PSK
}

#126

Thank you, but this changes nothing.
Its still exactly the same file just without the comments and key_mgmt=WPA-PSK in addition.

I already tried this and more... the WiFi just wont connect.
Is it possible the the OctoPi comes with the wrong drivers to wireless LAN chip for the pi 3 b+ model?


#127

When the first 3B+ came out, there were problems like that. But the newer images are compatible.

You might try moving the Raspi if it's anywhere close to something metal (like a radiator).

If it were me, I'd work locally on the Raspberry with a keyboard/mouse/monitor until I got this resolved. I would ignore the /boot/octopi-wpa-supplicant.txt file and concentrate on the /etc/wpa_supplicant/wpa_supplicant.conf version of this (which is what gets updated by OctoPi).

I would run ifconfig and scan for the wi-fi zones the Raspi can see. From there, I would review the signal strength. Go to the top of that link and see if the troubleshooter helps at all.


#128

I cannot get my raspberry Pi 3 to connect to my wifi network. I am running octopi 15.1 andI followed the instruction of editing the wpa-supplicant file and adding my ssid and pasw. Also tried editing /etc/network/interfaces but that also did not work. When I type ifconfig my wlan0 does not have a valid ip address; instead of having an IP 192.168.X.X it has an ether b8: 27: eb:........ I also tried setting up a static IP but due to the fact that I do not have an IP available I cannot do so.

With my initial setup everything worked well. However, after a reboot, all connectivity was lost. I might get the wifi to work again after a number of frustrating reboot attempts. So that tella me that it might be my DHCP server on my router? Not sure how to fix it though. Could anyone help please?


#129

It's /boot/octopi-wpa-supplicant.txt, btw.

Raspbian doesn't use that anymore; it uses the wpa_supplicant service.

You're looking for the word RUNNING in the flags collection. Without that, then you didn't get issued an IP address.

Try going through my troubleshooting guide, following along for the part that mentions OctoPi.


#130

The signal is fine my raspberry is almost on top of the router

Here are the results of iwlist wlan0 scan:

          Cell 01 - Address: FC:75:16:53:13:11
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=70/70  Signal level=-27 dBm
                    Encryption key:on
                    ESSID:"Hell_Yeah"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000000000000000
                    Extra: Last beacon: 10ms ago
                    IE: Unknown: 000948656C6C5F59656168
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030106
                    IE: Unknown: 050400010000
                    IE: Unknown: 2A0104
                    IE: Unknown: 2F0104
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 32040C121860
                    IE: Unknown: 2D1A7E181BFFFF000001000000000000000000000000000000000000
                    IE: Unknown: 3D16060D0400000000000000000000000000000000000000
                    IE: Unknown: DD090010180201F0050000
                    IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
                    IE: Unknown: DD1E00904C337E181BFFFF000001000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C34060D0400000000000000000000000000000000000000

I was going over the logs and i noticed that the WiFi manages connect briefly and then timidly loses connection.
on the log: cat /var/log/daemon.log | grep 'wlan0'

> Dec 21 21:18:22 octopi dhcpcd-run-hooks[382]: wlan0: starting wpa_supplicant
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: waiting for carrier
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: carrier acquired
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: IAID eb:75:d2:d4
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: adding address fe80::e181:ebf4:536f:116e
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: probing address 10.0.0.8/24
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: carrier lost
> Dec 21 21:18:23 octopi dhcpcd[346]: wlan0: deleting address fe80::e181:ebf4:536f:116e

I have no idea what to do, I need help.


#131

Is that a valid network? Although the 10.0.0.0/8 space is unroutable as a public IP range, it's reserved for private networks. That doesn't mean that all network ranges within that are routable. It's just some weird thing that would take more time to explain than it is to fix.

On your wi-fi router, is it possible to change the local network from 10.0.0.x to 10.1.1.x instead? The netmask should be either 24 or 255.255.255.0 depending upon their interface. Issue the wi-fi router the lowest address, like 10.1.1.1 in this case.

My best guess is that your wi-fi router then is trying to issue an un-routable IP network range. PacBell once tried to issue me an unroutable address once and I had to school the engineer on how routing worked. He then had an "aha!" moment, ran out to his van and brought me a newer router that was patched to allow this oddness.

Short version: Assume that the Raspi is old-school and can't work with 10.0.0.0/24 as an IP network.


#132

I've tried both a new Raspberry Pi 3 and a 3 B+ and though I can get them to work through an Ethernet Cable Connection. They refuse to connect with the WIFI.

I've tried running through both the Octopi 15.01 Version as well as loading Raspian and going through the source file input. The difference is that with the Source file input, while connected through the Ethernet Cable. Rapsin can't find octoprint.org latest version or anything else. The one good thing about using the Raspian install method though is that I am able to upgrade pip to version 18.01. Whereas trying to upgrade pip on the Octopi Version 15.1 is damned near impossible.

Last login: Fri Dec 21 03:51:14 2018
pi@raspberrypi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.15 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::b725:6ab:8ea9:3286 prefixlen 64 scopeid 0x20
inet6 fd00:788d:f74f:4392:d487:bbfe:7c53:441c prefixlen 64 scopeid 0x0
inet6 2607:fea8:98e0:68a:7219:df42:4321:483a prefixlen 64 scopeid 0x0
inet6 2607:fea8:98e0:68a::3 prefixlen 128 scopeid 0x0
ether b8:27:eb:b6:8e:b4 txqueuelen 1000 (Ethernet)
RX packets 917 bytes 136986 (133.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 487 bytes 38467 (37.5 KiB)
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
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=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:e3:db:e1 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
This is what I get when trying to set up through the Ethernet while attempting to get the WIFI to work while in Raspian. I can't even get this far trying to use OctoPrint when connected to the Ethernet.

Where would everyone suggest I go fro here.


#133

@Ronald_Lambier Show your octopi-wpa-supplicant.txt file contents, redacting your password.


#134

I've tried just about everything i can imagine with Octoprint that I can imagine as a correction. All to no avail. I've tried setting up a www.No-Ip.com account but adding the DUC Software to an existing Raspian System is damned near impossible. And let me tell you I've tried, as I have a relative who is a Cisco Engineer with 35 years experience programming Unix Computer Networks who gave up after numerous attempts over a one week period. I've also tried adding a TightVNC Network patch to a Raspberry Pi B3 + and had the same exact outcome. I now have my own 2 year subscription to a personal IP Address Domain that no one can figure out how to add to a Raspberry Pi.


#135

At this point it is obvious that OctoPrint is nothing more than a hit or miss maybe that might someday actually work as intended. It would obviously be a hell of a lot more useful if it were a way to make a 3D Printer a Networkable Printer on either a Mac or Windows Machine System. I'm about to quit pulling my hair out and make note that the OctoPrint System is nothing more than someones Pipe Dream. I know I'll never donate to the cause anymore, because this has been going on for more than a couple of years now.


#136

Is that a valid network? Although the 10.0.0.0/8 space is unroutable as a public IP range

This is the IP address 10.0.0.8/24 that i have assigned to my raspberry's WiFi MAC.
My router is issuing IP address using DHCP and my home network is sitting on 10.0.0.0/24

From my investigations it seems there might be several different Wireless network chip models for the
raspberry pi 3 b+ and the configuration of the Octopi image is creating some conflicts with the WiFI drivers.

I'm planing to install Octopi manually on a clean raspbian install witch i know for sure can connect to my WiFi
network because I'm starring at it right now, and its connected.

I'll let you know if this will fix my problem.
But looking at the setup guide this may take awhile.

Please let me know if you figure out a fix for this.


#137

I'm suggesting that 10.0.0.0/24 is not a valid network address. Try 10.1.1.0/24 instead.

Yes, this might have worked on some of your computers at home. In my understanding of tcp/ip, there are places within this space which include zones which aren't routable. The first bit and the last bit are not.

With respect to /24 netmasking:

10.0.0.0/24        isn't valid
10.0.1.0/24        is the first valid network address
...
10.255.254.0/24    is the last valid network address
10.255.255.0/24    isn't valid

It's technical, but that's just the way it is. When people suggest that 10.0.0.0 is kosher, they don't actually mean that you're expected to issue beginning with this. They (wrongly) assume that you know to skip past the invalid early part.


A valid setup is to issue 10.0.0.0/8 with a tiny netmask. In this case, you have 1 network and 16,777,214 hosts possible and they begin with "10.0.0.1" and go through "10.255.255.254".

Changing the netmask to 10.0.0.0/9 means that you want more of that to indicate networks and less of that to indicate hosts. At this point, though, you now start having to throw away invalid/unroutable network options. That's just how this works. Hopefully you realize that what I'm saying is true.


#138

What is the problem? Wifi wint connect

What did you already try to solve it? Everything in the trouble shooting guide

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...) latest stable vrsion


#139

You've given us NINE WORDS.

c'mon.


#140

sorry this is my first time posting here i will describe better whats going on...I followed the setup guide ect...i have tried many different ways but i do know the PI sees the wireless network it just wont connect i have tried moving the country= #us to before the network in the wpa file and still wont connect i have disables the firewall in my router no joy...i can SSH into the pi as long as it is plugged into the router via eathernet cable and optoprint works fine...i purchased the PiHut usb wifi adapter to try and it works perfect on my laptop but wont work on the PI i have ran out of options so thought i would ask here see if anybody could please help me figure this out if possible