This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omapl138 以太网 LWIP 问题



你好,TI的工程师

开发板是LogicPD,工具是5.2.1.00018,用的demo是starterware里的enet_echo,裸机的。

问题是: 该demo中omapl138是作为服务器的,但是arm端 不能发送和接收数据。

                我将omapl138改为客户端,但是有时候会connect 不上,有时候又能连上。

下面是我修改后的部分代码:

void echo_init(void)
{
  struct tcp_pcb *pcb_a,*pcb_b;
  struct ip_addr DestIPaddr;

   /* create new tcp pcb */
   pcb_a = tcp_new();

   if (pcb_a != NULL)
   {
     IP4_ADDR( &DestIPaddr, 192, 168, 247, 2 );

     /* connect to destination address/port */
     tcp_connect(pcb_a,&DestIPaddr,PORT,echo_connected);
   }

}

err_t echo_connected(void *arg, struct tcp_pcb *pcb, err_t err)

{

   麻烦说这里面怎么处理,我就是简单的 return ERR_OK;

}

谢谢指点下