Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidHeaderMagic error when calling let package = try McuMgrPackage(from: savedUrl) #328

Open
ljunquera opened this issue Feb 5, 2025 · 0 comments

Comments

@ljunquera
Copy link

I am getting InvalidHeaderMagic error when calling

let package = try McuMgrPackage(from: savedUrl)

In version 1.7.3 which I need to use because it supports Swift5.

I saw in this post the comment:

So the 'invalid header magic' means the Data is not signed. So, you were maybe trying to DFU Data from a debug build, not Release. This is why it probably worked with your file instead of the Data bytes directly.

but I am using the app_update.bin from the build/zephyr file and have this in the prj.conf:

# Enable MCUboot and FOTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="mcuboot/root-rsa-2048.pem"

I also saw the post How to generate imageData where the error was referenced, but that seems like a customization of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant