Skip to main content
borzoo
Visitor II
August 24, 2015
Question

UDP packet receive problem

  • August 24, 2015
  • 3 replies
  • 1521 views
Posted on August 24, 2015 at 12:59

Hi all,

I'm using UDP Echo client code example in STM32F217xx.I can send the custom buffer...ok but I can't receive udp packets from PC.

I have a VS code that can generate UDP test packets as well...

I use the udp_recv function that sets a call back function...I have a breakpoint in callback function...but no packet receive.

When I check in wireshark, it says: destination port is unreachable !!! I changed the port but the problem remains...

It would be appreciated if you help any way.Thanks
    This topic has been closed for replies.

    3 replies

    Nickname5522_O
    Visitor II
    August 25, 2015
    Posted on August 25, 2015 at 18:32

    Hi khoshnoud.borzoo,

    Refer to  

    http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/DM00026013.pdf

    , it can guide you.

    -Shahrzad-

    akosodry
    Associate III
    June 14, 2016
    Posted on June 14, 2016 at 20:48

    Hello khoshnoud.borzoo,

    i have the same problem. Did you find the solution?

    Thanks for your help in advance.

    Best regards.

    akosodry
    Associate III
    June 14, 2016
    Posted on June 14, 2016 at 20:55

    HelloShahrzad,

    from the application note its not that obvious what could be the problem with the provided example project. Could you give us some hints, tips? In theudp_client_connect(void) function we define the receive callback byudp_recv(upcb, udp_receive_callback, NULL). I suppose that the

    void udp_receive_callback(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port);

    shall be called every time a package is received, however i debugged and it is not called. I assume something is missing in the example code.. Thanks for your help in advance. Best regards.