This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
以下是 sl_DeviceGet 中的器件报告:
芯片0x31000019
Mac 31.2.7.0.0
PHY 2.2.0.7
NWP 3.2.0.1.
ROM 0
主机3.0.1.71
我正在使用最新的服务包。 我上传了 TI 演示中的"配置"示例、并且可以通过 http 端口80连接到默认 IP 地址、并获取资源 index.html。
在复制粘贴以下代码后:
unsigned char ServerCertificateFileName[] = "dummy-root-ca-cert"; unsigned char ServerKeyFileName[] = "dummy-root-ca-cert-key"; unsigned char SecurityMode[] = {0x1}; unsigned char HttpsPort[] = {0xBB, 0x01}; // 0x1BB = 443 unsigned char SecondaryPort[] = {0x50, 0x00}; // 0x050 = 80 unsigned char SecondaryPortEnable[] = {0x1}; // Set the file names used for TLS key exchange. sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_DEVICE_CERTIFICATE_FILENAME, sizeof(ServerCertificateFileName), ServerCertificateFileName); sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_PRIVATE_KEY_FILENAME, sizeof(ServerKeyFileName), ServerKeyFileName); // Activate TLS security on primary HTTP port and change it to // 443 (standard HTTPS port) sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_PRIMARY_PORT_SECURITY_MODE, sizeof(SecurityMode), SecurityMode); sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_PRIMARY_PORT_NUMBER, sizeof(HttpsPort), HttpsPort); // Enable secondary HTTP port (can only be used for redirecting // connections to the secure primary port). sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_SECONDARY_PORT_NUMBER, sizeof(SecondaryPort), SecondaryPort); sl_NetAppSet(SL_NETAPP_HTTP_SERVER_ID, SL_NETAPP_HTTP_SECONDARY_PORT_ENABLE, sizeof(SecondaryPortEnable), SecondaryPortEnable); // Restart HTTP server for new configuration to take effect. sl_NetAppStop(SL_NETAPP_HTTP_SERVER_ID); sl_NetAppStart(SL_NETAPP_HTTP_SERVER_ID);
为了尝试 TLS、不仅无法到达相同的 index.html 页面、而且即使重新加载了与之前相同的配置示例、http 服务器也看起来死机了(可能是由于加载代码片段后的持久存储器?) 从 Wireshark 应用中、当我尝试代码片段时、我可以看到它
据我所知,浏览器(192.168.1.77)首先尝试端口80,然后它被正确地重定向到端口443。 但是、它会在 Client Hello 之后不久收到一个 FIN (简单链路是 IP 192.168.1.76、连接在网络192.168.1.0/24上)。 FIN 似乎是在确认517个字节后生成的。 这个 FIN 数据包是 TLS 握手的结果吗? 此外,FIN 包永远不会被浏览器确认,因为简单链接会不断重新传输它。
我能够使用 ping 命令到达 simple link。 可能是什么问题?
谢谢!
不清楚。
您能否连接 Wireshark 以便我们可以检查各个数据包(特别是"client hello")?
您还可以 提供 NWP 日志(请参阅 编程人员指南中的第20章)吗?