CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y is only capturing partial packets

Hello,

I have CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y.  And when I capture and convert to wireshark trace I might see a couple of random packets captured.  I am doing 2 separate TLS connects() and handshakes.  So I would definitely expect to see much more than a few random packets.

Here is my prj.conf:

CONFIG_THREAD_MONITOR=y
CONFIG_NRF_MODEM_LIB=y                # implies CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NRF_MODEM_LIB_SYS_INIT=n       # The application will take care of initializing Modem in main.c

CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y                  # Will provide BSD name support. e.g. setsockopt() instead of nrf_setsockopt()
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_NATIVE=n                   # We are using socket offload, so set this to no

CONFIG_BUILD_WITH_TFM=y

# Memory size for k_malloc()
CONFIG_HEAP_MEM_POOL_SIZE=16384
# 4096 is the default
CONFIG_MAIN_STACK_SIZE=8192           

CONFIG_MODEM_KEY_MGMT=y               # Application wants to make calls to store keys
CONFIG_LTE_LINK_CONTROL=y             # Enable the API's to setup and configure the LTE link
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n    # The application will take care of initializing the LTE stuff in main.c

CONFIG_NEWLIB_LIBC=y                  # Use the "new" libc
CONFIG_SAMPLE_TFM_MBEDTLS=y

CONFIG_CJSON_LIB=y
CONFIG_HTTP_CLIENT=y

# MbedTLS and security
CONFIG_NORDIC_SECURITY_BACKEND=y            # Required when commenting out BUILD_WITH_TFM
CONFIG_MBEDTLS_VANILLA_BACKEND=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_OFFLOAD_TLS=n
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192
CONFIG_MBEDTLS_HEAP_SIZE=44000
CONFIG_MBEDTLS_TLS_LIBRARY=y
CONFIG_MBEDTLS_PKCS1_V15=y
CONFIG_MBEDTLS_RSA_C=y
CONFIG_MBEDTLS=y                              # Required when commenting out CONFIG_NORDIC_SECURITY_BACKEND

# CONFIG_USE_SEGGER_RTT=y
# CONFIG_RTT_CONSOLE=y
# CONFIG_UART_CONSOLE=n

CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y

# Event management which handles network-related events (like ip address change, or net iface up/down for examples)
# CONFIG_NET_MGMT=y
# CONFIG_NET_MGMT_EVENT=y
# CONFIG_NET_SOCKETS_NET_MGMT=y

Thank you

/Loren

Parents
  • Hello Loren,

    Loren Rogers said:

    I'm attaching 3 files:

    1. trace_with_mbedtls.bin, 2. trace_without_mbedtls.bin, and 3. A text file containing the full log of both application runs.

    thanks a lot for the traces and log!

    The trace_with_mbedtls stops right after connect request to the server.

    Comparing the two .pcaps in Wireshark shows that the beginning is the same, which is expected.

    Could you possibly have stopped the recording of trace_with_mbedtls a little bit too early?

    Regards,

    Markus

Reply
  • Hello Loren,

    Loren Rogers said:

    I'm attaching 3 files:

    1. trace_with_mbedtls.bin, 2. trace_without_mbedtls.bin, and 3. A text file containing the full log of both application runs.

    thanks a lot for the traces and log!

    The trace_with_mbedtls stops right after connect request to the server.

    Comparing the two .pcaps in Wireshark shows that the beginning is the same, which is expected.

    Could you possibly have stopped the recording of trace_with_mbedtls a little bit too early?

    Regards,

    Markus

Children
Related