Statistics: Posted by afunx — Wed Jul 01, 2015 2:04 pm
Code:
- (NSString *)description
{
//把下面的宏设为0 APP返回配置成功信息,否则ESP8266配置成功后会卡住在NSString *ipAddrDataStr = [ESP_NetUtil descriptionInetAddrByData:self.ipAddrData];
#if 0
NSString *ipAddrDataStr = [ESP_NetUtil descriptionInetAddrByData:self.ipAddrData];
return [[NSString alloc]initWithFormat:@"[isSuc: %@,isCancelled: %@,bssid: %@,inetAddress: %@]",self.isSuc? @"YES":@"NO",
self.isCancelled? @"YES":@"NO"
,self.bssid
,ipAddrDataStr];
#else
return [[NSString alloc]initWithFormat:@"[isSuc: %@,isCancelled: %@,bssid: %@]",self.isSuc? @"YES":@"NO",
self.isCancelled? @"YES":@"NO"
,self.bssid];
#endif
}
Statistics: Posted by danshi126 — Tue Jun 02, 2015 9:35 am
Statistics: Posted by afunx — Mon Jun 01, 2015 6:53 pm
Statistics: Posted by ESP_Alfred — Mon Jun 01, 2015 5:25 pm
Code:
#define STMART_CONFIG 1
if (esp_param.activeflag != 1)
{
#if STMART_CONFIG
wifi_set_opmode(STATION_MODE);
smartconfig_start(SC_TYPE_ESPTOUCH, smartconfig_done);
#else
#ifdef SOFTAP_ENCRYPT
struct softap_config config;
char password[33];
char macaddr[6];
wifi_softap_get_config(&config);
wifi_get_macaddr(SOFTAP_IF, macaddr);
os_memset(config.password, 0, sizeof(config.password));
os_sprintf(password, MACSTR "_%s", MAC2STR(macaddr), PASSWORD);
os_memcpy(config.password, password, os_strlen(password));
config.authmode = AUTH_WPA_WPA2_PSK;
wifi_softap_set_config(&config);
#endif
wifi_set_opmode(STATIONAP_MODE);
#endif
}
Statistics: Posted by danshi126 — Mon Jun 01, 2015 9:59 am
Statistics: Posted by ESP_Alfred — Wed May 27, 2015 6:37 pm
Statistics: Posted by danshi126 — Wed May 27, 2015 5:30 pm