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. 

  • Hi,

    Can you share the steps for making communication between mcumgr and UART. Have you done this using hci0 or over UART?

    I have referred https://docs.zephyrproject.org/1.14.0/samples/subsys/mgmt/mcumgr/smp_svr/README.html?highlight=build%20smp_svr as mentioned in my question above and proj.conf file is same as you have suggested.

    So while Using ---> sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' echo hello

    It shows hci0 not found. I did not have hci0 interface up because currently i'm running smp_svr on the flash. (I get hci0 up only when i flash zephyr hci_uart application).

    - Do i need to have hci_uart application for hci0 interface and smp_svr at the same time on board?

    - First i want to get to the point where i can get a simple 'hello' response from my BLE controller.

Reply Children
Related