文件external/libweave/src/privet/device_ui_kind.cc中定义了brillo设备类型,从modelManifestId的头两个字母判断当前设备类型:
- “AC”: accessPoint
- “AK”: aggregator
- “AM”: camera
- “AB”: developmentBoard
- “AH”: acHeating
- “AI”: light
- “AO”: lock
- “AK”: printer
- “AD”: speaker
- “AL”: storage
- “AJ”: toy
- “AA”: vendor
- “AN”: video
$ curl -H "Authorization: Privet anonymous" -k https://10.0.0.25/privet/info { "authentication": { "anonymousMaxScope": "none", "crypto": [ "p224_spake2" ], "mode": [ "anonymous", "pairing" ], "pairing": [ "embeddedCode" ] }, "basicModelManifest": { "modelName": "rpi", "oemName": "hzak", "uiDeviceKind": "vendor" }, "description": "brillo @ rpi", "endpoints": { "httpPort": 80, "httpUpdatesPort": 80, "httpsPort": 443, "httpsUpdatesPort": 443 }, "gcd": { "id": "", "status": "unconfigured" }, "id": "89FE15C9-19FB-4638-AEB8-B5946B595B99", "modelManifestId": "AAAAA", "name": "rpi", "services": [ "vendor" ], "uptime": 326, "version": "3.0", "wifi": { "capabilities": [ "2.4GHz" ], "hostedSsid": "rpi 48.AAAAACBprv", "ssid": "", "status": "connecting" } }
可以看到这台设备的modelManifestId为AAAAA, 头两个字母为AA, 所以它的UI kind为vendor, 即字段中的services为vendor。