1044929595 发表于 2016-11-28 09:11:01

freertos lwip 通信问题

使用cubemx配置lwip 开启dhcp模式
static void http_server_netconn_thread(void *arg)
{
struct netconn *conn, *newconn;
err_t err, accept_err;

/* Create a new TCP connection handle */
conn = netconn_new(NETCONN_TCP);

if (conn!= NULL)
{
    /* Bind to port 80 (HTTP) with default IP address */
    err = netconn_bind(conn, NULL, 80);

    if (err == ERR_OK)
    {
      /* Put the connection into LISTEN state */
      netconn_listen(conn);

      while(1)
      {
      /* accept any icoming connection */
      accept_err = netconn_accept(conn, &newconn);
      if(accept_err == ERR_OK)
      {
          /* serve connection */
          http_server_serve(newconn);

          /* delete connection */
          netconn_delete(newconn);
      }
      }
    }
}
}然而进过一次再也没进去 电脑测试设置好tcp客户端和目地地址名为i有用 求大神


1044929595 发表于 2016-11-29 11:47:12

用freertos 陷入阻塞状态 没回应求大神

peter001 发表于 2016-11-28 11:45:45

帮顶,没用过:lol:lol

wdshuang09 发表于 2016-11-28 12:25:29

顶顶顶顶:lol

高二毛 发表于 2016-11-28 13:15:41

顶。。。。

wudianjun2001 发表于 2016-11-29 08:49:55

LWIP都是回调函数,以前玩过一段时间

chaplin1999-262 发表于 2016-11-29 09:12:15

系统的不太熟悉

z258121131 发表于 2016-11-29 09:25:08

好东西,学习学习。

jcx0324 发表于 2016-11-29 09:25:47

只知道DHCP是一个任务

斜阳__ 发表于 2016-11-29 10:08:32

mark等答案
页: [1] 2
查看完整版本: freertos lwip 通信问题