can espconn_send transmit expand 1024Byte?

kkinght1
Posts: 1
Joined: Thu May 09, 2019 11:04 am

can espconn_send transmit expand 1024Byte?

Postby kkinght1 » Thu May 09, 2019 11:10 am

i use API espconn_send transmit data is correct when data low than 1024.
and if i try to send data more than 1024 Byte (1200+), my ESP8266 module will reset , why ?
Who can give me some suggestion to solve the problem?

Her Mary
Posts: 394
Joined: Mon Oct 27, 2014 11:09 am

Re: can espconn_send transmit expand 1024Byte?

Postby Her Mary » Thu May 09, 2019 5:00 pm

Out of memory? Maybe you can check the free heap size, and the debug log.

AgentSmithers
Posts: 162
Joined: Sat Apr 01, 2017 1:21 am
Contact:

Re: can espconn_send transmit expand 1024Byte?

Postby AgentSmithers » Sat May 11, 2019 6:19 am

Yeah, depending on how your write your Global Heap Var's they can be a burden on your memory so if you need to send Buffers of some sort via TCP, You normally want to do something like this

Char * MyFirstBuf
Char * MySecBuf

then in your function Malloc and free when needed. This is course better then defining this...

Char MyFirstBuf[1024]
Char MySecBuf[1024]

The first one at least one of the bufs you can hopefully free at a time to give you room to move around....

Basiclly in a nuttshell avoid [] definnitions for global vars if you have any and convert them to just raw pointers and Alloc and release as needed.. youll have rewrite and test your code to ensure you have the flow correct but I hope that helps.

Who is online

Users browsing this forum: No registered users and 3 guests