Closed marvinmarnold closed 2 years ago
SWARM_KEY_URI
format:
ecc:<dev>[:address][?slot=<slot>]
dev
the device file name (usually begins with i2c or tty)address
the bus address (default 96)slot
the slot to use for key lookup/manipulation (default: 0)1. To get the swarm key with gateway_mfr
version 0.1.7:
$ /opt/python-dependencies/hm_pyhelper/gateway_mfr --path=/dev/i2c-7 key 0
{
"key": "11YEpycWgugBctqFCC53QubjjeYrcv8wqTcwc2985FxVZoSF38M",
"name": "formal-magenta-anteater",
"slot": 0
}
Or
$ /opt/python-dependencies/hm_pyhelper/gateway_mfr --path=/dev/i2c-7 --address=96 key 0
2. To get the swarm key with gateway_mfr
version 0.2.1:
$ /opt/python-dependencies/hm_pyhelper/gateway_mfr --device=ecc://i2c-7:96?slot=0 key
{
"key": "11YEpycWgugBctqFCC53QubjjeYrcv8wqTcwc2985FxVZoSF38M",
"name": "formal-magenta-anteater"
}
Or this can be abbreviated as
$ /opt/python-dependencies/hm_pyhelper/gateway_mfr --device=ecc://i2c-7:96 key
$ /opt/python-dependencies/hm_pyhelper/gateway_mfr --device=ecc://i2c-7 key
Given that we bundle gateway_mfr
with this repo, we should be able to make this fully transactional.
Related with https://github.com/NebraLtd/hm-pyhelper/pull/148
@posterzh can you recommend a way for us to validate that these changes are working in the fleet?
@marvinmarnold Working diagnostics page is the obvious proof.
If get_public_keys_rust()
is broken while developing, even the diagnostics
service couldn't start.
Thanks @posterzh. @KevinWassermann94 can you work with Wayne to confirm the diagnostics page is showing the correct public key for devices running the newest release?
@marvinmarnold @KevinWassermann94 The version of gateway_mfr_rs
can only be checked in the SSH.
Running /opt/python-dependencies/hm_pyhelper/gateway_mfr --version
in the diagnostics console should give gateway_mfr 0.2.1
as the response.
@posterzh Thanks Zhang, good work! This is working
Related to: https://github.com/NebraLtd/hm-pyhelper/pull/148 To align with upstream, we need to upate gateway-mfr-rs, some parts of the api has changed. We can make it generic like helium. For that we might have to introduce following:
This contains all the information that we might need for swarm key or any other purpose. eg. type, bus, address, key slot. we can keep the old ECC_STORAGE_BUS for sometime.
Acceptance Criterion