lora设备添加演示发送心跳

This commit is contained in:
fish 2019-03-23 17:24:39 +08:00
parent a338a46654
commit 2446847ae9
1 changed files with 10 additions and 0 deletions

View File

@ -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)
}
}
}