cablelabs / lpwanserver

LPWAN Provisioning & Management Server
https://lpwanserver.com
Apache License 2.0
37 stars 11 forks source link

Device updates sent to LoRa dont have name/desc #247

Closed rhythnic closed 5 years ago

rhythnic commented 5 years ago

Updating the device name sends a PUT to LoRa without a name causing the original name to be overwritten.

PUT from UI to LPWAN Server /devices/3

id: 3, applicationId: 2,
name: "Lv2BobMouseTrapDevice2 - updated",
deviceModel: "Release 1",
applicationId: 2
description: "Lv2BobMouseTrapDevice2 description"
deviceModel: "Release 1"
networks: [1]

PUT from UI to LPWAN Server /deviceNetworkTypeLinks/:id

deviceProfileId: 2
id: 3
networkSettings: {devEUI: "0807060504030202", skipFCntCheck: false,…}
devEUI: "0807060504030202"
deviceActivation: {appSKey: "c575553e9cb92475047e2c1508183a9a", nwkSEncKey: "c9dd49045706f9b129a600fabd186cb3",…}
aFCntDown: 0
appSKey: "c575553e9cb92475047e2c1508183a9a"
devAddr: "468e61c1"
devEUI: "0807060504030202"
fCntUp: 0
fNwkSIntKey: "c9dd49045706f9b129a600fabd186cb3"
nwkSEncKey: "c9dd49045706f9b129a600fabd186cb3"
sNwkSIntKey: "c9dd49045706f9b129a600fabd186cb3"
skipFCntCheck: false

PUT from LPWAN Server to LoRa V2 /devices/:id

"device": {
  "applicationID":"2",
  "devEUI":"0807060504030202",
  "deviceProfileID":"9dd538e8-a231-4a35-8823-eecbffb9d4a9",
  "skipFCntCheck":false
},
"deviceActivation": {
  "appSKey":"c575553e9cb92475047e2c1508183a9a",
  "devAddr":"468e61c1",
  "aFCntDown":0,
  "fCntUp":0,
  "nwkSEncKey":"c9dd49045706f9b129a600fabd186cb3",
  "sNwkSIntKey":"c9dd49045706f9b129a600fabd186cb3",
  "fNwkSIntKey":"c9dd49045706f9b129a600fabd186cb3"
}