你好Yoann,
从SPWF04Sx日志开始,似乎相互认证成功,而HTTP服务器拒绝连接(错误请求)。请注意,从HTTP服务器收到Http服务器状态代码。
TCP / TLS问题将报告为Http客户端错误/证书错误(TLS错误将传播回客户端)。
无论如何,您可以通过SOCKON命令进一步诊断TLS连接。以下是我在模块上完成的示例(单向认证):
- 错误的证书(未找到CA证书):
AT + S.HTTPGET = 192.168.1.112,443,2 ,,,,
AT-S.Certificate错误:23
AT-S.Http客户端错误:2
AT-S.ERROR:111:请求失败AT + S.SOCKON = 192.168.1.112,443 ,, s
AT-S.Certificate错误:23
AT-S.ERROR:74:无法打开套接字证书,找不到页面
AT + S.HTTPGET = 192.168.1.129,443,2 ,,,,
AT-S.Loading:1:1
AT-S.Http服务器状态码:404
AT-S.Http服务器错误:404
AT-S.ERROR:111:请求失败AT + S.SOCKON = 192.168.1.129,443 ,, s
AT-S.Loading:1:1
AT-S.On:192.168.1.129:0
AT-S.OK
+ WIND:58:套接字关闭:0:0< - 在超时帮助后,Apache HTTP服务器关闭连接,否则请发送事务的wireshark日志。
问候,
埃利奥
以上来自于谷歌翻译
以下为原文
Hi Yoann,
from SPWF04Sx log, it seems the mutual authentication succeeded, whereas the HTTP server has refused the connection (Bad Request). Please note that the Http Server Status Code is received from HTTP server.
A TCP/TLS problem would be reported as Http Client Error/Certificate Error (a TLS error would be propagated back to the client).
Anyway, you can further diagnose the TLS connection by means of the SOCKON command. Following an example I have done on my module (1-way authentication):
- wrong certificate (CA certificate not found):
AT+S.HTTPGET=192.168.1.112,,443,2,,,,
AT-S.Certificate Error:23
AT-S.Http Client Error:2
AT-S.ERROR:111:Request failedAT+S.SOCKON=192.168.1.112,443,,s
AT-S.Certificate Error:23
AT-S.ERROR:74:Failed to open socket- good certificate, page not found
AT+S.HTTPGET=192.168.1.129,,443,2,,,,
AT-S.Loading:1:1
AT-S.Http Server Status Code:404
AT-S.Http Server Error:404
AT-S.ERROR:111:Request failedAT+S.SOCKON=192.168.1.129,443,,s
AT-S.Loading:1:1
AT-S.On:192.168.1.129:0
AT-S.OK
+WIND:58:Socket Closed:0:0 <-- the connection was closed by the Apache HTTP server after a timeoutHope it helps, otherwise please send a wireshark log of the transaction.
Regards,
Elio