Limiting the amount of data received from AT#XRECV command.

Hi,

We are updating an older platform with the nRF9151 on an add-on PCB.The platform has very limited processing power and buffer space.

The nRF9151 module with the at firmware is connected via UART without CTS/RTS connected. Our previous modules had the option to limit the amount of data received in the command used to get TCP/IP socket data, hence the lack of hardware flow control. We have one line of hardware communication we might be able to convert to a CTS connection, but it's sub optimal.

The question is if there's a command based way to limit the amount of data received through the UART from a TCP/IP socket via AT#XRECV or similar while using the at-firmware, or do we need to make either custom firmware for the nRF9151 module or hardware changes?

Kind regards,

Daniel.

Parents
  • Hi,

    Yes, #XRECV supports small reads. It has an optional <data_len> argument that lets you specify the maximum number of bytes to receive from the socket in a single call.
    However, this only limits how much data is read per #XRECV and does not replace UART hardware flow control. If the Serial Modem UART RX buffers fill up, it will disable UART reception. Whereas when hw flow control (RTS/CTS) is enabled, the modem can pause the sender, but without it incoming UART data may be dropped. Therefore, its sill recommended to add at least CTS.

    Best Regards,
    Syed Maysum

Reply
  • Hi,

    Yes, #XRECV supports small reads. It has an optional <data_len> argument that lets you specify the maximum number of bytes to receive from the socket in a single call.
    However, this only limits how much data is read per #XRECV and does not replace UART hardware flow control. If the Serial Modem UART RX buffers fill up, it will disable UART reception. Whereas when hw flow control (RTS/CTS) is enabled, the modem can pause the sender, but without it incoming UART data may be dropped. Therefore, its sill recommended to add at least CTS.

    Best Regards,
    Syed Maysum

Children
Related