Skip to content

How to switch to the image uploaded in the slot 1? #19

@umair-uas

Description

@umair-uas

The go mcumgr client has some commands for image test and image confirm <hash>
to test and confirm the uploaded image,
I don't seem to see how it is done using this client.
I am able to upload the image and can also reset ,the functionality that was just added I think.
But I am not able to switch to the newly uploaded image.

Here is what I mean :

 mcumgr-client -d /dev/ttyACM0 list
mcumgr-client 0.0.3, Copyright © 2023 Vouch.io LLC

13:44:25 [INFO] send image list request
13:44:25 [INFO] response: {
  "images": [
    {
      "hash": [
        143,
        216,
        200,
        104,
        234,
        205,
        70,
        55,
        185,
        70,
        196,
        253,
        228,
        109,
        99,
        197,
        203,
        58,
        234,
        157,
        155,
        58,
        127,
        29,
        239,
        106,
        149,
        143,
        234,
        36,
        12,
        252
      ],
      "slot": 0,
      "active": true,
      "pending": false,
      "version": "1.1.1",
      "bootable": true,
      "confirmed": true,
      "permanent": false
    },
    {
      "hash": [
        143,
        216,
        200,
        104,
        234,
        205,
        70,
        55,
        185,
        70,
        196,
        253,
        228,
        109,
        99,
        197,
        203,
        58,
        234,
        157,
        155,
        58,
        127,
        29,
        239,
        106,
        149,
        143,
        234,
        36,
        12,
        252
      ],
      "slot": 1,
      "active": false,
      "pending": false,
      "version": "1.1.1",
      "bootable": true,
      "confirmed": false,
      "permanent": false
    }
  ],
  "splitStatus": 0
}

now when I upload the image

  mcumgr-client -m 256 -d /dev/ttyACM0 upload build-dongle-update/zephyr/app_update.bin
mcumgr-client 0.0.3, Copyright © 2023 Vouch.io LLC

13:54:05 [INFO] upload file: build-dongle-update/zephyr/app_update.bin
13:54:05 [INFO] flashing to slot 1
13:54:05 [INFO] 226567 bytes to transfer
  [00:00:12] [=================================================================================================================================] 221.26 KiB/221.26 KiB (0s)13:54:18 [INFO] upload took 13s

NOTE:
(see I had to reduce the MTU to 256, default does not work I don't know why, any way that's another issue)

I can see it being uploaded correctly

mcumgr-client -d /dev/ttyACM0 list
mcumgr-client 0.0.3, Copyright © 2023 Vouch.io LLC

13:55:05 [INFO] send image list request
13:55:05 [INFO] response: {
  "images": [
    {
      "hash": [
        143,
        216,
        200,
        104,
        234,
        205,
        70,
        55,
        185,
        70,
        196,
        253,
        228,
        109,
        99,
        197,
        203,
        58,
        234,
        157,
        155,
        58,
        127,
        29,
        239,
        106,
        149,
        143,
        234,
        36,
        12,
        252
      ],
      "slot": 0,
      "active": true,
      "pending": false,
      "version": "1.1.1",
      "bootable": true,
      "confirmed": true,
      "permanent": false
    },
    {
      "hash": [
        255,
        148,
        49,
        169,
        189,
        101,
        39,
        214,
        71,
        242,
        38,
        40,
        206,
        34,
        22,
        7,
        108,
        39,
        191,
        13,
        228,
        192,
        129,
        55,
        25,
        71,
        61,
        45,
        111,
        40,
        111,
        188
      ],
      "slot": 1,
      "active": false,
      "pending": false,
      "version": "1.0.2",
      "bootable": true,
      "confirmed": false,
      "permanent": false
    }
  ],
  "splitStatus": 0
}

Even after resetting the device it does not move it to slot 0 and nor can I test or confirm the image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions