This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue in flashing of zephyr OS over UART on Nordic nrf52840_pca10056 chip

Hi,

I have nrf52840 on my custom board (Based on IMX6, Running Yocto linux) which is connected over UART.

I want to an OTA of zephyr OS on that chip over serial and for that i had already tried following things.

1) I have build smp_svr and flashed it to nrf52840 so that i can use 'mcumgr' command line tool for the flashing.

Referred https://docs.zephyrproject.org/1.14.0/samples/subsys/mgmt/mcumgr/smp_svr/README.html?highlight=build%20smp_svr to know how to use 'mcumgr'.

Now, when i use mcumgr to communicate 'hello' message over serial/UART, It shows error of connection timed out. (Also tried with -t switch, but no luck).

Command used are :

1) mcumgr conn add myserial02 type=serial connstring="dev=/dev/ttymxc0, peername='Zephyr'"

2) sudo mcumgr --conntype=serial --conn=myserial02 echo hello

3) sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image upload signed.bin //Tried this command for OTA over BLE.

- So it's not able to open the connection using mcumgr and not getting any reply.

Q: So what is the best way to do an OTA of Zephyr OS over UART or BLE (If over BLE, then do i need to integrate the hci example with the zephyr).

Thanks,

Mayank

Parents
  • Hi Mayank, 

    We are not supporting nRF52 in NCS SDK. What you were following was the implementation from Zephyr. We have the same question on this case.  I would suggest you to join the mailing list and ask there. 

    I played a bit with smp_svr and to enable UART you would need to modify the pro.conf of smp_svr with following: 

    #CONFIG_MCUMGR_SMP_BT=y
    #CONFIG_MCUMGR_SMP_SHELL=y
    CONFIG_MCUMGR_SMP_UART=y

    CONFIG_NET_BUF_USER_DATA_SIZE=7

    After that smp_svr should response to the mcumgr via UART. 
    I haven't managed to upload an image due to error 3, not sure what the problem here. 

    Update: It was a signing problem. I signed the image and it works now. 

Reply
  • Hi Mayank, 

    We are not supporting nRF52 in NCS SDK. What you were following was the implementation from Zephyr. We have the same question on this case.  I would suggest you to join the mailing list and ask there. 

    I played a bit with smp_svr and to enable UART you would need to modify the pro.conf of smp_svr with following: 

    #CONFIG_MCUMGR_SMP_BT=y
    #CONFIG_MCUMGR_SMP_SHELL=y
    CONFIG_MCUMGR_SMP_UART=y

    CONFIG_NET_BUF_USER_DATA_SIZE=7

    After that smp_svr should response to the mcumgr via UART. 
    I haven't managed to upload an image due to error 3, not sure what the problem here. 

    Update: It was a signing problem. I signed the image and it works now. 

Children
Related