FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2017 Threads] Sending large datagrams in FreeRTOS+TCPPosted by jtbr on June 14, 2017 I have large datagrams I'd like to send over UDP, and in investigating why they weren't being sent I realized that FREERTOS_sendto() caps the size of datagrams at the payload size for a single packet.
It should be possible to allow fragmentation at the IP leve,l for reassembly at the destination. I saw this config option ipconfigCANFRAGMENTOUTGOING_PACKETS that seems to allow exactly what I need. But it appears not to be implemented in +TCP.
Is there any plan to include this functionality in +TCP?
As an alternative, I considered increasing the MTU, but it would be memory-prohibitive as I need to send datagrams up to 24Kb, and I'm also not sure about the hardware level support for that. So now I'm considering if I need to implement a fragmentation and reassembly as a part of my own protocol, but that would be somewhat unfortunate.
Thanks for any help.
Sending large datagrams in FreeRTOS+TCPPosted by heinbali01 on June 14, 2017 Hi Justin,
In the earlier FreeRTOS+UDP stack there was indeed an option ipconfigCAN_FRAGMENT_OUTGOING_PACKETS . That stack is still distributed along with the kernel, e.g. :
~~~
FreeRTOSv9.0.0/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP
~~~
As the option says, it will only work for outgoing packets, which is enough for you.
When developing +TCP, it was decided to stop supporting UDP packet fragmentation. That decision saved a lot of code and it made the code easier to read.
And in fact, TCP can do exactly what you need: split up and join packets in a reliable way.
You can set MTU to 1500, or a little bit longer in case your peripheral, switches and router support jumbo packets.
So you can use TCP, or, alternatively, give your UDP packets a small header and make your own fragmentation. That should not be too difficult :-)
Sending large datagrams in FreeRTOS+TCPPosted by jtbr on June 14, 2017 Thanks for the info. I must say you have succeeded in making +TCP very readable.
The nice thing about UDP is that I can broadcast datagrams and listeners can listen as they want or are able. But since I also need and use TCP for more connection-oriented comms, using just +UDP isn't an option.
I'll look into breaking up and reassembling UDP at the application level then.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|