---
# System prepended metadata

title: IDAM WiFi Protocol
tags: [Acer]

---

---
tags: 'Acer'
---
IDAM WiFi Protocol
===
[TOC]

## WiFi /LTE 4G
### Upload Device Information
JSON structure
```
Header:  Key=> AuthToken  Value=> the token
{
    "AuthToken": "B7JZW6u6Mnl4efkc12ZjlYGbI1B4H28a",
    "[deviceUUID]": {
       "command": "updateDeviceInfo",
       "deviceInfo": {
           "devCnt":1,
           "varCnt":2,
           "dev0": {
               "devModbusID":1,
               "baudrate":9600,
               "modbusType":0,
               "devname":"New Device",
               "var0": {
                   "devIndex":0,
                   "type": 6,   // type: from 0 ~ 6
                   "addr": 0,
                   "name": "New Variable",
                   "max": 0,
                   "min": 0,
                   unit": "m/s",
                   "scale": 100
               }
               "var1": {
                   ...
               }
           }
       },
      "uplinkType": 3,   // uplinkType: from 0 ~ 4
      "name": "Acer Being Communication SB",
      "loraAppKey": "",
      "loraEDUI": ""
    }
}
```
Read data example
```
{
	"38ff464d4e363b28626445": {
		"command": "updateDeviceInfo",
		"deviceInfo": {
			"devCnt": 3,
			"varCnt": 5,
			"dev0": {
				"devModbusID": 1,
				"baudrate": 9600,
				"modbusType": 0,
				"devname": "New Device",
				"var0": {
					"devIndex": 0,
					"type": 6,
					"addr": 0,
					"name": "New Variable",
					"max": 0,
					"min": 0,
					"unit": "",
					"scale": 1
				}
			},
			"dev1": {
				"devModbusID": 1,
				"baudrate": 9600,
				"modbusType": 0,
				"devname": "New Device",
				"var1": {
					"devIndex": 1,
					"type": 6,
					"addr": 1,
					"name": "New Variable",
					"max": 0,
					"min": 0,
					"unit": "",
					"scale": 1
				},
				"var2": {
					"devIndex": 2,
					"type": 6,
					"addr": 2,
					"name": "New Variable",
					"max": 0,
					"min": 0,
					"unit": "",
					"scale": 1
				}
			},
			"dev2": {
				"devModbusID": 2,
				"baudrate": 9600,
				"modbusType": 0,
				"devname": "New Device",
				"var3": {
					"devIndex": 3,
					"type": 6,
					"addr": 3,
					"name": "New Variable",
					"max": 0,
					"min": 0,
					"unit": "",
					"scale": 1
				},
				"var4": {
					"devIndex": 4,
					"type": 6,
					"addr": 4,
					"name": "New Variable",
					"max": 0,
					"min": 0,
					"unit": "",
					"scale": 1
				}
			}
		},
		"uplinkType": 3,
		"name": "Acer Being Communication SB",
		"loraAppKey": "",
		"loraEDUI": ""
	}
}
```

Variable Type: from 0 to 6
* 0: INT8
* 1: UINT8
* 2: INT16
* 3: UINT16
* 4: INT32
* 5: UINT32
* 6: FLOAT32

Uplink Type: from 0 to 4
* 0: LORAWAN
* 1: LORA_P2P
* 2: LET4G
* 3: WIFI
* 4: NBIoT

### UPload Device Variables
JSON Structure
```
{
    "UUID": "xxxxxxxx" ,
    "vars": {
        "var0": xxx,
        "var1": xxx,
        ....
    }
}
```
Real data example
```
{
    "UUID": "38ff464d4e363b28626445" ,
    "vars": {
        "var0": 2.4,
        "var1": 5.2,
    }
}
```