[RN2483] Only alter set keys if either OTAA or ABP is set

This commit is contained in:
Gijs Noorlander
2020-04-19 16:55:42 +02:00
parent 1d3a22949d
commit e50a5956a7
@@ -1257,6 +1257,10 @@ bool rn2xx3_handler::check_set_keys()
rn2xx3_helper::isHexStr_of_length(_appskey, 32) &&
rn2xx3_helper::isHexStr_of_length(_devaddr, 8);
if (!otaa_set && !abp_set) {
return false;
}
if (_otaa && otaa_set) {
if (!abp_set) {
if (!rn2xx3_helper::isHexStr_of_length(_nwkskey, 32)) {