I am using the current AT Firmware (AT_V1.0 based on ESP8266_NONOS_SDK_V1.5.3). Actually, it is the modified version from this post (http://bbs.espressif.com/viewtopic.php?f=66&t=2078#p6615).
I am using the AT+SAVETRANSLINK to create a transparent link between my Android and my micro-controler (Microchip PIC, connected on ESPs UART). To configure the ESP module, from the default AT FW, I am setting the ESP module in Soft-AP mode, to only allow one WiFi client and DHCP server to lease only one IP (see the AT commands below).
After configuring the ESP to transparent link, all works fine. While the Android is connected to ESP Soft-AP, I am able to send, once per second, from the Android, a small UDP packet (5 bytes) on IP 192.168.4.1, port 2346. This small packet is received by my micro-controller on UART. The micro-controller sends back to UART a larger packet (variable length, around 100 bytes). The ESP receives on UART the packet from micro-controller and sends it on UDP, IP 192.168.4.2, port 2345, and the packet is successfully received by Android.
This works fine for a while. All packets sent by Android are received by ESP and my micro-controller. All packets sent back by my micro-controller are received by Android. No packet loss so far.
But, after some time (half an hour or less), Android does not receive some of the packets sent by my micro-controller. The receive packet loss is rising to 30-40-50% - this is too much.
I was able to spy on the UART connection between the ESP and my micro-controller and the UDP packets sent by Android are always received by my micro-controller. In response to the UDP packet received, my micro-controller always sends a response to ESP (on UART). But this response is not sent to Android.
I have tried it also with a PC instead of Android and the problem is still the same - first it works fine, but after some time, the PC doesn't receive the UDP packets from ESP - the packet loss is rising.
Code: Select all
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 26 2016 14:22:35
OK
AT+CWMODE?
+CWMODE:2
OK
AT+CWSAP?
+CWSAP:"ESP_123456","mypassword",1,4,1,0
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+SAVETRANSLINK=1,"192.168.4.2",2345,"UDP",2346
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