Hi,
I facing a problem about esp8266 wifi ap mode. I use esp8266 as wifi access point and i set dhcp ip range 192.168.4.100 to 192.168.4.120.
At the same time, i use 4 android devices to connect to wifi ap, sometime all android device show correct ip ( rangew from 192.168.4.100 to 192.168.4.120) and communicate smooth with esp8266.
after few minute and test again, some device get the range ip from 192.168.4.2 and can't communicate with esp8266, if try connect again and get start from 192.168.4.100 and problem gone.
i already stuck this problem a week, until now stil can't solve the problem.
Please help me solve this problem. thanks.
B4R code here
I facing a problem about esp8266 wifi ap mode. I use esp8266 as wifi access point and i set dhcp ip range 192.168.4.100 to 192.168.4.120.
At the same time, i use 4 android devices to connect to wifi ap, sometime all android device show correct ip ( rangew from 192.168.4.100 to 192.168.4.120) and communicate smooth with esp8266.
after few minute and test again, some device get the range ip from 192.168.4.2 and can't communicate with esp8266, if try connect again and get start from 192.168.4.100 and problem gone.
i already stuck this problem a week, until now stil can't solve the problem.
Please help me solve this problem. thanks.
B4R code here
B4X:
RunNative("user_init", Null)
wifi.StartAccessPoint2(ssid,pwd)
B4X:
#if C
void dhcps_lease_test(void)
{
struct dhcps_lease dhcp_lease;
IP4_ADDR(&dhcp_lease.start_ip, 192, 168, 4, 100);
IP4_ADDR(&dhcp_lease.end_ip, 192, 168, 4, 120);
wifi_softap_set_dhcps_lease(&dhcp_lease);
}
void user_init(B4R::Object* unused)
{
struct ip_info info;
wifi_set_opmode( SOFTAP_MODE ); //Set softAP
wifi_softap_dhcps_stop();
IP4_ADDR(&info.ip, 192, 168, 4, 1);
IP4_ADDR(&info.gw, 192, 168, 4, 1);
IP4_ADDR(&info.netmask, 255, 255, 255, 0);
wifi_set_ip_info(SOFTAP_IF, &info);
dhcps_lease_test();
wifi_softap_dhcps_start();
}
#end if