stm32+freeRTOS+esp8266+mqtt连接阿里云时,握手失败,串口打印 Performing the SSL/TLS handshake... [inf] _TLSConnectNetwork(353): failed ! mbedtls_ssl_handshake returned -0x4290
通过调整工程的heap和stack,解决了上述问题 但是又遇到了新的问题 设备端接收不到iot平台的数据,接收超时,导致连接又断开了,串口数据如下: packet-id=5, publish topic msg={ "method":"thing.event.property.post", "id":"123","params":{"temperature":0.00,"temperatureThreshold": 0},"version":"1.0.0"} ********publish success, packet-id=1 ********
********publish success, packet-id=2 ********
********publish success, packet-id=3 ********
***********topic subscribe success
接收超时mbedtls_net_recv_timeout 170: net_recv_timeout: receive data fail - 1 [inf] _network_ssl_read(442): ssl recv error: code = -76 [1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-14 [0m[1;31m[err] iotx_mc_keepalive(2598): network is disconnected! [0mMQTT disconnect.mbedtls_net_send 127: net_send: send data fail - 1 [inf] _network_ssl_disconnect(515): ssl_disconnect [1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] IOT_MQTT_Yield(3215): error occur rc=-27 [0m[1;33m[inf] iotx_mc_handle_reconnect(2767): Waiting to reconnect... [0m[1;31m[err] iotx_mc_publish(2061): mqtt client state is error,state = 4 [0merror occur when publish sensor dataPush the User button (Blue) within the next 5 seconds if you want to update the device security parameters or credentials.
[1;33m[inf] guider_print_dev_guider_info(320): .................................................... [0m[1;33m[inf] guider_print_dev_guider_info(321): ProductKey : a1xmvaHbJQg [0m[1;33m[inf] guider_print_dev_guider_info(322): DeviceName : smartDevice01 [0m[1;33m[inf] guider_print_dev_guider_info(323): DeviceID : a1xmvaHbJQg.smartDevice01 [0m[1;33m[inf] guider_print_dev_guider_info(327): .................................................... [0m[1;33m[inf] guider_print_dev_guider_info(328): PartnerID Buf : ,partner_id=example.demo.partner-id [0m[1;33m[inf] guider_print_dev_guider_info(329): ModuleID Buf : ,module_id=example.demo.module-id [0m[1;33m[inf] guider_print_dev_guider_info(330): Guider URL : [0m[1;33m[inf] guider_print_dev_guider_info(332): Guider SecMode : 2 (TLS + Direct) [0m[1;33m[inf] guider_print_dev_guider_info(334): Guider Timestamp : 2524608000000 [0m[1;33m[inf] guider_print_dev_guider_info(338): .................................................... [0m[1;33m[inf] guider_print_conn_info(297): ----------------------------------------- [0m[1;33m[inf] guider_print_conn_info(298): Host : a1xmvaHbJQg.iot-as-mqtt.cn-shanghai.aliyuncs.com [0m[1;33m[inf] guider_print_conn_info(299): Port : 1883 [0m[1;33m[inf] guider_print_conn_info(304): ClientID : a1xmvaHbJQg.smartDevice01|securemode=2,timestamp=2524608000000,signmethod=hmacsha1,gw=0,ext=0,partner_id=example.demo.partner-id,module_id=example.demo.module-id| [0m[1;33m[inf] guider_print_conn_info(306): TLS PubKey : 801f3f0 ('-----BEGIN CERTI ...') [0m[1;33m[inf] guider_print_conn_info(309): ----------------------------------------- [0m[inf] HAL_SSL_Destroy(543): handle is NULL [1;33m[inf] iotx_mc_disconnect(2845): mqtt disconnect! [0m[1;33m[inf] iotx_mc_release(2938): mqtt release! [0m[1;33m[inf] iotx_mc_init(2336): MQTT init success! [0m[inf] _ssl_client_init(196): Loading the CA root certificate ... cert. version : 3 serial number : 04:00:00:00:00:01:15:4B:5A:C3:94 issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA issued on : 1998-09-01 12:00:00 expires on : 2028-01-28 12:00:00 signed using : RSA with SHA1 RSA key size : 2048 bits basic constraints : CA=true key usage : Key Cert Sign, CRL Sign [inf] _ssl_parse_crt(164): crt content:451 [inf] _ssl_client_init(204): ok (0 skipped) [inf] _TLSConnectNetwork(286): Connecting to /H嗺 /1883... mbedtls_net_connect 90: net_connect: open client fail - 1 [inf] _TLSConnectNetwork(295): failed ! net_connect returned -0x0044 [inf] _network_ssl_disconnect(515): ssl_disconnect [inf] HAL_SSL_Destroy(543): handle is NULL [1;31m[err] iotx_mc_connect(2692): TCP or TLS Connection failed [0m[inf] HAL_SSL_Destroy(543): handle is NULL [1;33m[inf] iotx_mc_disconnect(2845): mqtt disconnect! [0m[1;33m[inf] iotx_mc_release(2938): mqtt release! [0mMQTT construct failed mqtt example loop end!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。