WiFi Interface Only Accessible When LAN Connected


#1

I'm brand new to the Raspberry Pi platform. I have a 3 B+ with the latest version of OctoPrint installed; I also ran the Update to verify that:
OctoPrint Version 1.3.8
OctoPi Version 0.15.0

I edited 'octopi-wpa-supplicant.txt' with my WiFi SSID, Password, and Country Code. Upon start up I get an IP address for the WiFi. I try to connect to that address from my Desktop and it fails.

If I plug in a LAN connection I am able to then access the OctoPi interface with both the LAN and the WiFi IPs... I am testing at work on a "corporate" Router/Access Points, if that matters. I haven't tried it on my home Router yet.

Please let me know if I need to upload any files.

Thanks,
fat


#2

When I got my B+ I had a very similar problem with the wifi. I'd assumed that editing the wpa-supplicant was all I needed to do, because all the raspi-config did was edit the wpa-supplicant FOR you

Well, it didn't seem to work that way, I couldn't get the thing to work properly until I edited BOTH wpa-supplicant AND raspi-config

Give that a try and see what happens


#3

Thanks Spyder! I don't see a raspi-config on my SD Card with OctoPrint. Am I missing something?


#4

After you ssh remotely into the pi, you should type this command...

sudo raspi-config

It will ask you for your password, which is the same one you use to log in

Then answer the questions in options 2 and 4, save, and reboot, and see what happens


#5

I had issues with the connection dropping with in feet of the access point and insufficient throughput when it was working (less than 2MBs ) went wired and all is good..


#6

Hey Spyder. Still no go after editing sudo raspi-config; however, I'm very happy that you pointed out how to get into that. I had been in there the other day and forgot how to get back to it :slight_smile:


#7

Thanks airscapes! I have a feeling I may have to run a cable into the room where my printer is. I had one there before but took it out so there's another project for me...


#8

Not sure what you mean by "corporate" router. Are you doing this at work ?


#9

Yes, I brought it into work. I will try from home tonight and if that doesn't work then I'll just run an Ethernet cable. I might do that anyway, but I'd love to get the WiFi working.


#10

made these to attach cat5 to the baseboad in the closet.. popped through the baseboard in both rooms into the closett..

cat5 hold down.stl (585.2 KB)


#11

That's awesome! Thanks for the STL upload :slight_smile:


#12

It's possible that your workstation is a little confused (arp and dns caches) since you've had two different IP addresses for the same destination host.

