Hi,

I never used netconn so I just thinking out loud you use the same conn for 
listening

and to connect ?... can you it ?


here is an example that may help.


BR,

Noam.


________________________________
From: lwip-users <[email protected]> on behalf of 
Danil Kaykov <[email protected]>
Sent: Friday, June 10, 2016 6:16 AM
To: [email protected]
Subject: [lwip-users] netconn_connect hangs


Hi all.
I'm using stm32 with FreeRTOS and trying to create tcp client.
The problem is that the netconn_connect hangs.

static void tcpecho_thread(void *arg)
{
  err_t err;
  struct pbuf *pbuf;

  LWIP_UNUSED_ARG(arg);

  /* Create a new connection identifier. */
  conn = netconn_new(NETCONN_TCP);

  if (conn!=NULL)
  {
    /* Bind connection */
    err = netconn_bind(conn, &local_addr, 0);

    if (err == ERR_OK)
    {
      err = netconn_connect(conn, &remote_addr, 8080);
     // at this point it seems the program hangs forever.
    ..........

Thanks advanced.

Best regards,
Danil Kaykov
[email protected]
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to