So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By liderbug
#69994 I've tried a dozen examples of how to set the IP address on my 8266 12E. I can put in print lines to follow along with what is happening and at the WiFi.config - it fails - well at least I think so because the Serial Monitor returns strange/unreadable characters ie upsidedown "?" and boxes and on my server arp doesn't show anything. Am I missing a lib? Using the wrong examples? If I reboot/rst the board it comes up 192.168.4.1 and I need 192.168.0.31.

Thanks for any help.
User avatar
By liderbug
#70000 Hold the phone - I've got it working. Reason for problem, and nothing I connect with is case sensitive - except it seems - my ESP8266 my ssid = "wood******" and in my router it's "Wood*****". My phone doesn't care, 2 RasPis don't care a OrangePi doesn't care - my 8266 does. Who'da thunk?

What the phrase about the best answer is the simplest one.....
ON-ward, UP-ward, me and the other 299......

Thanks....
Ah, you can't read my mind? ;) OK then....
Here is one of the simple ones
Code: Select all#include <SPI.h>
#include <WiFi.h>

IPAddress ip(192, 168, 0, 31);

char ssid[] = "woodssid";
char pass[] = "43fcepass";

int status = WL_IDLE_STATUS;

void setup()
{
  Serial.begin(9600);
  while (!Serial) {
    ;
  }

  WiFi.config(ip);

  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");     <<< I never see this line
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }

  // print your WiFi shield's IP address:
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());
}

void loop () {}

and the others I've tried all read pretty much the same.
https://www.arduino.cc/en/Reference/WiFiLocalIP
https://github.com/esp8266/Arduino/issues/1959
https://www.arduino.cc/en/Reference/WiFiConfig
just to list a couple. If I were missing a lib or a dotH the compiler would complain. And like I said just about everyone SerMon starts outputting non-readable chars. and the IP I go for 0.3 doesn't show up.
bug