Skip to content

Image upload does not work over UDP - Zephyr smp_svr sample #29

@rlevano77

Description

@rlevano77

I am trying to setup the zephyr samples/subsys/mgmt/mcumgr/smp_svr using UDP
I am using Windows 11 and Golang v1.18.4
After I added mcuboot to my atsame54_xpro board.
I built the smp_svr with UDP support using :
west build -p auto -b myboard -d build-signed -- -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE=\"bootloader/mcuboot/root-rsa-2048.pem\" -DOVERLAY_CONFIG=overlay-udp.conf

mcuboot reconigze the image :
Booting Zephyr OS build zephyr-v3.1.0-812-g88ca3aca98c0
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: primary slot
I: Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot
[00:00:00.255,000] mdio_sam: transfer timedout MDIO
[00:00:00.510,000] mdio_sam: transfer timedout MDIO
[00:00:00.765,000] mdio_sam: transfer timedout MDIO
Booting Zephyr OS build zephyr-v3.1.0-812-g88ca3aca98c0
[00:00:01.020,000] mdio_sam: transfer timedout MDIO
[00:00:01.020,000] eth_sam: MAC: 02:04:25:4b:d0:b9
[00:00:01.020,000] eth_sam: Queue 0 activated
[00:00:06.069,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex
[00:00:06.069,000] eth_sam: Link up
[00:00:06.070,000] smp_udp_sample: Network connected
[00:00:06.070,000] smp_sample: build time: Jul 20 2022 06:19:25
[00:00:06.070,000] smp_udp: Started (IPv4)

I tested the udp connection and works ok :
`$ mcumgr --conntype udp --connstring=[192.168.1.71]:1337 echo hello
hello

$ mcumgr --conntype udp --connstring=[192.168.1.71]:1337 image list
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: 5fbc81f7d0f5e5de22f254746bc977ce8836bf364e576f4f03c418bd1451679c
Split status: N/A (0)`

But when I try to upload an image I only see
$ mcumgr --conntype udp --connstring=[192.168.1.71]:1337 image upload build-signed/zephyr/zephyr.signed.bin
0 B / 71.88 KiB [------------------------------------------------------------------------------------------------------------------------------------------------------------] 0.00%
and nothing uploads.

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