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
  • Hi,

     

    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?

    slm_data_buf is inside the application space, that is correct.

    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?

    Limitations are found in the modem .zip file, as here from v1.3.7:

    *** Limitations
    ***************
    - TLS/DTLS
        - Secure socket buffer size is 2kB.
        - Maximum length of DTLS datagram is 1kB.
        - One TLS handshake at a time is supported.
        - Concurrent secure connections
            - Maximum server certificate chain size has a limit of 4kB.
            - Two active connections are supported when serialized DTLS connection exists.
            - Two active connections are supported when client certificate size is over 1kB.
            - Two active connections are supported when GNSS acquisition is active.
            - Three active connections are supported when client certificate size is 1kB or less.
            - Four serialized DTLS connections are supported.
        - Server certificate expiry time is not verified.
        - pkcs#8 is not supported.
        - Maximum number of supported credentials is 32. The actual amount depends on size of
          credentials as memory area reserved for credentials may be a limiting factor as well.
    - IP fragmentation and reassembly are not supported.
    - Maximum number of raw sockets is 4.
    - It is recommended to free the modem resources by closing unused network sockets.
    - User plane data is supported in Cat M1 mode only.
    - TLS is not supported when socket is configured to TCP server mode.
    - Support for Non-IP Data Delivery (NIDD). Feature is verified only for NB-IoT and LTE-M is not
      supported.
    - The number of ownership keys is restricted to one, and multiple instances are not allowed.
      Additionally, writing the ownership key using the AT%CMNG AT command is not supported.
    - Downgrading to older modem firmware
        - Keys and certificates written with credential storage management AT commands might get erased
          if older than mfw_nrf9160_1.3.0 modem firmware version is downgraded to a device. If
          downgrading, it is compulsory to check existence of keys and possibly re-write erased keys and
          certificates.
        - AT command configurations written and stored to a non-volatile memory will get erased from the
          memory if old modem firmware is downgraded to a device and that old version does not support
          the AT commands.
    - nRF9160 engineering sample SIP versions are not supported. These nRF9160 SIP versions have
      markings E2.x.y on top of the SIP package.

     

    4 raw sockets can be opened up, but please read the section on the secure sockets restrictions.

    TLS has 2 kB max, while a unsecure socket has 4k.

     

    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?

    This is a shared space and highly depends on how much data is already buffered up on any other socket(s) that might be open.

    Here is more information related to the nrf_modem memory management:

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/ug_nrf_modem_porting_os.html#memory

    Please inform me about buffer size of one socket inside modem (in packets or in bytes)

    The depth of the RX and TX path is configurable via. CONFIG_NRF_MODEM_LIB_SHMEM_RX_SIZE and CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    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?

    slm_data_buf is inside the application space, that is correct.

    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?

    Limitations are found in the modem .zip file, as here from v1.3.7:

    *** Limitations
    ***************
    - TLS/DTLS
        - Secure socket buffer size is 2kB.
        - Maximum length of DTLS datagram is 1kB.
        - One TLS handshake at a time is supported.
        - Concurrent secure connections
            - Maximum server certificate chain size has a limit of 4kB.
            - Two active connections are supported when serialized DTLS connection exists.
            - Two active connections are supported when client certificate size is over 1kB.
            - Two active connections are supported when GNSS acquisition is active.
            - Three active connections are supported when client certificate size is 1kB or less.
            - Four serialized DTLS connections are supported.
        - Server certificate expiry time is not verified.
        - pkcs#8 is not supported.
        - Maximum number of supported credentials is 32. The actual amount depends on size of
          credentials as memory area reserved for credentials may be a limiting factor as well.
    - IP fragmentation and reassembly are not supported.
    - Maximum number of raw sockets is 4.
    - It is recommended to free the modem resources by closing unused network sockets.
    - User plane data is supported in Cat M1 mode only.
    - TLS is not supported when socket is configured to TCP server mode.
    - Support for Non-IP Data Delivery (NIDD). Feature is verified only for NB-IoT and LTE-M is not
      supported.
    - The number of ownership keys is restricted to one, and multiple instances are not allowed.
      Additionally, writing the ownership key using the AT%CMNG AT command is not supported.
    - Downgrading to older modem firmware
        - Keys and certificates written with credential storage management AT commands might get erased
          if older than mfw_nrf9160_1.3.0 modem firmware version is downgraded to a device. If
          downgrading, it is compulsory to check existence of keys and possibly re-write erased keys and
          certificates.
        - AT command configurations written and stored to a non-volatile memory will get erased from the
          memory if old modem firmware is downgraded to a device and that old version does not support
          the AT commands.
    - nRF9160 engineering sample SIP versions are not supported. These nRF9160 SIP versions have
      markings E2.x.y on top of the SIP package.

     

    4 raw sockets can be opened up, but please read the section on the secure sockets restrictions.

    TLS has 2 kB max, while a unsecure socket has 4k.

     

    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?

    This is a shared space and highly depends on how much data is already buffered up on any other socket(s) that might be open.

    Here is more information related to the nrf_modem memory management:

    https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/ug_nrf_modem_porting_os.html#memory

    Please inform me about buffer size of one socket inside modem (in packets or in bytes)

    The depth of the RX and TX path is configurable via. CONFIG_NRF_MODEM_LIB_SHMEM_RX_SIZE and CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE.

     

    Kind regards,

    Håkon

Children
No Data
Related