AnsweredAssumed Answered

udp packet sender

Question asked by Burck.Steven on May 1, 2017

I've implemented on my board the UDP packet server as a task for a board which has to support ethernet, but nothing is defined for the interface.  So far so good.  I send UDP packets to it and it receives and echoes them, running LWIP as a low-priority task.


I was asked to add BIT functionality to the ethernet.  What I want to do is basically send UDP packets to myself while turning on the internal loopback of the PHY and see that I get and echo them.  This is not working.  I started to work backwards, just implmenting UDP packet sending without receiving.  I find that this, too, is not working.


Initializations are as before , when I want to test the ethernet interface I call

struct udp_pcb *udpb = udp_new();

then (local_ip is built using IP4_ADDR(192,168,0,1))

udp_connect(udpb (const struct ip_addr *)local_ip, 7);

and finally (several times)

udp_send(udpb, p) where p is allocated from the pool.  


If I try to send this in my echo server callback routine, it works, I already have the call to connect and send, I add the allocation of the fixed buffer I am trying to send and send it as well, and I can see on the PC side with Wireshark both the echo then the data sent.  But doing it just like this doesn't even tickle the PC - nothing seems to come out.  Is there something I am missing?