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] [October 2016 Threads] FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by emesbee on October 27, 2016 I am using the FreeRTOS+TCP IP stack on my STM32F429 based board. I have both a HTTP and Telnet server (which feeds FreeRTOS+CLI) running, and am able to access both of them from a PC via ethernet. I also have a client task running, that properly opens a socket to a listening server on my PC.
What I cannot seem to get working is having the client task connect to either of the servers running on the same device. I have tried using both 127.0.0.1 and the device's own IP (10.200.100.10 in this case). FreeRTOSconnect() returns -pdFREERTOSERRNO_ETIMEDOUT in both cases.
For the networkIF driver, I am using the STM32Fxx/NetworkInterface.c driver supplied with FreeRTOS+TCP.
Am I missing something simple here?
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by edwards3 on October 27, 2016 Is there a loopback interface?
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by emesbee on October 28, 2016 I guess not. Forgive my ignorance, but would that require a separate network interface? I had assumed loopback was handled in the stack.
This same project was working this far with LWIP, in which I believe I didn't have a separate interface driver for loopback. However the lack of thread saftey in LWIP made for problems further down the line.
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by rtel on October 28, 2016 The easiest way to do this would be to update the driver to return
packets going to its own IP address back to itself.
For example, in the driver there is a send function that writes data
onto the wire, and a receive function that posts received packets on a
queue for processing the by the IP task. You can update the send driver
to check the destination - if the destination is not itself the packet
can be written onto the wire like normal, if the destination is itself
the packet can be sent on the queue to be processed by the IP task just
as if it had been received from the network.
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by heinbali01 on October 28, 2016 There is no loopback interface yet in the FreeRTOS+TCP IP stack.
Formally it is a different interface with its own netmask and routing rules.
Yes it should be added.
There is a new version of FreeRTOS+TCP available for testing: it allows to use multiple interfaces and it recognises IPv6.
We will add the loopback interface to it (has not been done yet).
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by emesbee on March 29, 2017 I'm just returning to this issue now again. How do I access the versions of FreeRTOS+TCP which are available for testing?
FreeRTOS+TCP sockets will not connect to localhost, does connect to remote hosts.Posted by heinbali01 on March 29, 2017 Would you mind to drop an email to h dot tibosch [at] freertos dot org ?
The thing is, we don't just publish software that hasn't been fully been tested. Also, the documentation is not yet complete. Regards, Hein
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|