OctoPi WiFi/network connection troubleshooting megatopic

troubleshooting
wifi

#21

Capitalized US to no avail. I've also reorganized my code. The only special characters in my passkey would be the same as any in "P@$$W0rd!"
Took a stab at reorganizing the code to fit other formats i've seen, and no dice.

update_config=1
ctrl_interface=/var/run/wpa_supplicant
country=US

network={
 ssid="Network Name"
 psk="P@$$w0rd!"
 key_mgmt=WPA-PSK
}

This is the sole device to have issues getting connected to my wireless network.


#22

@Romkslrqusz

Is your wi-fi zone on your router hidden?
Is this a Raspberry Pi 3B+ (emphasis on the plus)? Sounds like it's not but it's worth checking. The new ones appear to have limited range.

(Having connected via Ethernet or by logging in locally on the Raspi), can we get the output of both...

ifconfig
sudo iwlist wlan0 scan

#23

SSID is not being hidden, and it's just the RPi3 Model B

ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.185  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f7:4fe7:4cad:a0  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:43:66:61  txqueuelen 1000  (Ethernet)
        RX packets 34037046  bytes 1964551361 (1.8 GiB)
        RX errors 0  dropped 127  overruns 0  frame 0
        TX packets 82524281  bytes 121949099448 (113.5 GiB)
        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 7063757  bytes 117464163786 (109.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7063757  bytes 117464163786 (109.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:16:33:34  txqueuelen 1000  (Ethernet)
        RX packets 6367  bytes 1440732 (1.3 MiB)
        RX errors 0  dropped 11  overruns 0  frame 0
        TX packets 1268  bytes 402879 (393.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

iwlist shows all detected wifi networks, including my own:

          Cell 10 - Address: 54:B8:0A:35:E5:96
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=62/70  Signal level=-48 dBm
                    Encryption key:on
                    ESSID:"My Network"
                    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: 50ms ago
                    IE: Unknown: 000F426F726720436F6C6C656374697665
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030106
                    IE: Unknown: 050400010100
                    IE: Unknown: 2A0100
                    IE: Unknown: 32040C121860
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 0B0500001F0000
                    IE: Unknown: 2D1AAD0117FFFFFF0001000000000000000000000000001804011100
                    IE: Unknown: 3D1606080000000000000000000000000000000000000000
                    IE: Unknown: 4A0E14000A002C01C800140005001900
                    IE: Unknown: 7F080500000000000040
                    IE: Unknown: DD1E00904C0408BF0CB259820FEAFF0000EAFF0000C0050006000000C3020002
                    IE: Unknown: DD090010180200001C0000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD180050F2020101840003A4000027A4000042435E0062322F00

#24

Well, it sees your wi-fi network, it's participating in some traffic but it hasn't linked in nor has it received an IP address from your router (which you know of course). The signal strength is likely strong enough. Your router supports WPA/WPA2 so your octopi-wpa-supplicant.txt file is correct.

It looks like you've got an Ethernet cable attached. If that's not the case then there's a mixup of device names. There's a setting in sudo raspi-config that can re-assign device names for some reason but I'll assume that you've got an Ethernet cable plugged in for this.

I think I would try a dmesg to see if anything shows up.

Visit sudo raspi-config to adjust Localisation -> Country and Timezone and reboot.


#25

I just bought a raspberry pi 3 B+ and I successfully setup OctoPrint but the is problem when I switch to WiFi it connects to the WiFi router successfully but It can’t access the site or the SSH but when I switch back to LAN everything works perfectly but it’s just with WiFi it can’t be reached at all .


#26

Hi!
Do you connect by IP or via octopi.local?


#27

I am using the IP Address.


#28

So you are aware, that the WiFi connection uses another IP?
When you are connected to the Pi via cable, login via SSH.
There you type in

ifconfig

Then you get a list of the connectors.
it looks like this

pi@octopi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.9  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::3bd1:3b85:d000:a32d  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:37:76:20  txqueuelen 1000  (Ethernet)
        RX packets 254317  bytes 60809571 (57.9 MiB)
        RX errors 0  dropped 30  overruns 0  frame 0
        TX packets 183602  bytes 74267835 (70.8 MiB)
        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  (Lokale Schleife)
        RX packets 221677  bytes 111987421 (106.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 221677  bytes 111987421 (106.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:62:23:75  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
pi@octopi:~ $

There you can find your actual IP addresses.
With mine, wlan0 has zero entries because I do not use WiFi.


#29

I found mine but when I enter it still no response .


#30
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.107  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 2601:444:4080:7e5::fddd  prefixlen 128  scopeid 0x0<global>
        inet6 fe80::a365:568c:ff7:ea45  prefixlen 64  scopeid 0x20<link>
        inet6 2601:444:4080:7e5:4185:3afd:82a3:8548  prefixlen 64  scopeid 0x0<g                                                                                                                                                                                                                                             lobal>
        ether b8:27:eb:43:ef:39  txqueuelen 1000  (Ethernet)
        RX packets 16503  bytes 8755031 (8.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7978  bytes 12840194 (12.2 MiB)
        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 10645  bytes 13928335 (13.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10645  bytes 13928335 (13.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.0.4  netmask 255.255.255.0  broadcast 172.16.0.255
        inet6 fe80::fe60:fd32:2c77:9f97  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:16:ba:6c  txqueuelen 1000  (Ethernet)
        RX packets 2328  bytes 513010 (500.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2367  bytes 669985 (654.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

#31

When I ping the address it times out


#32

The lan IP is 10.0.0.107
and the WiFi IP is 172.16.0.4 ?

That is weird, those are complete different networks...
Do you connect via the same router?


#33

Basically my network starts from modem then it goes to my Cisco switch and the from the switch it goes to my computer but also from the switch which a 24 port I have it going to my Netgear NightHawk as well . But for the cable that is going to my computer it goes to a mini switch which let me connect other stuff such as 2nd computer or a ip phone on my desk.


#34

So as I understand, the NightHawk grants internet accessibility for you IP phone (and maybe smart phones etc).
This router provides another IP range (172.16.0.x) for these devices.

Your PC is locked to the 10.0.0.x IP address range and is therefor not able to see, neither connect the OctoPrint server/Raspberry Pi via WiFi.

You could reconfigure the WiFi router to your 10.0.0.x address range to get access from your PC to the WiFi devices.

Forwarding could also be possible.


#35

The computer is through the 24 port Cisco switch which the nighthawk is also connected to the same switch but if I type the address on my phone it won’t show up even though my phone is connected to the same network as the pi via WiFi .


#36

That was my thinking, that your smart phone would have connection to OctoPrint/RasPi.

I had a similar installation some time ago: My main modem router did all the routing. On a distant point of the LAN I installed an old modem router with WiFi. With that one I switched off the router and modem abilities that only the LAN switch and the WiFi access point had been left over. That worked fine in a single IP range.


#37

My modem has it’s own WiFi as well , I’ll try to connect the pi to that instead of the nighthawk , I’ll let you know if it works or not , but during the mean time I’ll draw a graph of my network setup just Incase to show to you and others if needed .


#38

So I tried the the WiFi that’s built in the modem and when I type the ip for address for the WiFi via lan it works but when the lan is disconnected the address is no longer reachable , this is honestly giving me a headache :face_with_head_bandage:.


#39

Do you have another wifi connected to your network that you can access? Can you access it from another computer connected to the same wifi network? It seems like a routing problem to me, not octopi.


#40

In a case where you don't really understand the nuances of routers/firewalls/routing I think I'd suggest simply connecting your printer via Ethernet and do it that way. Networking is complicated; I've been an I.T. guy forever and it's not that easy.

For what it's worth, I'd guess that the default netmask for the 172.16.0.0 address range isn't /24 as your ifconfig thinks it is. Your NightHawk is probably configured incorrectly if it's bringing in new connections with the wrong netmask.