Closed keeramis closed 1 year ago
It's worth noting an interesting observation related to 'particle keys.' We create a key of 121 bytes. However, when we save this key, we save 192 bytes. Will it be beneficial to consider optimizing this process to save only the original 121 bytes, or alternatively, to provide documentation explaining this behavior.
Description
This PR removes the last uses of
dfu-util
to useparticle usb dfu
for improved compatibility.Other improvements:
async/await
syntax, improving code readability and maintainability.particle keys protocol
commandsHow to Test
This PR requires that the latest
particle usb
upload functionality exists which currently is in this PR. Checkout theparticle-usb
repo locally and link your locally checked outparticle-cli
to use locally checked outparticle-usb
Checkout this branch locally and follow the instructions in the README (run
nvm use
followed bynpm install
)Checkout this branch of
particle-usb
locally.particle-usb
root directory. Runnpm link
. Ensure it is linked as expectedparticle-cli
root directory. Runnpm link particle-usb
particle-cli/node_modules
that theparticle-usb
points to your local repoRun any
particle keys xxx
commands andparticle doctor
command on your device(s) and verify that they are working as expected.For example, To run
particle keys xxx
, runnpm start -- keys xxx
from project's root directoryBonus points if you are able to verify that the keys are generated as expected!
Related Issues / Discussions
Particle-USB PR that is needed for this PR to work: https://github.com/particle-iot/particle-usb/pull/91
Completeness