Vendor Command + HID fix (#618)

* Fixes CBOR message passing through Vendor HID

I did all my tests on hardware with this fix, and now I'm surprised that
it didn't end up on develop. So should have been part of a former PR.

* vendor channel test

* forward vendor HID correctly for upgrades

* fixes cargo fmt

* removes script and updates documentation to match
This commit is contained in:
kaczmarczyck
2023-04-26 14:59:22 +02:00
committed by GitHub
parent bcd382e5e9
commit 645c1ba3a7
4 changed files with 28 additions and 41 deletions

View File

@@ -62,19 +62,24 @@ firmware. You can bootstrap an upgradable board using one of the two commands:
Afterwards, you can upgrade the other partition with
```shell
./tools/perform_upgrade.sh nrf52840dk_opensk_b --version=1
./tools/perform_upgrade.sh nrf52840dk_opensk_a --version=1
# Board A -> B
./deploy.py --board=nrf52840dk_opensk_b --opensk --programmer=none --version=1
python3 -m tools.deploy_partition --board=nrf52840dk_opensk_b --version=1
# Board B -> A
./deploy.py --board=nrf52840dk_opensk_a --opensk --programmer=none --version=1
python3 -m tools.deploy_partition --board=nrf52840dk_opensk_a --version=1
```
respectively. You can only upgrade the partition that is not currently running,
so always alternate your calls to `perform_upgrade.sh`. Otherwise, this script
works like `deploy.py`. You can call it even after you locked down your device,
to deploy changes to your development board.
otherwise your deploy attempts will fail. You can call `deploy_partition` after
you locked down your device, to deploy changes to your development board.
Upgrades only apply after a reboot.
If you deploy with `--vendor-hid`, also add this flag to `perform_upgrade.sh`,
If you want to use Vendor HID, add the `--vendor-hid` flag to all calls,
for example:
```shell
./deploy.py --board=nrf52840dk_opensk_a --opensk --version=0 --vendor-hid
./tools/perform_upgrade.sh nrf52840dk_opensk_b --version=1 --vendor-hid
./deploy.py --board=nrf52840dk_opensk_b --opensk --programmer=none --version=1 --vendor-hid
python3 -m tools.deploy_partition --board=nrf52840dk_opensk_b --version=1 --vendor-hid
```