Serial LTE Modem AT#XSENDTO limited to 256 bytes of payload in one datagram

Hi,

why AT#XSENDTO in datamode is limited to 256 bytes of payload in one datagram please ?

It seams, that limitation comes from UART_RX_LEN in slm_at_host.c
https://github.com/nrfconnect/sdk-nrf/blob/9a5b3865e22e007f68d628eb732b26127ac0e041/applications/serial_lte_modem/src/slm_at_host.c#L36

Why it is not by default at least 548 ?

Default NET_IPV4_MTU 576 - 28 (IPv4 + UDP header) = 548

Why CONFIG_SLM_SOCKET_RX_MAX (developer.nordicsemi.com/.../slm_description.html) is not used in slm_at_host.c for UART_RX_LEN ?

SLM is splitting UDP payloads into multiple datagrams now. This is not correct behavior, it should report error in case maximum payload is exceeded. UDP payload is not stream like TCP and can not be reconstructed correctly at receiver side.

Regards,
Michal

Parents Reply Children
  • Hi,

     

    Here's my test setup:

    * ncs v1.9.0

    * SLM with one modification: CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y

    AT commands that I send:

    at%xmodemtrace=1,2
    at+cfun=1
    AT#XSOCKET=1,2,0
    
    AT#XSENDTO="example.com",1234
    "Test UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDPTest UDP"
    ++++++
    Here it sends > 512 byte datagram, as shown in this pcap:

    trace-2022-03-09T12-21-49.077Z.pcapng

     

    Kind regards,

    Håkon

Related