Buffer size of modem

Dear Nordic company,

                                    I have question connected with nrf9151 chip. I know, that this chip contains two parts, ARM core and modem.

I am trying to understand of Serial LTE modem application. Now I know (I think I know it correctly), that if I use recv() function, data are removed from RX buffer (inside modem) into buffer inside ARM section via inter proceor communication.  

slm_data_buf is buffer inside ARM section, am I right?

If I use function data_send(), I will send bytes from slm_data_buf into UART, via UART into device, that controls nrf9151 (personal computer, application microcontroler etc). 

But my question is connected with buffer inside modem. What is capacity of internal buffer of modem for each socket? How many sockets could be create?

Yes, I searched discussions here, but I was not able to fd anything. Only informations that I was able to found that via recv() function I am able to transfer 2048 bytes od data (cause of MTU of one packet). I know function recv() overwrite data, that are inside buffer (if in first step I receive 100 bytes and in the second step 200 bytes an if I am no so fast to transmitt 100 bytes from slm_data_buf, these bytes will be overwritten by 200 bytes received in the second step).

But how many packets could be stored into one buffer of one socket?

I try to make slm_data_buf larger, I can do it inside slm_at_host.c file. But if is true, that recv() function can only transmitt 2048 bytes, it doesn't make a sence.

I am working on strategy of retention of data, and I wanna know , how i can construct memory managment. 

Please inform me about buffer size of one socket inside modem (in packets or in bytes). And about number of socket that I can create.

Kind regards

Jaroslav Havel

Parents
  • Assuming you use TCP, make sure you implement flow control correctly. If you do that, you won't have any issues even if your UART is slower than the TCP connection.

    I see you are using select (poll) functionality to watch when the socket is ready. The key is to only watch the socket while there is space in your outgoing UART buffer. When you do that correctly, then assuming the UART buffer is full, you won't include the socket's file descriptor in the next iteration and hence the recv function will not be called. When the UART transfer is complete, you can start to include the socket's file descriptor in the select (poll) operation again.

    The modem (if implemented correctly) should limit the data rate using its TCP implementation back to the sender, so that the sender doesn't send data faster that you can process on the receiver side.

Reply
  • Assuming you use TCP, make sure you implement flow control correctly. If you do that, you won't have any issues even if your UART is slower than the TCP connection.

    I see you are using select (poll) functionality to watch when the socket is ready. The key is to only watch the socket while there is space in your outgoing UART buffer. When you do that correctly, then assuming the UART buffer is full, you won't include the socket's file descriptor in the next iteration and hence the recv function will not be called. When the UART transfer is complete, you can start to include the socket's file descriptor in the select (poll) operation again.

    The modem (if implemented correctly) should limit the data rate using its TCP implementation back to the sender, so that the sender doesn't send data faster that you can process on the receiver side.

Children
No Data
Related