This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SMP server FOTA speed

Hi,

I'm trying to create an application based on the SMP Server app (NCS v1.7.0). I'm able to perform a FOTA using nRF Connect for Mobile and the app._update.bin without any issue but I would like to know if there's a way to increase the speed of the firmware update? The update speed is about 1.6 kB/s or less. Is it a normal behavior?

I tried to update those parameters :

CONFIG_BT_BUF_ACL_RX_SIZE=1024
CONFIG_BT_L2CAP_TX_MTU=1024

The speed increased to 3.0 kB/s but I'm getting this exception in the nRF Connect for Mobile application console.

[McuMgr] "io.runtime.mcumgr.exception.McuMgrErrorException: Mcu Mgr Error: IN_VALUE(3)" received

Here is my prj.conf

# Debug
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y

# RTT Viewer
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_CBPRINTF_FP_SUPPORT=y

# BLE
CONFIG_BT=y
CONFIG_BT_SMP=y
CONFIG_BT_NUS=y
CONFIG_BT_PERIPHERAL=y
# See www.bluetooth.com/.../ for more information about the appearance.
# Generic Sensor
CONFIG_BT_DEVICE_APPEARANCE=1344
CONFIG_BT_DEVICE_NAME="Valve Monitor"
CONFIG_BT_MAX_CONN=2
CONFIG_BT_MAX_PAIRED=2
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304

# FOTA MCUMGR
CONFIG_MCUMGR=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

# MCUBoot
CONFIG_BOOTLOADER_MCUBOOT=y

# SAADC
CONFIG_ADC=y
CONFIG_ADC_ASYNC=y

# GPIO
CONFIG_GPIO=y

# WDT
CONFIG_WATCHDOG=y

# Task watchdog
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_CHANNELS=3

Thanks!

  • Hi, 

    According to the BLE Spec 5.2, vol. 3, Part F, section 3.2.9, it is not possible to have attributes larger than 512 bytes:

    "3.2.9 Long attribute values
    The longest attribute that can be sent in a single packet is (ATT_MTU-1) octets
    in size. At a minimum, the Attribute Opcode is included in an Attribute PDU.
    An attribute value may be defined to be larger than (ATT_MTU-1) octets in
    size. These attributes are called long attributes.
    To read the entire value of an attributes larger than (ATT_MTU-1) octets, the
    ATT_READ_BLOB_REQ PDU is used. It is possible to read the first
    (ATT_MTU-1) octets of a long attribute value using the ATT_READ_REQ PDU.
    To write the entire value of an attribute larger than (ATT_MTU-3) octets, the
    ATT_PREPARE_WRITE_REQ and ATT_EXECUTE_WRITE_REQ PDUs are
    used. It is possible to write the first (ATT_MTU-3) octets of a long attribute
    value using the ATT_WRITE_CMD PDU.
    It is not possible to determine if an attribute value is longer than (ATT_MTU-3)
    octets using this protocol. A higher layer specification will state that a given
    attribute can have a maximum length larger than (ATT_MTU-3) octets.
    The maximum length of an attribute value shall be 512 octets.
    Note: The protection of an attribute value changing when reading the value
    using multiple Attribute protocol PDUs is the responsibility of the higher layer."

    You also could take look at this post for setting MTU to 512 bytes

    Regards,
    Amanda

Related