neconn_write divide the transfer data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-06 11:16 PM
Hi! I lm using lwip + freertos and STM32F429 and Cube IDE.
When I transfer 906B by netconn_write its transfer this data partly. I tried increase all possibiilities of defines but unsuccesssfull.
Please help who knows.
Solved! Go to Solution.
- Labels:
-
Ethernet
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-22 8:43 AM
Happy that your problem is solved.
Please click on the Select as Best button on my reply. This will help other members of the community find this solution more quickly.
Feel free to raise any issue or feedback.
Kind Regards,
Walid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-10 7:56 AM
Hello @Agde.1​ ,
Make sure that the apiflags parameter of the netconn_write() macro is equal to NETCONN_DONTBLOCK.
#define netconn_write(conn, dataptr, size, apiflags) \
netconn_write_partly(conn, dataptr, size, apiflags, NULL)
Below are the combination of apiflags parameter flags :
* - NETCONN_COPY: data will be copied into memory belonging to the stack
* - NETCONN_MORE: for TCP connection, PSH flag will be set on last segment sent
* - NETCONN_DONTBLOCK: only write the data if all data can be written at once
I hope this solve your problem.
BeST Regards,
Walid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-10 2:49 PM
Dear Walid!
Thank you for your replay!
The problem is in that I tried it at first and whith non blocking attribute netconn_write doesnt transfer any data when as with everyone else does
And I didnt understand why, still
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-11 3:06 AM
Just as a reminder, TCP is a data stream (as opposed to UDP for example). The application should be able to reassemble the data and process it accordingly.
Otherwise, You could increase the Maximum segment size using this define TCP_MSS.
Take a look at this reference : https://lwip.fandom.com/wiki/Tuning_TCP#Maximum_segment_size_.28TCP_MSS.29
BeST Regards,
Walid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-21 1:25 PM
Thank yout very much!
You was right!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-22 8:43 AM
Happy that your problem is solved.
Please click on the Select as Best button on my reply. This will help other members of the community find this solution more quickly.
Feel free to raise any issue or feedback.
Kind Regards,
Walid
