Add a new ttnctl devices disable command that resets AppKey of OTAA devices.
Also adds a ttnctl devices disable-all variant.
The user can pass a --save-to-attribute <attribute-name> to save the original AppKey as an attribute on the device (if they want to). The original AppKey is printed on the command output in any case.
Notes
Device AppKey is changed to 00...001. It cannot be zero or empty, because the device will then be treated as an ABP device. Do we want that?
Some more ideas I played around with but left out for now:
Should we do something with ABP devices? E.g. reset AppSKey or something?
Summary
Needed for https://github.com/TheThingsNetwork/lorawan-stack/pull/2467
Changes
Add a new
ttnctl devices disable
command that resets AppKey of OTAA devices.Also adds a
ttnctl devices disable-all
variant.The user can pass a
--save-to-attribute <attribute-name>
to save the original AppKey as an attribute on the device (if they want to). The original AppKey is printed on the command output in any case.Notes
Some more ideas I played around with but left out for now: