m5stack / M5StickC-Plus

M5StickCPlus Arduino Library
MIT License
368 stars 89 forks source link

Wifi inop #10

Closed helo-head closed 3 years ago

helo-head commented 3 years ago

Using the Arduino IDE with the latest ESP32 Package (versions 1.0.4 thru 1.0.5 rc4) and the current version of M5StickC-Plus library (0.1) I have been struggling to determine why the wifi does not work on M5StickC-Plus devices. In each case WiFi.status() returns WL_NO_SHIELD. I tested the code on two different devices and I have noted others reporting the same issue.

The code in questions works fine on a M5StickC device so it would appear to be something specific to the Plus devices.

If you have any ideas on how to isolate this issue we would be appreciative.

helo-head commented 3 years ago

Just thought I would pass along a strange solution to an even stranger problem with M5Stickc Plus devices.

Issue Resolved -

There appears to be a bug in the Arduino IDE related to ESP32. I determined that the IDE was using the wrong WiFi.h which was preventing me from using wifi on my M5Stickc Plus. After several hours of troubleshooting I solved the problem by changing the reference from to "Wifi.h" which caused the compiler to search for the header. The compiler warned me there were two Wifi.h files and stated it was going to use the ESP32 version which is what I wanted to begin with. The newly compiled code worked and as such I I changed "Wifi.h" back to and its continued to work ever since.

I cannot for the life explain why the compiler was was using the wrong Wifi.h but as rule 25 says never argue with success. YAll my nework code now seems to work with no changes. Im currently using ESP32 V1.0.5 rc4 and M5Stickc Plus library version 0.1