ESP8266 Developer Zone The Official ESP8266 Forum 2016-04-27T02:32:47+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=2078 2016-04-27T02:32:47+08:00 2016-04-27T02:32:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6623#p6623 <![CDATA[Re: Soft-AP DHCP lease time]]>
It's working fine now :)

Thank you.

Statistics: Posted by taribo — Wed Apr 27, 2016 2:32 am


]]>
2016-04-26T16:30:47+08:00 2016-04-26T16:30:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6615#p6615 <![CDATA[Re: Soft-AP DHCP lease time]]>
Please have a try with the attachment.

If your problem is still unsolved, please feel free to let us know.
AT_test_bin2.zip

Statistics: Posted by ESP_Faye — Tue Apr 26, 2016 4:30 pm


]]>
2016-04-26T03:16:58+08:00 2016-04-26T03:16:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6602#p6602 <![CDATA[Re: Soft-AP DHCP lease time]]>

Code:

AT+RESTORE


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒblŒbr|ìbàrbŽàlbìònî€nnâlblŒlŒŽl쌌Œll`€nü<0>ŒžâŒblŒlbŒžâŒblŒb|rlrl
ready
AT+GMR

AT version:1.0.0.0(Apr 25 2016 14:18:03)
SDK version:1.5.3(aec24ac9)
compile time:Apr 25 2016 14:39:42
OK
AT+CWMODE?

+CWMODE:2

OK
AT+CWLIF


OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:0,0.0.0.0,0.0.0.0
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:120,192.168.4.2,192.168.4.101
OK
AT+CWLIF

192.168.4.2,5c:f8:a1:xx:xx:xx
192.168.4.4,20:64:32:xx:xx:xx
192.168.4.3,60:21:c0:xx:xx:xx

OK
AT+CWDHCPS_DEF=1,3,"192.168.4.2","192.168.4.2"


OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.2
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:3,192.168.4.2,192.168.4.2
OK
AT+RST


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒ¢þ
ready
AT+GMR

AT version:1.0.0.0(Apr 25 2016 14:18:03)
SDK version:1.5.3(aec24ac9)
compile time:Apr 25 2016 14:39:42
OK
AT+CWMODE?

+CWMODE:2

OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.2
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:3,192.168.4.2,192.168.4.2
OK
AT+CWLIF

192.168.4.2,5c:f8:a1:xx:xx:xx
192.168.4.4,20:64:32:xx:xx:xx
192.168.4.3,60:21:c0:xx:xx:xx

OK

Statistics: Posted by taribo — Tue Apr 26, 2016 3:16 am


]]>
2016-04-26T03:03:37+08:00 2016-04-26T03:03:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6601#p6601 <![CDATA[Re: Soft-AP DHCP lease time]]>
I am using the FW provided by you.
With the default settings, the DHCP server is working fine. Please see below log. In Soft-AP mode, I am connecting 3 Android phones with no problem.

Code:

AT+RST


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒbþ
ready
AT+GMR

AT version:1.0.0.0(Apr 25 2016 14:18:03)
SDK version:1.5.3(aec24ac9)
compile time:Apr 25 2016 14:39:42
OK
AT+CWMODE?

+CWMODE:2

OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:0,0.0.0.0,0.0.0.0
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:120,192.168.4.2,192.168.4.101
OK
AT+CWLIF

192.168.4.2,5c:f8:a1:xx:xx:xx
192.168.4.3,60:21:c0:xx:xx:xx
192.168.4.4,20:64:32:xx:xx:xx

OK



Then, I am trying to restrict the number of IPs assigned by DHCP to only 2: 192.168.4.2 and 192.168.4.3, with the lease time 3 minute.
But in this case, I can only connect with first Android phone. As long as the first Android is connected, the second Android never receives an IP from DHCP server inside ESP8266.
I can only connect with the second Android phone after following these steps:
- disconnect the first Android from WiFi
- wait 3 minutes for the second Android to connect to the Soft-AP of the ESP8266
When connected (they are never connected simultaneously) both the first and the second Android, receive the IP: 192.168.4.2.

Is this a normal behavior ?


Code:

AT+CWDHCPS_DEF=1,3,"192.168.4.2","192.168.4.3"


OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.3
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:3,192.168.4.2,192.168.4.3
OK
AT+RST


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒbþ
ready
AT+GMR

AT version:1.0.0.0(Apr 25 2016 14:18:03)
SDK version:1.5.3(aec24ac9)
compile time:Apr 25 2016 14:39:42
OK
AT+CWMODE?

+CWMODE:2

OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.3
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:3,192.168.4.2,192.168.4.3
OK
AT+CWLIF

192.168.4.2,20:64:32:xx:xx:xx

OK

Statistics: Posted by taribo — Tue Apr 26, 2016 3:03 am


]]>
2016-04-25T15:03:38+08:00 2016-04-25T15:03:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6595#p6595 <![CDATA[Re: Soft-AP DHCP lease time]]>
Please have a try with the new AT bin, if your problem is still unsolved, please feel free to let us know.

Sorry for the inconvenience.
AT_test_bin.zip

Statistics: Posted by ESP_Faye — Mon Apr 25, 2016 3:03 pm


]]>
2016-04-24T17:38:58+08:00 2016-04-24T17:38:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2078&p=6586#p6586 <![CDATA[[Solved] Soft-AP DHCP lease time]]>
I am using the latest AT command FW (AT_V1.0 based on ESP8266_NONOS_SDK_V1.5.3).
I can't set the DHCP lease time correctly.

I am using AT+CWDHCPS_DEF=1,3,"192.168.4.2","192.168.4.3" to set the lease time to 3 minutes. This command returns OK and it should store parameters to flash. But after I restart the ESP8266 module, the DHCP lease time returns to default 120 minutes, as you can see from the serial log below.
After restart, the AT+CWDHCPS_DEF? command returns: +CWDHCPS_DEF:3,192.168.4.2,192.168.4.3
But the AT+CWDHCPS_CUR? command returns: +CWDHCPS_CUR:120,192.168.4.2,192.168.4.3

Code:

AT+RST


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒ¢þ
ready
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:0,0.0.0.0,0.0.0.0
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:120,192.168.4.2,192.168.4.101
OK
AT+CWDHCPS_DEF=1,3,"192.168.4.2","192.168.4.3"


OK
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.3
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:3,192.168.4.2,192.168.4.3
OK
AT+RST


OK

 ets Jan  8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

rlŽ‚rlŒžâŒ¢þ
ready
AT+CWDHCPS_DEF?

+CWDHCPS_DEF:3,192.168.4.2,192.168.4.3
OK
AT+CWDHCPS_CUR?

+CWDHCPS_CUR:120,192.168.4.2,192.168.4.3
OK
AT+GMR

AT version:1.0.0.0(Apr 16 2016 13:02:45)
SDK version:1.5.3(aec24ac9)
compile time:Apr 18 2016 14:20:15
OK

Statistics: Posted by taribo — Sun Apr 24, 2016 5:38 pm


]]>