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?
can espconn_send transmit expand 1024Byte?
-
- Posts: 195
- 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.
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 273 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.