Why does AppKey get filled with zeros when setting it via gRPC?

Hello everyone,

I’m trying to set the AppKey of a device using gRPC, but after making the request, when I retrieve the device information, the AppKey field is filled with zeros (00000000000000000000000000000000). There is no error response, only {} as the output.

gRPC request (CreateKeys)

This is the request I’m sending:

grpcurl -H "Authorization: Bearer $(cat .token)" \
    -d '{
        "deviceKeys": {
            "devEui": "string",
            "nwkKey": "string",
            "appKey": "string"
            }
        }' \
    -plaintext \
    example.com:8080 \
    api.DeviceService/CreateKeys

Are you putting it into the nwkKey slot? For devices before LoRaWAN version 1.1, the nwkKey variable is used for the appKey (annoying I know).

1 Like

Thanks so much for your help! You were right, I had a LoRaWAN 1.0.3 device. Putting the AppKey into the nwkKey slot as you suggested did the trick. I appreciate the tip!

1 Like