Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Adafruit connecting using certain wifi connections but not o
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Adafruit connecting using certain wifi connections but not o

by drbrunner on Wed Jun 02, 2021 12:51 am

Hi,

I am using a nodeMCU and am a beginner in this area.

I have been doing the adafruit tutorials - specifically the Digital Input: https://learn.adafruit.com/adafruit-io- ... ital-input

Everything works perfectly when I use the wifi at home or through a hotspot on my phone. I do not change the code except the adafruit keys and the wifi information in the config file (as done in the tutorial). I can connect to adafruit and can see the gauge change on the dashboard.

There is one place that it does not work - which is frustrating as it is the location that I actually need it to function.

As suggested in one thread that I read, I modified the code like this to see how the status changes.

while(io.status() < AIO_CONNECTED) {
Serial.print(io.statusText());
Serial.println();
delay(500);
}

This tells me that it is connecting to the wifi fine. The problem is that it then just hangs while displaying the following message:
-> Disconnected from Adafruit IO.

Normally, this comes up maybe one or two times and then it connects to Adafruit and everything functions fine. However, in this one location, the system never seems to make the link to Adafruit.

As far as I can tell, there is nothing that special about the wifi. I can connect to it using my phone and computer and access the internet as normal.

Does anyone know what might be causing this? Is there any setting changes I could try? I have all of the most recent versions of the libraries that are given in the Adafruit tutorial and they are all up to date.

drbrunner
 
Posts: 4
Joined: Wed Dec 04, 2019 2:26 am

Re: Adafruit connecting using certain wifi connections but n

by dherrada on Wed Jun 02, 2021 2:13 pm

Do you happen to know the type of network that it doesn't work on or the type of authentication it uses. AFAIK microcontrollers tend to work much better on 2.4gHz networks with WPA or WPA2 authentication. I've also never encountered an enterprise network (such as at a school, college dorm, and some office buildings) that they work on.

dherrada
 
Posts: 127
Joined: Thu Jan 04, 2018 4:59 pm

Re: Adafruit connecting using certain wifi connections but n

by drbrunner on Wed Jun 02, 2021 8:58 pm

Ah. OK. It is at my school. (I am a teacher).

I had issues connecting smart devices previously because it required a user name in addition to the wifi name and password to connect to our network (and I couldn't find code that accommodated for this additional I.D. information). I had bypassed this by connecting my own router via ethernet and then logging in through it. I managed to get smart globes and some other commercial (app driven) devices working via IFTTT through this method without any issues. For all other things that I do regularly (accessing websites), this method works as though I am at home.

I had hoped that it would also work with these devices and adafruit and was hopeful when the information showed that they had connected to the router but just couldn't make that final connection to Adafruit.io.

But... I guess there is no known solution because ultimately it will be going through the school network.

Thanks heaps for the reply.

I guess my next question would be if anyone has a good solution for connecting a few (10-20) nodeMCUs when there is no wifi network available? Do I need to invest in a wifi dongle? Would these be suitable for connecting so many devices at the same time? I'll put this in a separate question.

drbrunner
 
Posts: 4
Joined: Wed Dec 04, 2019 2:26 am

Re: Adafruit connecting using certain wifi connections but n

by dherrada on Thu Jun 03, 2021 11:10 am

Yeah, if that's the case, then that's almost certainly it. However, there are a few workarounds I have found to work at places with enterprise networks.
* Try connecting it to a mobile hotspot (I've found ones from a laptop or desktop to work better, you'll have to connect your laptop to ethernet for this to work btw)
* Bring in a router, connect it to ethernet, make it a hidden network, and connect the device to that. This way is how my high school CS teacher was able to get around this issue.

dherrada
 
Posts: 127
Joined: Thu Jan 04, 2018 4:59 pm

Re: Adafruit connecting using certain wifi connections but n

by brubell on Fri Jun 04, 2021 9:24 am

We don't officially support WPA2-ENTERPRISE networks with the Adafruit IO Arduino library. I believe the ESP32's WiFi stack supports WPA2-ENT, but there are no immediate plans for this to be integrated. Your best bet is using a mobile/wireless hotspot to bypass your school's router as dherreda said, IoT devices don't use much data anyways.

brubell
 
Posts: 1381
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.