完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
串口输出日志:
DEBUG,t:20.85,m:211.06,[HTTPS] connection to aliyun server ... [D][HTTPClient.cpp:276] beginInternal(): host: iot-auth.cn-shanghai.aliyuncs.com port: 443 url: /auth/register/device PS] POST... DEBUG,t:20.86,m:210.86,ali device register:productKey=a1AyzHf9sXq&deviceName=7D12CFA4&random=20864&sign=208ADB5862D0FD3F5591BFB88A03FC6B6A08F6EBDC4423897691AA884D93B32D&signMethod=hmacsha256 [D][HTTPClient.cpp:1025] connect(): connected to iot-auth.cn-shanghai.aliyuncs.com:443 [E][ssl_client.cpp:33] handle_error(): SSL - Bad input parameters to function [E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -28928 [E][ssl_client.cpp:33] handle_error(): SSL - Bad input parameters to function [E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -28928 [E][ssl_client.cpp:33] handle_error(): SSL - Bad input parameters to function [E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -28928 [W][HTTPClient.cpp:1318] returnError(): error(-2): send header failed [E][ssl_client.cpp:33] handle_error(): SSL - Bad input parameters to function [E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -28928 [D][HTTPClient.cpp:1320] returnError(): tcp stop [HTTPS] POST... failed, error: send header failed [E][ssl_client.cpp:33] handle_error(): SSL - Bad input parameters to function [E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -28928 代码片段: WiFiClientSecure* _client = new WiFiClientSecure; if (!_client)return false; _client->setCACert(root_ca); AliMqttAuth auth = Config.ali_mqtt; HTTPClient _https; sprintf(host, "https://iot-auth.%s.aliyuncs.com/auth/register/device", auth.region_id); INFO.print_debug("[HTTPS] connection to aliyun server ...rn"); if (_https.begin(*_client, host)) { // HTTPS INFO.print("[HTTPS] POST...rn"); prepare_data(); // start connection and send HTTP header size_t len = strlen(post_data); _https.addHeader("Content-Type", "application/x-www-form-urlencoded"); _https.addHeader("Content-Length", String(len)); int httpCode = _https.POST((uint8_t*)post_data, strlen(post_data)); |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
171个成员聚集在这个小组
加入小组350 浏览 0 评论
1196 浏览 1 评论
588浏览 6评论
484浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
468浏览 5评论
467浏览 4评论
445浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 15:53 , Processed in 0.721140 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号