Is there any , udp or tcp , data sending and receiving example , for FM4-176L-S6E2GM ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
albac_1295646
Level 1
Level 1
First reply posted First question asked

Hello ,

I am modifying the ethernet example , but doesn't work .

perhaps there is a working example .

while (1)

    {

        if ( 0 != EmacGetFrameLength(&EMAC0) )  // Emac received data?

        {

            LwIPInputHandle();    // Lwip handle the received data

        }

        LwipPeriodHandle();       // Lwip clears ARP table every 5 second

    if ( 0 != EmacGetFrameLength(&EMAC0) )  // Emac received data?

        {

           

       

    err = udp_bind(upcb, IP_ADDR_ANY, UDP_SERVER_PORT);

        IP4_ADDR(&ip6,192,168,7,11);

       pb = pbuf_alloc(PBUF_TRANSPORT, 512, PBUF_REF);

        pb->payload = str;

        pb->len = pb->tot_len = 512;

        udp_connect(upcb, &ip6,5000);

        udp_send(upcb,  pb );

        udp_disconnect(upcb);

        pbuf_free( pb);

    }

    }

I would appreciate any comment.

0 Likes
1 Solution
2 Replies