0

Huzzah32 strange WiFi issues [solved]
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Huzzah32 strange WiFi issues [solved]

by polypolyman on Sat Jan 19, 2019 8:24 pm

After having tons of luck with an ESP8266 Huzzah at work, I decided to pick up an ESP32 Huzzah32 for use at home (project is a thermostat to keep my heating pipes from freezing, with wifi for logging).

I was having no trouble at all while developing the code and hardware. After moving it into its final home, I made a few more modifications to the code, and about two or three more uploads, and the thing now won't connect to the wifi - every once in a while (it seems to be getting rarer) it connects after a long time, and stays connected fine, but I can't get any consistent results. The only consistency is that WiFi.status() always returns 6 (disconnected) when it won't connect.

What I've tried:
* Using the example WiFiClient sketch with my wifi details. Same behavior at this point.
* Moving the AP. No change, even when the AP is next to the device.
* Lowering and raising the power on the AP. No change.
* Switching to 20MHz mode on the AP, and moving to a clear channel. No change.
* Running the example WiFiScan sketch. I can pretty consistently see my neighbor's WiFi (signal hovering around -85), but my wifi (signal hovering around -60, although obviously messing with the AP changes this) will show up then disappear. I won't get low signal results, it just disappears.
* Running the WiFiAP example sketch. Works perfectly.
* Resetting the NVS. There wasn't any data or corruption in here, but it was worth a shot. No change.
* Putting in a disconnect, delay, then initiate in the code. No change.

My AP is a Sonicwall TZ300W (not my favorite, but it was free). Network is typical wpa2-psk. No other devices are having any trouble at all. No helpful info in the logs for the AP.

I've got a OneWire bus on gpio 27 (target is 3x DS18B20 modules), and I'm using gpio 25 and 26 as outputs for my relay board.

Any ideas? I've seen similar problems online, but none of their solutions seem to work.
Last edited by polypolyman on Sun Jan 20, 2019 1:17 am, edited 1 time in total.
polypolyman
 
Posts: 7
Joined: Mon Aug 31, 2009 2:22 pm

Re: Huzzah32 strange WiFi issues

by polypolyman on Sun Jan 20, 2019 12:23 am

...Alright, so I guess I need to throw out everything I thought I knew about wifi saturation.

I apparently hadn't tested with the device quite close enough to the AP. I cut it loose from its home, and started walking around with it. With clear line-of-sight, I lose connection at almost exactly 8 feet (<3m) from the AP. This is completely unacceptable performance, especially considering the esp8266 at work has never given me a problem anywhere I can get a wifi signal normally (including through metal building walls).

Have I done something wrong, or do I just need to buy a better board (probably another ESP8266) and trash this one?

EDIT: Power consumption measures 125mA while it's trying to connect, so it doesn't seem that I'm overrunning my power supply.
polypolyman
 
Posts: 7
Joined: Mon Aug 31, 2009 2:22 pm

Re: Huzzah32 strange WiFi issues

by polypolyman on Sun Jan 20, 2019 1:17 am

Ah ha! When the pinout said that you couldn't use ADC#2 and the wifi at the same time, I had assumed this just meant that I couldn't use the ADC itself, but that the GPIO would be fair game. Pin 27, which my 1-wire bus is on (with a pullup resistor, of course), is also tied to ADC#2.

Somewhere in testing, I broke my connection to my original 1-wire pin of choice, GPIO 21. So I re-soldered to GPIO 27, and that's when my problems began. Moving this back to 21 gives me whole-house coverage at least.

So yeah, I was doing something wrong. And just a note, when it says you can't use ADC#2 with wifi, it means all the pins associated with ADC#2, not just the ADC itself.

Problem solved. Thanks for being a sounding board :P
polypolyman
 
Posts: 7
Joined: Mon Aug 31, 2009 2:22 pm

Re: Huzzah32 strange WiFi issues

by PaulRowntree on Sun Jan 20, 2019 7:33 pm

polypolyman wrote:Ah ha! When the pinout said that you couldn't use ADC#2 and the wifi at the same time, I had assumed this just meant that I couldn't use the ADC itself, but that the GPIO would be fair game. Pin 27, which my 1-wire bus is on (with a pullup resistor, of course), is also tied to ADC#2.
And just a note, when it says you can't use ADC#2 with wifi, it means all the pins associated with ADC#2, not just the ADC itself.

Problem solved. Thanks for being a sounding board :P

Thank you! I was going to use 27 ... !

PaulRowntree
 
Posts: 370
Joined: Sun Apr 03, 2016 12:41 am

Please be positive and constructive with your questions and comments.