- Thu Feb 05, 2015 11:22 am
#9060
I only get this resopnse every second
reconnect
scandone
no MYAP found, reconnect after 1s
reconnect
scandone
no MYAP found, reconnect after 1s
reconnect
If I change things in user_config.h to my wifi settings I still get the above
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#define USE_WIFI_MODE STATIONAP_MODE
#define WIFI_CLIENTSSID "MYAP"
#define WIFI_CLIENTPASSWORD "00000000"
#define WIFI_AP_NAME "ESP8266"
#define WIFI_AP_PASSWORD "00000000"
#define PLATFORM_DEBUG true
#endif
If I search the code I find no assignment of the ip 192.168.4.1 at compile time
With lua I can assign a static ip to the server
wifi.sta.setip({ip="xxx.xxx.0.21",netmask="255.255.255.0",gateway="xxx.xxx.0.254"}) where xxx.xxx is specific to my wifi set up
Is this possible with esphttp? I if so can it be set at compile time and if that is possible which *.h or *.c or make file needs changing.
If the above is possible is it possible to be explicit about the code to delete or add or modify?
update
I found below in wifi.c
and is does now get an ip address but not the static address supplied in wifi.c instead it gets a dynamic address
struct ip_info ipinfo;
wifi_get_ip_info(SOFTAP_IF, &ipinfo);
//IP4_ADDR(&ipinfo.ip, 192, 168, 4, 1);
//IP4_ADDR(&ipinfo.gw, 192, 168, 4, 1);
//IP4_ADDR(&ipinfo.netmask, 255, 255, 255, 0);
If there is a user_config.h then why bury hard coded IP's in the body of the code?
The eclipse file search missed 192.168.4.1 since it appears as 192,168,4,1 instead