| | |
| | | import com.hdl.photovoltaic.ui.bean.OidBean; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.uni.HDLUniMPSDKManager; |
| | | import com.hdl.photovoltaic.utils.AppManagerUtils; |
| | | import com.hdl.photovoltaic.utils.NetworkUtils; |
| | | import com.hdl.photovoltaic.utils.NetworkUtils123; |
| | | import com.hdl.photovoltaic.utils.WifiUtils; |
| | | import com.hdl.sdk.link.common.exception.HDLLinkCode; |
| | | import com.hdl.sdk.link.common.exception.HDLLinkException; |
| | |
| | | break; |
| | | } |
| | | } |
| | | HdlLogLogic.print("uni发来的数据--->大类-->" + topic + "\r\n" + data, true); |
| | | HdlLogLogic.print("uni发来的数据--->大类--->" + topic + "\r\n" + data, true); |
| | | } catch (Exception e) { |
| | | HdlLogLogic.print("uni发来的数据--->" + e.getMessage(), true); |
| | | } |
| | |
| | | String version = getKeyValue("version", getKeyValue("data", data));//固件版本 |
| | | String hardwareModel = getKeyValue("hardwareModel", getKeyValue("data", data));//云端上文件MD5 |
| | | String imageId = getKeyValue("imageId", getKeyValue("data", data));//固件镜像id |
| | | String module = "FW#" + imageId; |
| | | String module = "FW#" + imageId;//模块信息(HW:硬件) |
| | | |
| | | //升级本地优先->云端升级 |
| | | HdlDeviceLogic.getInstance().isLocalConnect(deviceMac, new CloudCallBeak<Boolean>() { |
| | |
| | | } |
| | | String md5 = HDLMD5Utils.encodeMD5(data);//网关固件需要 |
| | | //升级固件文件地址 |
| | | String upgradeFileLocalPathUrl = "http://" + NetworkUtils.getInstance().getIPAddress(HDLApp.getInstance()) + ":" + MyNanoHttpServer.HTTP_PORT + firmwarePathFileName; |
| | | String upgradeFileLocalPathUrl = "http://" + NetworkUtils123.getInstance().getIPAddress(HDLApp.getInstance()) + ":" + MyNanoHttpServer.HTTP_PORT + firmwarePathFileName; |
| | | //通知给网关升级固件文件地址等信息 |
| | | HdlOtaLogic.getInstance().pushUpgradePacketInfo(deviceMac, oid, module, version, data.length + "", upgradeFileLocalPathUrl, md5, new LinkCallBack<String>() { |
| | | @Override |
| | |
| | | } |
| | | String md5 = HDLMD5Utils.encodeMD5(data);//网关驱动需要 |
| | | //升级驱动文件地址 |
| | | String upgradeFileLocalPathUrl = "http://" + NetworkUtils.getInstance().getIPAddress(HDLApp.getInstance()) + ":" + MyNanoHttpServer.HTTP_PORT + drivePathFileName; |
| | | String upgradeFileLocalPathUrl = "http://" + NetworkUtils123.getInstance().getIPAddress(HDLApp.getInstance()) + ":" + MyNanoHttpServer.HTTP_PORT + drivePathFileName; |
| | | //通知给网关升级驱动文件地址等信息 |
| | | HdlOtaLogic.getInstance().pushUpgradePacketInfo(deviceMac, deviceOid, module, version, data.length + "", upgradeFileLocalPathUrl, md5, new LinkCallBack<String>() { |
| | | @Override |