Jan 30, 2021
08:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 30, 2021
08:59 AM
hello,
I am trying to implement an active connection as declared [HTML]https://lwip.fandom.com/wiki/Raw/TCP#Active_connection[/HTML]
I can see that the passive connection is working..
what I get is a routing error ERR_RTE when I call tcp_connect() ...
On the other end is a simple nodejs server using the net module and waiting for connections at port 8080. Its IP is 192.168.0.1 and the xmc's IP is 192.169.0.10
Below is my code
I am trying to implement an active connection as declared [HTML]https://lwip.fandom.com/wiki/Raw/TCP#Active_connection[/HTML]
I can see that the passive connection is working..
what I get is a routing error ERR_RTE when I call tcp_connect() ...
On the other end is a simple nodejs server using the net module and waiting for connections at port 8080. Its IP is 192.168.0.1 and the xmc's IP is 192.169.0.10
Below is my code
char *buf = "Connect Called";
struct tcp_pcb *pcb = tcp_new();
err_t error_connection;
struct ip4_addr rem_ipaddr;
tcp_bind_netif(pcb, Ð_LWIP_n.xnetif);
tcp_err(pcb, err_callback);
//IP4_ADDR(&rem_ipaddr, 192, 168, 0, 1);
IP4_ADDR(&rem_ipaddr, REM_IP_ADDR0, REM_IP_ADDR1, REM_IP_ADDR2, REM_IP_ADDR3);
error_connection = tcp_connect(pcb, &rem_ipaddr, 8080, on_connection_success);
if (error_connection == ERR_OK)
SEGGER_RTT_WriteString(0, buf);
Solved! Go to Solution.
- Tags:
- IFX
1 Solution
Mar 04, 2021
09:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 04, 2021
09:08 PM
Hello,
Sorry for the delay. We have an example project in which client initiates connection to the server.
Please check the example project "IOT_EXAMPLE_XMC47" from the following link: https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html.
Thanks and Regards,
Sudheesh
Sorry for the delay. We have an example project in which client initiates connection to the server.
Please check the example project "IOT_EXAMPLE_XMC47" from the following link: https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html.
Thanks and Regards,
Sudheesh
2 Replies
Mar 04, 2021
09:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 04, 2021
09:08 PM
Hello,
Sorry for the delay. We have an example project in which client initiates connection to the server.
Please check the example project "IOT_EXAMPLE_XMC47" from the following link: https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html.
Thanks and Regards,
Sudheesh
Sorry for the delay. We have an example project in which client initiates connection to the server.
Please check the example project "IOT_EXAMPLE_XMC47" from the following link: https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html.
Thanks and Regards,
Sudheesh
Mar 06, 2021
02:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 06, 2021
02:20 AM
Hello KSudheesh
Thank you for your reply. I will look into it and let you know how it goes, in case any other users have same issue..
Regards
Thank you for your reply. I will look into it and let you know how it goes, in case any other users have same issue..
Regards