dibosco wrote on Wednesday, February 25, 2015:
I have a simple web server running using the FreeRTOS TCP/IP stack and can have a browser pick a file from the computer and send the file to the FreeRTOS device. However, the file is much bigger than the amount of RAM I have and I need to write this file to flash without assembling it in RAM first.
At the moment, I can prove that each time I send the file from my computer to the FreeRTOS device, the file segments appear in exactly the right order. I am assuming that the trasmission goes like this:
Compueter -> FreeRTOS: Here is the first packet
FreeRTOS -> Computer: Got it
Computer -> FreeRTOS: Here is the second packet
FreeRTOS -> Computer: Got it
…
…
Computer -> FreeRTOS: Here is the last packet
FreeRTOS -> Computer: Got it
Each time the computer sends that packet out it doesn’t send the next packet until it’s had the acknowledge from FreeRTOS. My end customer is saying that even though this set-up will only ever be used on a LAN, their switches on the LAN might not send out packets in the correct order as, and I don’t know whether this can be true, the switch the traffic is going thorugh could take more than one packet from the computer before getting an acknowledge for a TCP packet and then send it out to FreeRTOS in the wrong order. Unless we set some sort of system variable on FreeRTOS to specifically tell the connection to the computer that only one packet should ever be sent before the acknowledge comes back from FreeRTOS.
There may be a technical term for this and I am hoping that either:
a. This is how it works with the FreeRTOS stack anyway
or
b. There is a FreeRTOS TCP/IP variable to ensure that the client only ever sends out one packet to the FreeRTOS unit when it gets the acknowledge for the previous packet, thus ensuring the file is received in the correct order.
Hope that makes sense? Can anyone advise one way or the other whether what I need is feasible. I am not even convinced that a switch would ever send a TCP acknowledge to the computer, I thought switches just passed Ethernet packets and didn’t look at what was actually inside them. I thought the latter was something a gateway our router would do!
Thanks!