lora设备添加演示发送心跳
This commit is contained in:
parent
a338a46654
commit
2446847ae9
10
tcpserver.go
10
tcpserver.go
|
@ -47,6 +47,16 @@ func handleConn(conn net.Conn) {
|
|||
stopChan <- true
|
||||
} else {
|
||||
log.Println("write msg success!", conn.RemoteAddr())
|
||||
|
||||
//暂时写死,演示用 lora心跳包给云端
|
||||
var device Device
|
||||
device.Lock()
|
||||
device.ID = "6F3A8B2D-B0DF-404A-AA7E-4A4086BD0B56"
|
||||
device.VERSION = "yunhorn_lora_l_v1"
|
||||
device.ONLINE = true
|
||||
device.DATA = make(map[string]interface{})
|
||||
device.DATA["data"] = 1
|
||||
go send_data(1005, device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue