Increase retry to 200 is not compact key; Add regen key when not comp…#10
Increase retry to 200 is not compact key; Add regen key when not comp…#10flyerink wants to merge 2 commits intohelium:masterfrom
Conversation
| {true, _} -> ok; | ||
| false -> {error, not_compact} | ||
| false -> | ||
| case gen_compact_key(Pid, ?KEY_SLOT) of |
There was a problem hiding this comment.
This does not seem correct.. check_miner_key is not there to actually generate the private key. It's just there to validate that there is a public compact key in a slot. There is a separate command to generate the private key
There was a problem hiding this comment.
If check the key not compact, it will always fail when run test. We can't run provision again to re-gen the private key any more. So this code can fix it by re-gen private key.
There was a problem hiding this comment.
This is not the right assumption. Check_key_configuration should only check that the chip was already correctly configured. If it returns an error on is_compact it means it was not provisioned/configured correctly in a previous step
|
|
||
| gen_compact_key(Pid, Slot) -> | ||
| gen_compact_key(Pid, Slot, 100). | ||
| gen_compact_key(Pid, Slot, 200). |
There was a problem hiding this comment.
Why did you have to double the number of retries to 200? That seems like there's an issue with the part you are using if it needs this many retries to generate a private key
There was a problem hiding this comment.
As test by my customer, they find many failure chip, which can't pass the private key testing as not compact key. So we can increase to retry 200 times to gen a compact private key.
There was a problem hiding this comment.
This usually implies a hardware integration issue. We used to have the same problems on the original Helium hotspot and it turned out to be either a badly configured driver or i2c bus issues
|
Note that (1) this is sill making the wrong assumptions about what the code is supposed to be doing and (2) has been superseded by gateway-mfr-rs |
Increase retry to 200 is not compact key;
Add re-gen key when not compact key detected.