Configuring Soft AP
Posted: Sat Nov 08, 2014 2:57 am
I'm trying to setup Soft AP, I can see the ssid in my phone but can't connect to it.
//config.h
#define SSID "espwifi"
#define SSID_PASSWORD "testesp"
//main.c
#include "ets_sys.h"
#include "osapi.h"
#include "gpio.h"
#include "os_type.h"
#include "user_config.h"
#include "user_interface.h"
//Init function
void ICACHE_FLASH_ATTR
user_init()
{
char ssid[32] = SSID;
char password[64] = SSID_PASSWORD;
struct softap_config apConfig;
//Set AP mode
wifi_set_opmode(2);
//Set ap settings
os_memcpy(&apConfig.ssid, ssid, 32);
os_memcpy(&apConfig.password, password, 64);
apConfig.channel = 1;
apConfig.authmode = 4;
wifi_softap_set_config (&apConfig);
}
Anyone had any luck with this?? Am I missing something??
Can someone help me with this??? Thanks.
//config.h
#define SSID "espwifi"
#define SSID_PASSWORD "testesp"
//main.c
#include "ets_sys.h"
#include "osapi.h"
#include "gpio.h"
#include "os_type.h"
#include "user_config.h"
#include "user_interface.h"
//Init function
void ICACHE_FLASH_ATTR
user_init()
{
char ssid[32] = SSID;
char password[64] = SSID_PASSWORD;
struct softap_config apConfig;
//Set AP mode
wifi_set_opmode(2);
//Set ap settings
os_memcpy(&apConfig.ssid, ssid, 32);
os_memcpy(&apConfig.password, password, 64);
apConfig.channel = 1;
apConfig.authmode = 4;
wifi_softap_set_config (&apConfig);
}
Anyone had any luck with this?? Am I missing something??
Can someone help me with this??? Thanks.