Skip to content

WiFi.h is not working on my esp32 #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Senthanamuthan opened this issue Feb 20, 2017 · 17 comments
Closed

WiFi.h is not working on my esp32 #226

Senthanamuthan opened this issue Feb 20, 2017 · 17 comments

Comments

@Senthanamuthan
Copy link

Senthanamuthan commented Feb 20, 2017

I'm new to ESP32.I did one sample code in arduino.

void setup() {
pinMode(4, OUTPUT);
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO");
digitalWrite(4, HIGH);
delay(1000);
digitalWrite(4, LOW);
delay(1000);
}
but the same code is not working with WiFi.h

#include<WiFi.h>
void setup() {
pinMode(4, OUTPUT);
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO");
digitalWrite(4, HIGH);
delay(1000);
digitalWrite(4, LOW);
delay(1000);
}
Please help me

@me-no-dev
Copy link
Member

just including WiFi.h would not change a thing. Are you sure you are not missing something else? Also what exactly "same code is not working with WiFi.h" means? Post some serial output ;)
Check your USB cable (starting WiFi uses lots of power). Things like that could help.

@Senthanamuthan
Copy link
Author

Hi @me-no-dev,
Thank you very much for responding as soon as possible.

with the code below

void setup() {
Serial.begin(115200);}
void loop() {
Serial.println("HELLO ALL");
delay(1000);
}
I got this output.
output1

After including WiFi.h i got the below error
#include <WiFi.h>
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("HELLO ALL");
delay(1000);
}
output2

It shows there is some error in WiFi.h (error: no members matching 'WiFiScanClass::MODE' in 'class WiFiScanClass') How to solve this?
Please help me.

Thanks and Regards,
Senthan

@andrei-ivanov
Copy link

Can you try with the latest Arduino IDE? 1.8.1?

@Senthanamuthan
Copy link
Author

I tried with that.While trying with Arduino IDE 1.8.1 it show no error and shows nothing in the serial monitor also

@me-no-dev
Copy link
Member

problem is that you have some library named WiFi in your Arduino libraries folder. Remove that or rename it (folder and headers) :)

@Senthanamuthan
Copy link
Author

Thank you very much @me-no-dev @andrei-ivanov
I tried that and i got below error. It shows CPU halted
arduino_output

@me-no-dev
Copy link
Member

now make sure that you have a good usb cable and power to your board ;) maybe try external power?

@Senthanamuthan
Copy link
Author

I'm really sorry. I forget to inform that I got this error when i used "WiFi.begin(ssid,pass);" and it shows there is no "WiFi.mode()" in WiFi. h

@Senthanamuthan
Copy link
Author

Thank you very much for your responses.I got "CPU HALTED" when i include "WiFI.begin()". I tried with espressif/esp-idf#242 .It shows like the below image.
commandimg
please help me.
Regards,
Senthan

@me-no-dev
Copy link
Member

check you USB cable. Try external power

@Alexandravq
Copy link

Gracias por la ayuda, yo tuve el mismo problema, me arrojaba el error CPU halted, lo que hice fue cambiar la fuente de alimentación por una de mayor corriente y funciono perfectamente. Espero que les funcione.

@me-no-dev
Copy link
Member

@Alexandravq нямам никаква идея какви ми ги пишеш...

@me-no-dev
Copy link
Member

Is this still a problem?

@tobozo
Copy link
Contributor

tobozo commented Mar 10, 2017

@Senthanamuthan if you rename the Documents/Arduino/libraries/Wifi/ folder to /Wifi.old/ and hit "compile" button, do you still get the error ?

[edit] I'm using Arduino for multiple environments/sdk and I had to do this to get rid of the same error message. Don't delete the folder as it is probably needed by your other profiles.

@JPB1JPB1
Copy link

From #218 : also around Arduino IDE and ESP32 as my question is #281 ( only is bluetooth running ?)

For your information, i have recompiled yesterday for the ESP32 this wifibluetoothswitch.ino and other example under Arduino 1.6.13 without any problem, ok under PC with W10,

The hardware esp32 was set in the hardware directory for esp32-arduino github...
It looks ok for other wifi example too... Python is 2.7.12 on my PC..

If this can help you but for me, ESP32 et Arduino is better now.. from here : https://github.com/espressif/arduino-esp32 and follow under Windows instructions with success..
After the download, the wifi is running but my question is for Bluetooth ...

Best Regards
JP

@me-no-dev
Copy link
Member

@JPB1JPB1 why are you spamming so many issues with your BT question?

@JPB1JPB1
Copy link

JPB1JPB1 commented May 18, 2018 via email

darkxst pushed a commit to darkxst/arduino-esp32 that referenced this issue Dec 5, 2024
* Fix ESP-DL component build

Changes in the upstream repository require some changes in the component config

* For IDF 5.1 use older commit

* Update idf_component.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants