I am using a ESP8266 as a data logger. And to be able to view the data on my cell phone I am trying to operate the ESP8266 in AP mode and then log on to it with my cell phone and use a UDP receiver app to view the data.
When I operate the ESP8266 in Station mode I am able to do the above with the home router as the WiFi link. But unable to the same if use the ESP8266 in AP mode.
Why is this ?
#include <ESP8266WiFi.h> // Used for the soft AP
#include <WiFiUdp.h> // used for UDP comms.
WiFiUDP Udp;
const char *APssid = "ESP8266-AP";
const char *APpassword = "";
//*************************
void setup() {
Serial.begin(9600); //fire up the serial port
WiFi.softAP(ssid, password);
Serial.print("Soft-AP IP address = ");
Serial.println(WiFi.softAPIP()); // Confirm AP IP address
}
//**************************
void loop() {
Udp.beginPacket((255,255,255,255), 52971); // Broadcast the message
Udp.write(millis());
Udp.endPacket();
delay(500);
}
//**************************
( Actually I had posted a similar query sometime last year but did not get any reply and hence repeating ..)