From 8b66be08179b026cb0e601733dacd43de97e5b01 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 21 十二月 2021 10:20:34 +0800 Subject: [PATCH] 完善下网关上网重连功能及广播设备基本数据 --- HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java index 2033551..2533b47 100644 --- a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java +++ b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java @@ -82,7 +82,7 @@ rv.setLayoutManager(new LinearLayoutManager(this)); checkIfCertified(); - + initDeviceInfo(); registerAllTopicsListener(); ActivityResultLauncher<String[]> launcher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback<Map<String, Boolean>>() { @@ -202,6 +202,7 @@ @Override public void onMessage(Object msg) { LinkResponse response = (LinkResponse) msg; + handleLinkResponse(response); } }; HDLLink.getInstance().registerAllTopicsListener(allTopicsListener); @@ -250,6 +251,23 @@ HDLLink.getInstance().removeAllTopicsListener(allTopicsListener); } + void initDeviceInfo() + { + AuthenticateRequest.AuthenticateDeviceInfoBean infoBean = new AuthenticateRequest.AuthenticateDeviceInfoBean(); + infoBean.setDeviceMAC("123456789"); + infoBean.setIPMAC("12345678900"); + infoBean.setDeviceName("闊充箰鎾斁鍣�");//璁惧鍚嶅瓧 + infoBean.setDeviceModel("MCLog.431");//璁惧鍨嬪彿 + infoBean.setAccessMode("WIFI"); + infoBean.setIPGateway("192.168.88.1"); + infoBean.setIPAddress(IpUtils.getIP(this)); + infoBean.setHw_version("HW2.0"); + infoBean.setFw_version("Fw1.0"); + infoBean.setOID("010105000000FE08"); + infoBean.setSid("010105000000FE08110100000000"); + HDLLinkConfig.getInstance().setDeviceInfoBean(infoBean); + } + /** * 鍏ョ綉璁よ瘉 */ -- Gitblit v1.8.0