Browse Source

modify bug

master
lihua 5 years ago
parent
commit
a8f2239c7a
  1. 14
      LoRaDTUConf.json
  2. 6
      LoRaDTUMock.go

14
LoRaDTUConf.json

@ -1,12 +1,12 @@
{ {
"otaa": false, "otaa": true,
"gatewayId": "0102030405060708", "gatewayId": "0102030405060708",
"devEui": "6ef1881ba5541419", "devEui": "b92fd5d497cfcdbd",
"devAddr": "0c18699", "devAddr": "014103a9",
"appKey": "", "appKey": "fe80c1f94e6cc62d5d6f72630b43c177",
"appSKey": "33998df974421457437d986eff739ffa", "appSKey": "0480e6cbb40dd741044aec83166407b3",
"nwkSKey": "33998df974421457437d986eff739ffa", "nwkSKey": "9aef4b57ea62cb2f7103c97c3d2a169e",
"fPort": 2, "fPort": 2,
"fCnt": 0, "fCnt": 19,
"freq": 470.3 "freq": 470.3
} }

6
LoRaDTUMock.go

@ -114,6 +114,7 @@ func main() {
Columns: []TableViewColumn{ Columns: []TableViewColumn{
{Title: "序号"}, {Title: "序号"},
{Title: "终端EUI"}, {Title: "终端EUI"},
{Title: "消息类型"},
{Title: "网关ID"}, {Title: "网关ID"},
{Title: "信号强度"}, {Title: "信号强度"},
{Title: "信噪比"}, {Title: "信噪比"},
@ -135,8 +136,9 @@ func main() {
Columns: []TableViewColumn{ Columns: []TableViewColumn{
{Title: "序号"}, {Title: "序号"},
{Title: "终端EUI"}, {Title: "终端EUI"},
{Title: "消息类型"},
{Title: "终端地址"},
{Title: "网关ID"}, {Title: "网关ID"},
{Title: "频率"},
{Title: "计数"}, {Title: "计数"},
{Title: "端口"}, {Title: "端口"},
{Title: "HEX数据"}, {Title: "HEX数据"},
@ -301,6 +303,7 @@ func (mw *DTUMainWindow) DTUConfig() {
devAddr.SetEnabled(false) devAddr.SetEnabled(false)
appSKey.SetEnabled(false) appSKey.SetEnabled(false)
nwkSKey.SetEnabled(false) nwkSKey.SetEnabled(false)
_ = devAddr.SetText("")
}else{ }else{
appKey.SetEnabled(false) appKey.SetEnabled(false)
devAddr.SetEnabled(true) devAddr.SetEnabled(true)
@ -677,6 +680,7 @@ func (mw *DTUMainWindow) HandleData(client paho.Client, message paho.Message){
dd := &model.DTUDown{ dd := &model.DTUDown{
Index: mw.downModel.Len() + 1, Index: mw.downModel.Len() + 1,
DevEUI: mw.dtuConf.DevEui, DevEUI: mw.dtuConf.DevEui,
MType: phy.MHDR.MType.String(),
DevAddr: mw.dtuConf.DevAddr, DevAddr: mw.dtuConf.DevAddr,
GatewayID: hex.EncodeToString(downlinkFrame.TxInfo.GatewayId), GatewayID: hex.EncodeToString(downlinkFrame.TxInfo.GatewayId),
Time:time.Now().Format("2006-01-02 15:04:05"), Time:time.Now().Format("2006-01-02 15:04:05"),

Loading…
Cancel
Save