Quality RTOS & Embedded Software

NOTE:This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.

FreeRTOS Support Archive

The FreeRTOS support forum can be used for active support both from Amazon Web Services and the community. In return for using our software for free, we request you play fair and do your bit to help others! Sign up for an account and 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. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.

Porting FreeRTOS-PLUS-TCP on STM32F207VG

Hello, I am porting FreeRTOS-PLUS-TCP and testing it on NUCLEO board with STM32F207ZGT6. I generate project with CubeMX with FreeRTOS support, then add sources for TCP from FreeRTOS 10.0.0 downloaded files. I achived next results:
– ping test goes well
– I created Server thread and I can receive GET request
Problem is that when I trying to send the responce using FreeRTOS_send(….), nothing happens. I checked this by wireshark. No packets from NUCLEO board.
What should I check? Some thoughts?

Porting FreeRTOS-PLUS-TCP on STM32F207VG

Ping goes well, that means that your +TCP port is able to send packets.
Now you receive a GET request, and the answer to it never arrives?
Is that your own code which receives the GET request? If so, could you show it?
Maybe you could do a simpler test: just create a telnet server socket?

Porting FreeRTOS-PLUS-TCP on STM32F207VG

You are setting the send time-out on xConnectedSocket, but you do not show the actual value of xSendTimeout.
Despite that, I can not see an apparent reason why FreeRTOS_send() would not send-out the data contained in the variable page.
Have you defined ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM as 0?
If it is non-zero, either your network driver must calculate and set the checksums ( IP and protocol ), or the EMAC must set it.
Your application is likely to run until all resources are exhausted: after sending the data, the variable xConnectedSocket will be overwritten and the handle to the old socket becomes unreachable.
If you want to keep it simpler ( for testing ), allow only a single client:
~~~
FreeRTOS_listen( xListeningSocket, 1 );
~~~
And keep on reading from xConnectedSocket until you get a negative value, not equal to -EWOULDBLOCK:
~~~
if( xConnectedSocket != FREERTOSINVALIDSOCKET )
{
for( ;; )
{

~~~
You set FREERTOS_SO_RCVTIMEO of the listening socket. That value will be inherited by the child socket.
Give it a reasonable value unequal to zero.
If you want to see a simple HTTP server that works well, please download :
https://freertos.org/FreeRTOS-Labs/downloads/160919FreeRTOSLabs.zip?dl=0
and have a look at FreeRTOS-PlusSourceFreeRTOS-Plus-TCPprotocols

Porting FreeRTOS-PLUS-TCP on STM32F207VG

Does FreeRTOS_send() return the length of page?
It would be nice if you can set a breakpoint before calling FreeRTOS_send(). When that hits, set a breakpoint in xNetworkInterfaceOutput() to see what data are actually put on the wire.