ESP8266 => client mode
ESP8266-12
=============================================
I try to download a file from a server by data chunks of size 0x400 that i write down in flash memory.
The server uses a CA signed certificate.
espconn_secure_ca_disable(3);
BUFFER SSL : espconn_secure_set_size(ESPCONN_CLIENT,8192)
With each chunk of data downloaded the following happens:
1) When i request the next chunk of data, the send is ack by a success
- [ 207][user_tcp_recv_cb] =>Chunck write status Success at address 0xb2c00 size of 1024 Bytes
[ 265][user_tcp_sent_cb]tcp sent succeed !!!
- Not enough in the buffer: has 1455, needs 1616
This warning changes with the last successfully received chunk to
- Not enough in the buffer: has 1455, needs 1584
The request for the next chunk of data is aborted with the error
- client's data invalid protocol
- [ 280][user_tcp_discon_cb]tcp disconnect succeed !!!
This happens every time a total size of 0x19000 (102.400 Bytes) data has been downloaded !!
It's amazing because the free heap remains at
- Heap: 11376
If i restart the device (software restart) and launch the download process for the next 0x19000 (102.400 Bytes) data the same error happens again after downloading 0x19000 (102.400 Bytes) of data.
The downloading speed for the chunks of data has no influence on this error because even if i tell the server to wait 200ms between each data chunk the same error happens again.
What could be the origin of this error as a memory leak couldn't be the origin if a refer to the available heap size when the error happens.
if is use the [SDK Release] ESP8266_NONOS_SDK_V1.4.0_15_09_18 i get immediatly the follwing error:
- [ 463][user_check_ip]user check ip
ip:192.168.0.207,mask:255.255.255.0,gw:192.168.0.1
[ 463][user_check_ip]user check ip
[ 477][user_check_ip]got ip for stattion mode !!!
[ 406][user_dns_found]user_dns_found xxx.xxx.131.101
[ 422][user_dns_found]preparing to connect to ip xxx.xxx.131.101
[ 427][user_dns_found]Register connection callback function status : Success
[ 430][user_dns_found]Buffer size update to 8192 status : Success
[ 432][user_dns_found]Connection status : Success
client handshake start.
E:M 1040
Fatal exception 29(StoreProhibitedCause):
epc1=0x4000e1b2, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000004, depc=0x00000000
Regards,
Orce