Re: [Zephyr-devel] Firmware over the air (FOTA) and FCB support in 1.11.0


vikrant8051 <vikrant8051@...>
 

Hi,

After flashing $zephyr/samples/subsys/mgmt/mcumgr/smp_svr signed.hex on nRF52840
along with pre-flashed #mcuboot, I am able to execute following commands

#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' echo hello
o/p -> hello

#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image list

o/p -> Images:
 slot=0
    version: 1.0.0
    bootable: true
    flags: active confirmed
    hash: 7c83263c9b0ebfbe192befd2e237c029ea3c7e56e7a30987cd20adb72897c34d
Split status: N/A (0)

#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image upload signed.bin  // <--- signed.hex (Hello World example signed using imgtool.py)
o/p -> 44.49 KiB / 44.49 KiB [=================================================================================================]  99.99%
Done

#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image list
o/p->
Images:
 slot=0
    version: 1.0.0
    bootable: true
    flags: active confirmed
    hash: 7c83263c9b0ebfbe192befd2e237c029ea3c7e56e7a30987cd20adb72897c34d
 slot=1
    version: 1.0.0
    bootable: true
    flags:
    hash: 65d9a1543f00b55e9cad4a56fb2a7d6934a6422320db4370f9ddfc0e2d663702
Split status: N/A (0)

#mcumgr --conntype ble --connstring 'peer_name=Zephyr' image test 65d9a1543f00b55e9cad4a56fb2a7d6934a6422320db4370f9ddfc0e2d663702
o/p->
Images:
 slot=0
    version: 1.0.0
    bootable: true
    flags: active confirmed
    hash: 7c83263c9b0ebfbe192befd2e237c029ea3c7e56e7a30987cd20adb72897c34d
 slot=1
    version: 1.0.0
    bootable: true
    flags: pending
    hash: 65d9a1543f00b55e9cad4a56fb2a7d6934a6422320db4370f9ddfc0e2d663702
Split status: N/A (0)


#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' reset
Done

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

But #nRF52840_PDK board does not print anything on its serial terminal.
And
#sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' image confirm
O/P -> Error: 6

That means mcuboot, is not able to swap image from slot1 to slot0. 
Any solution or trick ?

Thanks,
vikrant8051









On Sat, Apr 7, 2018 at 11:33 AM, vikrant8051 <vikrant8051@...> wrote:
Hi David,

Your trick worked for me. Thank You !!

Using this i got version of cryptography

     pip freeze | grep "cryptography"
     cryptography==1.2.3

So I uninstalled i& reinstall it.

    pip uninstall cryptography
    pip install cryptography


I followed instructions on this link -> http://docs.zephyrproject.org/samples/subsys/mgmt/mcumgr/smp_svr/README.html

& flashed smp_server's signed.hex on #nRF52840_PDK board.

Now #nRFConnect is showing something like as per attached image ..

 Thank You !!

On Fri, Apr 6, 2018 at 9:45 PM, David Brown <david.brown@...> wrote:
Adding dev-mcuboot@...

On Fri, Apr 06, 2018 at 02:27:14PM +0000, Giuliano Franchetto wrote:

My bad, I think it was the cryptography python3 module we had to upgrade.

My version is cryptography==2.1.4

It'd be nice if we could figure out what minimum version of
cryptography we need, so we could put that in the requirements.txt
file.  Unfortunately, the stack trace isn't very help, which makes it
hard to even tell what API is missing/changed.

David





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