setDeviceMac static method
Implementation
static Future setDeviceMac(Device device) async {
final channel = await Channel.getOpenIoTHubChannel();
final stub = CommonDeviceManagerClient(channel);
final response = await stub.setDeviceMac(device);
print('Greeter client received: ${response}');
channel.shutdown();
//服务器同步
HostInfo hostInfo = HostInfo();
hostInfo.uUID = device.uuid;
hostInfo.mac = device.mac;
HostManager.SetDeviceMac(hostInfo);
}