From 93f13e7b2e046c6d86d10e7abc2ecaa4c4adabc3 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 21 十二月 2021 11:47:38 +0800 Subject: [PATCH] 完善tcp --- HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | 21 ++++++++++++++++++++- 1 files changed, 20 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..0c7d606 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,24 @@ 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("192.168.88.100"); + infoBean.setGateway_type("music.standard"); + infoBean.setHw_version("HW2.0"); + infoBean.setFw_version("Fw1.0"); + infoBean.setOID("010105000000FE08"); + infoBean.setSid("010105000000FE08110100000000"); + HDLLinkConfig.getInstance().setDeviceInfoBean(infoBean); + } + /** * 鍏ョ綉璁よ瘉 */ -- Gitblit v1.8.0