Chat freely about anything...

User avatar
By Dave S
#19492 Thanks for the tip, but still no luck.

By the way, the user_interface for the softap structure allocates the ssid as uint8 ssid[32];

So 32 is returned from sizeof() regardless of the string length of the ssid.

9 is returned from os_strlen() for my ssid.

I tried casting and also memcpy, yet still fail to connect to android.

Code: Select all   os_sprintf((char *) ssid, "%s", WIFI_AP_NAME);
   os_memcpy((char *) apconfig.ssid, ssid, os_strlen(ssid));


It seems that something else is going on. I can see the ssid from my android device, it just refuses to connect.

Thanks for your help. And please let it be know if there are any light bulbs going off...

Cheers!
User avatar
By Dave S
#19652 I've been using Eclipse for Android App Development. That environment may also provide some useful debug info when attempting to connect. I tried an app called CatLog, it provides tons of data each second the Android is running. But i could not make any sense of the information.

NOTE: You need a rooted Android to use CatLog,

Not much success using Android Studio but I may give it another go.

In the mean-time, I have been able to connect to the ESP8266 in AP mode from my Android with an Arduino IDE sketch with the WIFI set to AP mode. While I'd prefer the SDK, this will work for my application. I will also report this issue to EspressIf; they developed the SDK and the ESP8266. I''ll post their reply here when they respond.

FYI, Arduino IDE AP setup I'm now using:

Code: Select all //AP Mode setup
const char* ssid = "esp8266n4";
const IPAddress ipadd(192,168,4,1);     
const IPAddress ipgat(192,168,4,1);       
const IPAddress ipsub(255,255,255,0); 

WiFi.mode(WIFI_AP);
 //set IP if not correct
 IPAddress ip = WiFi.softAPIP();
 if( ip!= ipadd) {
       WiFi.config(ipadd, ipgat, ipsub); 
}
WiFi.softAP(ssid);


Thanks for your interest in this issue