Go Down

Topic: ESP 01 (Read 80 times) previous topic - next topic

Mighty-Eagle

Hi guys..
I got this WiFi module from Mantech in SA. It says ESP 01. I have tried all sorts of programming, but cannot seem to get this thing to accept a static IP address.

So my first question is this. Does this thing have a default ip or will it only work with DHCP?
Secondly, Is there anyway I can clear its programming to default?

If anyone one can help it will be greatly appreciated. The module looks like this..
Its OK to reply,,, But not all reply's are "OK"

arduarn

I have tried all sorts of programming, ...
Which we can't see...


You may need to change the order of your initialisations.

lesept

#2
Jul 17, 2019, 06:50 pm Last Edit: Jul 17, 2019, 07:00 pm by lesept
Your picture :



This seems to be a standard module, I don't think it comes with a predefined IP address. To force a static IP, try

Code: [Select]
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(500);
IPAddress ip(192,168,1,200);   // <-- static IP here
IPAddress gateway(192,168,1,254);   // <-- verify this
IPAddress subnet(255,255,255,0);  
WiFi.config(ip, gateway, subnet);


If it doesn't work, try changing the order of begin and config :
Code: [Select]
IPAddress ip(192,168,1,200);   // <-- static IP here
IPAddress gateway(192,168,1,254);
IPAddress subnet(255,255,255,0);  
WiFi.config(ip, gateway, subnet);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(500);


There is actually a difference, if I remember well, in the order of the arguments of the config, between ESP8266 and Arduino + Wifi shield. If the above does not work, try what is proposed here :

Code: [Select]
//Static IP address configuration
IPAddress staticIP(192, 168, 43, 90); //ESP static ip
IPAddress gateway(192, 168, 43, 1);   //IP Address of your WiFi Router (Gateway)
IPAddress subnet(255, 255, 255, 0);  //Subnet mask
IPAddress dns(8, 8, 8, 8);  //DNS
WiFi.config(staticIP, subnet, gateway, dns);
WiFi.begin(ssid, password);

Here, the subnet and gateway are switched, and I'm not sure which one is the correct order...
A force d'essayer on finit par réussir... Donc, plus ça rate, plus on a de chances que ça marche (proverbe Sharduinok).

Go Up