DFU over UART #nrf52832


gurpreet+zephy@...
 

Hi,

I'm trying to build an app that can be upgraded over UART. I see the smp_svr sample has an example of doing this over BT, and I could get that to work.
I've tweaked the prj.conf to add the line 
CONFIG_MCUMGR_SMP_UART=y

I've also disabled CONFIG_MCUMGR_SMP_BT just to prevent things from getting confusing. 

My nrf52 has an mcuboot which was obtained from https://github.com/runtimeco/mcuboot
I then sign and build my modified smp_svr image and then flash it to the device. 

I see the following on console
***** Booting Zephyr OS zephyr-v1.13.0-6-g497974b8b *****
Zephyr Shell, Zephyr version: 1.13.0
Type 'help' for a list of available commands
shell> Bluetooth initialized
Advertising failed to start (rc -5)

the console, however is read only - I cant access the shell. This is all on the nRF52 dev board.
I'm using Ubuntu 18.04 as my host environment. 

My questions:
1. Is there some step I'm missing to allow device upgrades over UART? 
2. Do I need to do anything in particular for 2-way access to the shell

For reference, my prj.conf is:
# Enable mcumgr.
CONFIG_MCUMGR=y
 
# Some command handlers require a large stack.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
 
# Ensure an MCUboot-compatible binary is generated.
CONFIG_BOOTLOADER_MCUBOOT=y
 
# Allow for large Bluetooth data packets.
CONFIG_BT_L2CAP_TX_MTU=260
CONFIG_BT_RX_BUF_LEN=260
 
# Enable the Bluetooth and shell mcumgr transports.
#CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_SHELL=y
CONFIG_MCUMGR_SMP_UART=y
 
# Bluetooth support requires a net_buf user_data size >= 7.
CONFIG_NET_BUF_USER_DATA_SIZE=7
 
# Enable flash operations.
CONFIG_FLASH=y
 
# Enable the NFFS file system.
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_NFFS=y
 
# Required by the `taskstat` command.
CONFIG_THREAD_MONITOR=y
 
# Enable statistics and statistic names.
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
 
# Enable all core commands.
CONFIG_MCUMGR_CMD_FS_MGMT=y
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_STAT_MGMT=y
 
### nRF5 specific settings
 
# Specify the location of the NFFS file system.
CONFIG_FS_NFFS_FLASH_DEV_NAME="NRF_FLASH_DRV_NAME"
Thanks in advance..
Gurpreet 

Join users@lists.zephyrproject.org to automatically receive all group messages.