Browse Source

增加appeui

master
lihua 5 years ago
parent
commit
6919e249a0
  1. 8
      LoRaMoteConf.json
  2. 6
      LoRaMoteMock.go

8
LoRaMoteConf.json

@ -1,16 +1,16 @@
{ {
"current": "mote2", "current": "mote1",
"configs": { "configs": {
"mote1": { "mote1": {
"otaa": true, "otaa": true,
"gatewayId": "0102030405060708", "gatewayId": "0102030405060708",
"appEui": "", "appEui": "0102030405060708",
"devEui": "b92fd5d497cfcdbd", "devEui": "b92fd5d497cfcdbd",
"devAddr": "00530747", "devAddr": "00530747",
"appKey": "fe80c1f94e6cc62d5d6f72630b43c177", "appKey": "fe80c1f94e6cc62d5d6f72630b43c177",
"nwkSKey": "4f862983a453cc50336284fd3c62aba5", "nwkSKey": "4f862983a453cc50336284fd3c62aba5",
"appSKey": "2bc9217655160b2c1229b5ecb469242f", "appSKey": "2bc9217655160b2c1229b5ecb469242f",
"fCnt": 511, "fCnt": 513,
"fPort": 1, "fPort": 1,
"freq": 470.3, "freq": 470.3,
"dr": 0, "dr": 0,
@ -29,7 +29,7 @@
"mote2": { "mote2": {
"otaa": false, "otaa": false,
"gatewayId": "0102030405060708", "gatewayId": "0102030405060708",
"appEui": "", "appEui": "0102030405060708",
"devEui": "6ef1881ba5541419", "devEui": "6ef1881ba5541419",
"devAddr": "00c18699", "devAddr": "00c18699",
"appKey": "", "appKey": "",

6
LoRaMoteMock.go

@ -262,7 +262,7 @@ func (mw *MoteMainWindow) MoteConfig() {
var dlg *walk.Dialog var dlg *walk.Dialog
var name *walk.ComboBox var name *walk.ComboBox
var otaa *walk.CheckBox var otaa *walk.CheckBox
var gatewayId,devEUI,devAddr,appKey,appSKey,nwkSKey *walk.LineEdit var gatewayId,appEUI,devEUI,devAddr,appKey,appSKey,nwkSKey *walk.LineEdit
var fCnt *walk.NumberEdit var fCnt *walk.NumberEdit
var acceptPB, cancelPB *walk.PushButton var acceptPB, cancelPB *walk.PushButton
_ = Dialog{ _ = Dialog{
@ -308,6 +308,8 @@ func (mw *MoteMainWindow) MoteConfig() {
}}, }},
Label{Text:"网关ID:"}, Label{Text:"网关ID:"},
LineEdit{AssignTo:&gatewayId}, LineEdit{AssignTo:&gatewayId},
Label{Text:"应用EUI:"},
LineEdit{AssignTo:&appEUI,Text:"0102030405060708"},
Label{Text:"终端EUI:"}, Label{Text:"终端EUI:"},
LineEdit{AssignTo:&devEUI}, LineEdit{AssignTo:&devEUI},
Label{Text:"终端地址:"}, Label{Text:"终端地址:"},
@ -332,6 +334,7 @@ func (mw *MoteMainWindow) MoteConfig() {
OnClicked: func() { OnClicked: func() {
mw.currentMoteConf.OTAA = otaa.Checked() mw.currentMoteConf.OTAA = otaa.Checked()
mw.currentMoteConf.GatewayId = gatewayId.Text() mw.currentMoteConf.GatewayId = gatewayId.Text()
mw.currentMoteConf.AppEui = appEUI.Text()
mw.currentMoteConf.DevEui = devEUI.Text() mw.currentMoteConf.DevEui = devEUI.Text()
mw.currentMoteConf.DevAddr = devAddr.Text() mw.currentMoteConf.DevAddr = devAddr.Text()
mw.currentMoteConf.AppKey = appKey.Text() mw.currentMoteConf.AppKey = appKey.Text()
@ -365,6 +368,7 @@ func (mw *MoteMainWindow) MoteConfig() {
_ = name.SetText(mw.motesConf.Current) _ = name.SetText(mw.motesConf.Current)
otaa.SetChecked(mw.currentMoteConf.OTAA) otaa.SetChecked(mw.currentMoteConf.OTAA)
_ = gatewayId.SetText(mw.currentMoteConf.GatewayId) _ = gatewayId.SetText(mw.currentMoteConf.GatewayId)
_ = appEUI.SetText(mw.currentMoteConf.AppEui)
_ = devEUI.SetText(mw.currentMoteConf.DevEui) _ = devEUI.SetText(mw.currentMoteConf.DevEui)
_ = devAddr.SetText(mw.currentMoteConf.DevAddr) _ = devAddr.SetText(mw.currentMoteConf.DevAddr)
_ = appKey.SetText(mw.currentMoteConf.AppKey) _ = appKey.SetText(mw.currentMoteConf.AppKey)

Loading…
Cancel
Save