Optional values in POST /api/devices/{device_activation.dev_eui}/activate

Hello,

I use the LoRa App Server REST API. All json values in the body for the /api/devices/{device_activation.dev_eui}/activate request are define optional. But when using the request it shows, that all string values are necessary.

Regards

2 Likes

I believe this is because the REST API is generated using the Protobuf API definition. Technically all fields are optional (in Protobuf), as they will fallback to the empty value of each field type (e.g. empty string, 0 for integer types, false for bools, ā€¦).

1 Like

Hi all,

Iā€™m trying to activate ABP 1.0.2 devices through API but I find that only LoraWan 1.1 can be activate as it requires 1.1 session keys:

  • fNwkSIntKey
  • nwkSEncKey
  • sNwkSIntKey

Is there anyway to acivate 1.0.x devices thorugh the API using only nwkSKey? and of course DeviceAddress and appSKey.

Regards.

You can activate both LoRaWAN 1.0.x and LoRaWAN 1.1.x devices with it. I believe you could just set all the fields to the NwkSKey. Else take a look at the web-interface implementation, it uses the same API :wink: