|
@@ -9,6 +9,7 @@ var (
|
|
|
testURL = flag.String("url", "http://192.168.0.160:8088", "login url")
|
|
|
testProductKey = flag.String("productkey", "958daf8b3a533f0d9516ac8fd17ef0cb06b439e664787a2a89608a10eeee8eb3c35c82c505d19f8a4417e530de0678fd", "product key")
|
|
|
testProtocol = flag.String("protocol", "mqtt", "access protocol")
|
|
|
+ testDeviceCode = flag.String("dvc", "", "device code")
|
|
|
)
|
|
|
|
|
|
func main() {
|
|
@@ -18,7 +19,7 @@ func main() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- dev := NewDevice(*testURL, *testProductKey, "5566", "1.2.5", *testProtocol)
|
|
|
+ dev := NewDevice(*testURL, *testProductKey, *testDeviceCode, "1.2.3", *testProtocol)
|
|
|
|
|
|
err := dev.DoRegister()
|
|
|
if err != nil {
|