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.

TM4C1294NCPDT: Sending large data using LWIP UDP

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: MSP432E401Y

I am trying to send around 4k of data using UDP. I have an application working if I send around 1400 bytes. But if I try and send 4k then I dont get any packets sent. Do I need to configure anything in LWIP to do this? Thanks

void eth_udp_tx()
{
    struct pbuf *p;
    err_t err;

    p = pbuf_alloc(PBUF_TRANSPORT, 1400, PBUF_RAM);

    if (p)
    {
        memcpy(p->payload, eth_tx_buf, 1400);
        err = udp_sendto(new_udp_pcb, p, &udp_addr, udp_port);
        pbuf_free(p);
    }
}

  • Jon Bean1 said:
    Do I need to configure anything in LWIP to do this?

    What is the value of IP_FRAG in the lwipopts.h used to configure lwip in the project?

    IP_FRAG needs to be set to 1 to fragment outgoing IP packets if their size exceeds MTU.

  • Thanks I actually found that myself after I posted and it does work. But would it be possible to use jumbo frames so that the payload could be sent in one packet? If so what would I need to do? 

  • Hi,

      Thanks to Chester for his inputs.  As far as jumbo frame, it is supported by both the on-chip EMAC from the hardware side and LwIP from the software side. However, we don't have any experience with using jumbo frame as what/how to properly configure on the LwIP for jumbo frame operation. I will suggest you reach out to LwIP forum. Perhaps Chester has experience with it and welcome his input. 

  • Hi Charles

    I have tried on the LwIP forum but haven't really got anywhere. I see there are some config parameters for the Ethernet config for the jumbo frames that need setting

    EMAC_CONFIG_JABBER_DISABLE 
    EMAC_CONFIG_JUMBO_ENABLE 

    Also there is a file in the ports directory of the LwIP that sets the MTU

    psNetif->mtu = 1500;

    I tried setting this to a larger value but it didnt work. There are probably other things that need doing but I dont know enough about LwIP.

    Regards

    Jon

  • Hi Jon,

      Sorry, the LwIP is a third party software that we have no expertise in its underlying architecture and all the knobs. I hope they will get back to you for advise.  I'm not surprised that you will need to hack the ports directory to utilize the jumbo frame. Please do reply back if you have any findings that might benefit the community who are looking for the same idea. 

  • Charles Tsai said:
    Perhaps Chester has experience with it and welcome his input. 

    I haven't yet attempted to use jumbo frames with TM4C129 devices.

    Charles Tsai said:
    As far as jumbo frame, it is supported by both the on-chip EMAC from the hardware side and LwIP from the software side.

    In the thread MSP432E401Y: Does this device support sending Jumbo Packet Frames the answer was:

    Eddie LaCost said:
    I was informed that the frame size is limited to 1500 bytes as the EMAC does not support other sizes.

    Since I think that MSP432E401Y uses the same EMAC as TM4C129 devices I presume that means TM4C129 devices also don't support jumbo frames, albeit as noted above I haven't attempted to test it.

  • Hi Chester,

      Thank you for your feedback and also the post you reference. Yes, indeed the MSP432E4 is identical to the TM4C129 but targeting different software platforms. I was initially under the impression that jumbo frame is supported on the EMAC based on the datasheet description. I think Eddie may have consulted with Amit and Sai to reach the conclusion. I can ask them again but I will not dispute their answer. Perhaps it is something to update on the datasheet if jumbo frame cannot be supported.  

  • Thanks for the info. I am going to just use the LwIP in standard mode as it looks like getting jumbo frames to work is either not possible or will require more effort than I want to spend time on.

    Regards

    Jon