If you can remote into the Raspi (while the Ethernet cable is attached if that's the only way), then run an ifconfig so that we can see what IP address(es) are bound to what. en0 should be the Ethernet adapter and wlan0 should be the wifi.

Note that tcp port 22 is the standard port for remoting in via ssh. If your corporate I.T. is blocking port 22 on the wifi side of things, this might explain why you can't remote into it from there.


#13

Thanks OutsourcedGuru! I'm the IT guy here and I do have the WiFi setup in Guest Mode, so you are correct that port 22 on the WiFi is blocked. I'll hook it up at home tonight and see how that goes.


#14

There are two correct answer but I'll mark Spyder's as the Solution:

Thanks Spyder! The instructions need to add in the fact that raspi-config needs to be edited along with the octopi-wpa-supplicant.txt. For someone new to this platform it may not be understood that there is even a raspi-config.

Thanks OutsourcedGuru! Due to being on our Guest Wi-Fi network at the office, with limited resources built into the Guest network, I was not able to access OctoPrint via the Wi-Fi connection unless the Pi was also plugged in through Ethernet.

All the help is greatly appreciated, as I was able to use OctoPrint last night for two prints!
fat


#15

Just for the record, I'm confused. I didn't have to run raspi-config on my own 3+ with OctoPi 0.15, just editing the config file was enough.

Then again, I've heard from people who didn't set the country code and that then disabled WiFi until raspi-config was run manually (a change in Raspbian I btw find ridiculously stupid). Could that be what happened here? Otherwise I'm drawing a complete blank.


#16

My suggestion is that on his corporate wifi (confirmed), port 22 is blocked.

But we're hearing from others with Stretch/OctoPi that they're not connecting to wifi. I've perused many different forums and the Raspbian forum itself suggests that the /boot wpa-supplicant file must have the correct country code for the driver stack to load. In another place, it is suggested that the wlan0 stack won't load by default in Stretch because they forgot to add the line in /etc/wpa_supplicant/wpa_supplicant.conf in the distro:

ctrl_interface=/var/run/wpa_supplicant

#17

Hi foosel,

I may have misspoken because of the order that I did things in. I was having issues on our corporate Guest account which blocks many ports and other aspects of a home router. Therefore, I also edited the raspi-config while at the office and when I took my Pi home it worked flawlessly. I put two and two together, although that could have been a false positive. After reading your reply I realized all of this...

Sorry for any confusion this may cause anyone!


#18

As an experiment, I just loaded an SD card with a new Octopi. I made a copy of the wpa-supplicant, and saved it, then I put the SD card back into the raspi

I have this pi's wifi MAC address baked into my router, so, if it's talking, it'll always get 192.168.1.9

I booted it up, (having edited nothing yet) and I have no network at all (it's not connected to wired ethernet for this step) it says "network is unreachable". Well, of course it isn't

But... This is odd. My router IS seeing it, and assigning the IP already. Keep in mind, this isn't my reservation chart, this is my ACTIVE chart. And in case yer wondering, no, it doesn't ping, and, oddly enough, NMAP doesn't see it, which I don't understand
routergoofyness

Next, we edit the wpa-supplicant and see what happens...

Wow, strange things happening now...

It got the correct IP, and I can connect via SSH from my pc. HOWEVER, it won't ping the router that is assigning it the IP it currently has, and it won't ping outside my network. It DOES however, ping the pc that I am SSH'ing from. Now, NMAP sees this...

Discovered open port 22/tcp on 192.168.1.9
Discovered open port 443/tcp on 192.168.1.9
Discovered open port 80/tcp on 192.168.1.9
Initiating OS detection (try #1) against testingpi (192.168.1.9)
| ssl-cert: Subject: commonName=octopi
| Subject Alternative Name: DNS:octopi
| Issuer: commonName=octopi
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
|_ SSH-2.0-OpenSSH_7.4p1 Raspbian-10+deb9u3
not gonna bore you with the details cuz it actually found and displayed the following keys
| ssh-hostkey:
| 2048 XXX (RSA)
| 256 XXX (ECDSA)
|_ 256 XXX (ED25519)

So, it's talking, but, only to me. Okay, next we edit the raspi-config and see what happens

I counted off 11 seconds for it to change the locale, so, it's doing something other than just a simple two character change

Timezone was quick, wifi country was quick

Reboot, and see what happens...

That's odd. It's still not pinging outside the network ???

This makes no sense. I'll try rebooting the router (don't ask why, I just wanna try it)

Okay, rebooting the router made it work. I have no idea why, but it did

All in all, I guess I'm still left with more questions than answers, which means that I did this for nothing I guess. Oh well

For my next trick, I shall completely fail to pull a rabbit out of a hat


#19

When your workstation is happy (can ping the octopi and www.google.com) and the octopi cannot, then it's usually one of two things: 1) the octopi's netmask or 2) its default gateway.

On the Pi, run ifconfig wlan0 and see what's set.

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.250  netmask 255.255.255.0  broadcast 192.168.1.255
        RX packets 191787  bytes 276185038 (263.3 MiB)
        RX errors 0  dropped 3  overruns 0  frame 0
        TX packets 97879  bytes 11818394 (11.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And route:

Kernel IP routing table
Destination   Gateway      Genmask        Flags Metric Ref   Use Iface
default       192.168.1.1  0.0.0.0        UG    303    0       0 wlan0
192.168.1.0   0.0.0.0      255.255.255.0  U     303    0       0 wlan0

You want the default gateway to point to the router and the netmask must be correct. In most consumer cases, it's 255.255.255.0 for it to work.


#20

Glad I started something fun for you :metal: