通信模組完成AT模組驅動框架的適配后,需進行測試。以Linux環境下的L610模組設備為例,本文介紹該類型的設備,通過C Link SDK接入物聯網平臺的測試步驟。
背景信息
操作步驟
運行結果
- Demo運行后,您可以在設備端查看日志。
- 模組初始化:
[1632295441050][3] >>>> AT [1632295441176][6] <<<< OK …… …… [1632295442753][13] >>>> AT+MIPCALL=1 [1632295442888][34] <<<< OK +MIPCALL: 10.117.***.*** [1632295442893][20] >>>> AT+GTSET="IPRFMT",2 [1632295443020][6] <<<< OK
- 建立連接:
[1632295443.022][LK-0313] MQTT user calls aiot_mqtt_connect api, connect [1632295443.022][LK-0317] LightSwitch&a1wP****** [1632295443.022][LK-0318] 439AE51F4AC6B8805F8697B575E97FA0CCC9A5F103B6EBE713A9562236AD0AD0 [1632295443025][71] >>>> AT+MIPOPEN=1,,"a1wP******.iot-as-mqtt.cn-shanghai.aliyuncs.com",443,0 [1632295443156][6] <<<< OK [1632295443456][17] <<<< +MIPOPEN: 1,1 [1632295443461][17] >>>> AT+MIPSEND=1,244 [1632295443588][5] <<<< > [1632295443592][244] >>>> ? [1632295443720][51] <<<< OK +MIPPUSH: 1,0 +MIPSEND: 1,0,2048 OK [1632295443880][22] <<<< +MIPRTCP: 1,4, id 0, len 4, res 14 [1632295443.888][LK-0313] MQTT connect success in 858 ms AIOT_MQTTEVT_CONNECT
- 數據上報:
[1632295443.888][LK-0309] pub: /sys/a18wP******/LightSwitch/thing/event/property/post [LK-030A] > 7B 22 69 64 22 3A 22 31 22 2C 22 76 65 72 73 69 | {"id":"1","versi [LK-030A] > 6F 6E 22 3A 22 31 2E 30 22 2C 22 70 61 72 61 6D | on":"1.0","param [LK-030A] > 73 22 3A 7B 22 4C 69 67 68 74 53 77 69 74 63 68 | s":{"LightSwitch [LK-030A] > 22 3A 30 7D 7D | ":0}} [1632295443884][17] >>>> AT+MIPSEND=1,118 [1632295444008][5] <<<< > [1632295444009][118] >>>> 0t [1632295444128][51] <<<< OK +MIPPUSH: 1,0 +MIPSEND: 1,0,2048 OK [1632295444128][15] >>>> AT+MIPSEND=1,2 [1632295444252][5] <<<< > [1632295444254][2] >>>> [1632295444440][267] <<<< OK +MIPPUSH: 1,0 +MIPSEND: 1,0,2048 OK
- 數據接收:
+MIPRTCP: 1,176,0 id 0, len 176, res 16 [1632295444.444][LK-0309] pub: /sys/a18wP******/LightSwitch/thing/event/property/post_reply [LK-030A] < 7B 22 63 6F 64 65 22 3A 32 30 30 2C 22 64 61 74 | {"code":200,"dat [LK-030A] < 61 22 3A 7B 7D 2C 22 69 64 22 3A 22 31 22 2C 22 | a":{},"id":"1"," [LK-030A] < 6D 65 73 73 61 67 65 22 3A 22 73 75 63 63 65 73 | message":"succes [LK-030A] < 73 22 2C 22 6D 65 74 68 6F 64 22 3A 22 74 68 69 | s","method":"thi [LK-030A] < 6E 67 2E 65 76 65 6E 74 2E 70 72 6F 70 65 72 74 | ng.event.propert [LK-030A] < 79 2E 70 6F 73 74 22 2C 22 76 65 72 73 69 6F 6E | y.post","version [LK-030A] < 22 3A 22 31 2E 30 22 7D | ":"1.0"} pub, qos: 0, topic: /sys/a18wP******/LightSwitch/thing/event/property/post_reply pub, payload: {"code":200,"data":{},"id":"1","message":"success","method":"thing.event.property.post","version":"1.0"}
- 模組初始化:
- 您也可以在物聯網平臺查看日志,具體操作,請參見云端運行日志。