基于WiFi MQTT协议的智慧路灯案例,不能激活设备

Viewed 75

技术支持提问请严格按照以下格式提供对应信息,否则会影响回复时效,一定要描述清楚,以免一次回复无法解决问题

(提问前请先自查自己是否很仔细看过教程了,教程中的每句话都很重要,教程都是经过验证的,不会有问题的)

一、描述你遇到的问题

小熊派标准板运行oc_wifi_mqtt_light 案例无法激活设备,用MQTT.fxK可以激活,另外wifi也连接上了,发现运行demo产生连接用的ClientId,Password与平台注册设备产生的发现运行demo产生连接用的ClientId,Password不一样。

二、你具体做的所有步骤结果截图


图1:MQTT连接参数

图2:io_config.h中的配置

图3:串口显示的ClientId,Password

图1与图2的ClientId,Password不一致

三、当前开发板状态全景照片

请插入图片

四、开发板串口所有日志

][46846][task_sensor_entry] SENSOR:lum:37.50
[DEBUG][52048][task_sensor_entry] SENSOR:lum:37.50
[DEBUG][57250][task_sensor_entry] SE[DEBUG][62452][task_sensor_entry] SENSOR:lum:36.67
[DEBUG][1][link_main] linkmain:V2.2.2 AT 22:17:06 ON Oct 19 2024
[DEBUG][7][link_tcpip_imp_init] ESP8266 CONFIGURE:SSID:Lite PWD:xr030217 RCVCACHE:1024(Byte) CMDTIMEOUT:2000(ms)
[DEBUG][17][link_tcpip_imp_init] Try to connect ap..
WELCOME TO IOT_LINK SHELL

LiteOS:/>ATRCV:4 bytes:ph恂
ATRCV:203 bytes:屸?俷鞉r傭n|?宭巔rlb? 瀨r?l渘?俷ogy Co. Ltd.

ready

ATRCV:17 bytes:WIFI DISCONNECT

ATSND:8 bytes:AT+RST

ATRCV:14 bytes:AT+RST

OK

ATRCV:51 bytes:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)

ATRCV:37 bytes:load 0x40100000, len 2592, room 16

ATRCV:56 bytes:tail 0
chksum 0xf3
load 0x3ffe8000, len 764, room 8

ATRCV:56 bytes:tail 4
chksum 0x92
load 0x3ffe82fc, len 676, room 4

ATRCV:173 bytes:tail 0
chksum 0x22
csum 0x22

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : DOUT
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

ATRCV:10 bytes:渂l`r騨l
ATRCV:4 bytes:ph恂
ATRCV:203 bytes:屸?俷鞉r傭n|?宭巔rlb? 瀨r?l渘?俷
Ai-Thinker Technology Co. Ltd.

ready

ATSND:6 bytes:ATE0

ATRCV:12 bytes:ATE0

OK

ATSND:15 bytes:AT+CIPDINFO=0

ATRCV:6 bytes:
OK

ATSND:17 bytes:AT+CWMODE_CUR=1

ATRCV:6 bytes:
OK

ATSND:13 bytes:AT+CIPMUX=1

ATRCV:6 bytes:
OK

ATSND:32 bytes:AT+CWJAP_CUR="Lite","*******"

ATRCV:17 bytes:WIFI DISCONNECT

ATRCV:16 bytes:WIFI CONNECTED

ATRCV:13 bytes:WIFI GOT IP

ATRCV:6 bytes:
OK

[DEBUG][10116][link_tcpip_init] IOT_LINK:DO TCPIP LOAD-IMPLEMENT RET:0
[DEBUG][10123][dtls_al_init] IOT_LINK:DO DTLS LOAD-IMPLEMENT RET:0
[DEBUG][10129][mqtt_al_init] IOT_LINK:DO MQTT LOAD-IMPLEMENT RET:0
[DEBUG][10135][oc_mqtt_init] IOT_LINK:DO OC MQTT LOAD-IMPLEMENT RET:0
[DEBUG][10142][standard_app_demo_main] This Is MQTT V5 DEMOS:HC Display
[DEBUG][10453][task_sensor_entry] SENSOR:lum:34.17
[DEBUG][10458][hub_step] hub_step:enter
[DEBUG][10463][dmp_connect] oc_mqtt_connect:server:117.78.5.125 port:1883
[DEBUG][10469][dmp_connect] oc_mqtt_connect:client_id:671203bb65629b340098a359_BearPi_0_0_1970000100
[DEBUG][10478][dmp_connect] oc_mqtt_connect:user:671203bb65629b340098a359_BearPi passwd:1bdcfab7390f71a390981a969150081e3a36146b32269acc7d687e07812e443a
[DEBUG][15655][task_sensor_entry] SENSOR:lum:34.17
[DEBUG][16796][dmp_connect] oc_mqtt_connect:recode:6 :FAILED
[DEBUG][16801][hub_step] hub_step:err:6
[DEBUG][20857][task_sensor_entry] SENSOR:lum:33.33
[DEBUG][26059][task_sensor_entry] SENSOR:lum:33.33
[DEBUG][31261][task_sensor_entry] SENSOR:lum:32.50
[DEBUG][36463][task_sensor_entry] SENSOR:lum:32.50
[DEBUG][41665][task_sensor_entry] SENSOR:lum:32.50
[DEBUG][46867][task_sensor_entry] SENSOR:lum:31.67
[DEBUG][52069][task_sensor_entry] SENSOR:lum:35.83
[DEBUG][57271][task_sensor_entry] SENSOR:lum:31.67
[DEBUG][62473][task_sensor_entry] SENSOR:lum:30.83
[DEBUG][67675][task_sensor_entry] SENSOR:lum:30.83

1 Answers

日志里面的passwd是hash加密过的,你这个应该是平台IP不一样导致的,如果你用的还是基础版平台的话,请切换为标准版

我用的是标准版