I successfully connected to my esp in AP mode.
These are the changes I made in Loader.ino (some are probably not needed)
Ignore the commented code ( it's the original code in case it all went TU)
I connected to the wifi "testSSID", and then in my browser went to 10.0.1.20 and up popped the webpage to transfer images to esp.
Obviously you need to add a password for the network, as it is an open one with the changes above.
These are the changes I made in Loader.ino (some are probably not needed)
B4X:
ESP8266WebServer server(80);
///IPAddress myIP; // IP address in your local wifi net
IPAddress myIP(10,0,1,20);
IPAddress gateway(10,0,1,10);
IPAddress subnet(255,255,255,0);
const char * ssid = "Epaper";
const char * password = "testing";
void setup(void) {
Serial.begin(9600);
/// WiFi.mode(WIFI_STA);
WiFi.mode(WIFI_AP);
/// WiFi.begin(ssid, password);
//Static IP setting---by Lin
wifi_station_dhcpc_stop();
struct ip_info info;
IP4_ADDR(&info.ip, 192, 168, 0, 189);
IP4_ADDR(&info.gw, 192, 168, 0, 0);
IP4_ADDR(&info.netmask, 255, 255, 255, 0);
wifi_set_ip_info(STATION_IF, &info);
WiFi.softAPConfig(myIP, gateway, subnet);
WiFi.softAP("testSSID");
// Connect to WiFi network
/* ///
Serial.println("");
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
*/
// SPI initialization
pinMode(CS_PIN , OUTPUT);
pinMode(RST_PIN , OUTPUT);
pinMode(DC_PIN , OUTPUT);
pinMode(BUSY_PIN, INPUT);
SPI.begin();
// Wait for connection
/* ///
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
*/
Ignore the commented code ( it's the original code in case it all went TU)
I connected to the wifi "testSSID", and then in my browser went to 10.0.1.20 and up popped the webpage to transfer images to esp.
Obviously you need to add a password for the network, as it is an open one with the changes above.