完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
请教各位大神,我之前把ESP8266连接到MQTT服务器,开始SSL认证是成功的,现在我需要把ESP8266 连接到Bluemix云端,还是按照之前的方式,把Bluemix生成的.PEM文件转成.DER文件,再将.DER文件重命名为.cer文件,使用make_cacert.py生成esp_ca_cert.bin文件,将bin文件烧录到0x77的位置上。但是一直认证不成功,log如下。Bluemix的SSL认证要求SSL版本是TSL1.2,不知道是不是版本的问题。
[08:53:07.727] DNS: found ip 159.122.121.82 [08:53:07.727] TCP: connecting... [08:53:07.732] TLS_ca_x509.cer 3fb [08:53:07.957] client handshake start. [08:53:08.178] distinguished names: [DigiCert SHA2 Secure Server CA], [*.messaging.internetofthings.ibmcloud.com] [08:53:08.208] before 1411344000, tv_sec 1508403192, after 1511913600 [08:53:08.216] distinguished names: [DigiCert SHA2 Secure Server CA], [DigiCert SHA2 Secure Server CA] [08:53:08.227] distinguished names: [DigiCert Inc], [DigiCert Inc] [08:53:08.227] distinguished names: [], [] [08:53:08.227] check the signature ok [08:53:08.298] distinguished names: [DigiCert Global Root CA], [DigiCert SHA2 Secure Server CA] [08:53:08.307] before 1362700800, tv_sec 1508403192, after 1678233600 [08:53:08.318] look for a trusted cert [08:53:08.318] distinguished names: [DigiCert Global Root CA], [192.168.200.129] [08:53:08.318] client handshake failed [08:53:08.318] Error: No trusted cert is available [08:53:08.327] TCP: Reconnect to izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:53:08.327] [08:53:13.119] pm open,type:2 0 [08:53:13.119] Free memory [08:53:13.538] TCP: Connect to domain izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:53:13.549] TCP: Reconnect to: izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:53:13.549] DNS: found ip 159.122.121.82 [08:53:13.549] TCP: connecting... [08:53:13.552] TLS_ca_x509.cer 3fb [08:53:13.756] client handshake start. [08:53:13.974] [08:54:14.858] TCP: Reconnect to izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:54:14.858] [08:54:20.539] Free memory [08:54:20.539] TCP: Connect to domain izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:54:20.548] TCP: Reconnect to: izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:54:20.554] DNS: found ip 159.122.121.82 [08:54:20.554] TCP: connecting... [08:54:20.554] TLS_ca_x509.cer 3fb [08:54:20.852] client handshake start. [08:54:21.166] [08:55:21.529] TCP: Reconnect to izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:55:21.529] [08:55:26.539] Free memory [08:55:26.539] TCP: Connect to domain izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:55:26.547] TCP: Reconnect to: izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:55:26.554] DNS: found ip 159.122.121.82 [08:55:26.554] TCP: connecting... [08:55:26.554] TLS_ca_x509.cer 3fb [08:55:26.901] client handshake start. [08:55:27.209] distinguished names: [DigiCert SHA2 Secure Server CA], [*.messaging.internetofthings.ibmcloud.com] [08:55:27.239] before 1411344000, tv_sec 1508403331, after 1511913600 [08:55:27.239] distinguished names: [DigiCert SHA2 Secure Server CA], [DigiCert SHA2 Secure Server CA] [08:55:27.247] distinguished names: [DigiCert Inc], [DigiCert Inc] [08:55:27.253] distinguished names: [], [] [08:55:27.253] check the signature ok [08:55:27.329] distinguished names: [DigiCert Global Root CA], [DigiCert SHA2 Secure Server CA] [08:55:27.329] before 1362700800, tv_sec 1508403331, after 1678233600 [08:55:27.338] look for a trusted cert [08:55:27.338] distinguished names: [DigiCert Global Root CA], [192.168.200.129] [08:55:27.349] client handshake failed [08:55:27.349] Error: No trusted cert is available [08:55:27.349] TCP: Reconnect to izug7d.messaging.internetofthings.ibmcloud.com:8883 [08:55:27.355] |
|
相关推荐
1个回答
|
|
根据您提供的信息,您已经成功地将ESP8266连接到MQTT服务器并进行了SSL认证。现在,您需要将ESP8266连接到IBM的Bluemix云端,但遇到了SSL认证失败的问题。以下是一些建议和可能的原因:
1. **证书版本**:您提到Bluemix的SSL认证要求是TLS 1.2。请确保您的ESP8266使用的是支持TLS 1.2的库。如果使用的库不支持TLS 1.2,您可能需要升级或更换库。 2. **证书格式**:您已经将Bluemix生成的.PEM文件转换为.DER文件,然后重命名为.cer文件。请确保转换过程中没有损坏或丢失任何数据。此外,检查生成的esp_ca_cert.bin文件是否正确。 3. **烧录位置**:您提到将esp_ca_cert.bin文件烧录到0x77的位置。请确保烧录位置正确,没有覆盖其他重要数据。 4. **网络问题**:从您的日志中可以看到,DNS解析和TCP连接都是成功的。但是,仍然有可能存在网络问题,例如网络延迟或不稳定。请检查您的网络连接是否稳定。 5. **MQTT库配置**:请确保您的MQTT库配置正确,包括服务器地址、端口、客户端ID等。此外,检查库是否支持SSL/TLS连接。 6. **日志信息**:从您的日志中可以看到,在TLS_ca_x509.cer 3fb处出现了问题。这可能表明证书加载或验证过程中出现了问题。请仔细检查证书文件和生成过程。 7. **ESP8266固件版本**:请确保您的ESP8266固件版本是最新的,以支持TLS 1.2和SSL/TLS连接。 8. **Bluemix云端配置**:请检查Bluemix云端的配置,确保它允许来自ESP8266的连接,并正确配置了SSL/TLS设置。 综上所述,您可能需要检查证书版本、证书格式、烧录位置、网络问题、MQTT库配置、日志信息、ESP8266固件版本和Bluemix云端配置。希望这些建议能帮助您解决问题。如果问题仍然存在,请提供更多详细信息,以便我们能够更好地帮助您。 |
|
|
|
只有小组成员才能发言,加入小组>>
180个成员聚集在这个小组
加入小组448 浏览 1 评论
1443 浏览 1 评论
615浏览 6评论
511浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
489浏览 5评论
493浏览 4评论
478浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-2-1 07:45 , Processed in 0.827831 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号