fixed lorawan keys and added more supported devices
This commit is contained in:
parent
208e26929c
commit
c9efda5d17
1 changed files with 6 additions and 2 deletions
|
@ -64,6 +64,7 @@ Serial: {{ global.selectedDevice.deviceSerial }}
|
|||
<v-text-field label="AppEUI" v-model="lora.AppEUI"></v-text-field>
|
||||
<v-text-field label="DevEUI" v-model="lora.DevEUI"></v-text-field>
|
||||
<v-text-field label="AppSKey" v-model="lora.AppSKey"></v-text-field>
|
||||
<v-text-field label="AppKey" v-model="lora.AppKey"></v-text-field>
|
||||
<v-text-field label="NwkSKey" v-model="lora.NwkSKey"></v-text-field>
|
||||
<v-text-field label="DevAddr" v-model="lora.DevAddr"></v-text-field>
|
||||
<v-btn @click="writeLoRaWAN()" >Write LoRaWAN</v-btn>
|
||||
|
@ -291,6 +292,7 @@ class TPLBirdy {
|
|||
break;
|
||||
case "BirdyWP-128BOS":
|
||||
case "BirdyWP-128r3BOS":
|
||||
case "BirdyWP-128r3":
|
||||
case "BirdyW":
|
||||
devInfo.type = 'BirdyWP_Atmega1281'
|
||||
devInfo.firstIDK = parts[0]
|
||||
|
@ -328,10 +330,11 @@ class TPLBirdy {
|
|||
async writeSerial(newSerial) {
|
||||
switch (this.deviceInfo.type) {
|
||||
case 'Slim':
|
||||
if (newSerial.length != 13) throw 'insufficient serial length'
|
||||
//if (newSerial.length != 13) throw 'insufficient serial length'
|
||||
await this.sendCMD([ 0x13, ].concat(newSerial.split('').map(x => x.charCodeAt())))
|
||||
console.log(this.responseToString(await this.wait4Response()))
|
||||
break
|
||||
case 'BirdyWP_Atmega1281':
|
||||
case 'BirdyWP-r3': //note to myself, needs a 0 in front of the serial 1234 -> 01234
|
||||
//if (newSerial.length != 13) throw 'insufficient serial length'
|
||||
await this.sendCMD([ 0x13, ].concat(`0${ newSerial }`.split('').map(x => x.charCodeAt())))
|
||||
|
@ -363,6 +366,7 @@ new Vue({
|
|||
lora: {
|
||||
AppEUI: '00 00 00 00 00 00 00 00',
|
||||
DevEUI: '00 00 00 00 00 00 00 00',
|
||||
AppKey: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00',
|
||||
AppSKey: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00',
|
||||
NwkSKey: '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00',
|
||||
DevAddr: '00 00 00 00',
|
||||
|
@ -416,7 +420,7 @@ new Vue({
|
|||
async writeLoRaWAN() {
|
||||
|
||||
loraProvCMD = [ 0x2B, 0x00, 0x44, 0x00 ].concat(
|
||||
parseHexString(this.lora.AppSKey.replaceAll(' ', '')),
|
||||
parseHexString(this.lora.AppKey.replaceAll(' ', '')),
|
||||
parseHexString(this.lora.AppEUI.replaceAll(' ', '')),
|
||||
parseHexString(this.lora.DevEUI.replaceAll(' ', '')),
|
||||
parseHexString(this.lora.AppSKey.replaceAll(' ', '')),
|
||||
|
|
Loading…
Add table
Reference in a new issue