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.

CC3220SF: Http server not responding anymore after copy-pasting snippet from documentation

Part Number: CC3220SF

Hello,

the following is the device report from sl_DeviceGet:


CHIP 0x31000019
MAC 31.2.7.0.0
PHY 2.2.0.7
NWP 3.22.0.1
ROM 0
HOST 3.0.1.71

I am using the latest service pack. I uploaded the "provisioning" example from TI demos and I could connect to the default IP address via http port 80 and get the resource index.html.

After copy pasting the following code: 

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);

to try TLS, not only the same index.html page cannot be reached, but even after reloading the same provisioning example as before, the http server looks dead (perhaps due to persistent memory after loading the code snippet?) From the wireshark application, when I try the code snippet I can see that 

As far as I can tell, my browser (192.168.1.77) first tries port 80, then it is correctly redirected to port 443. However, it receives a FIN shortly after the Client Hello (simple link is IP 192.168.1.76, which is connected on network 192.168.1.0/24). It seems that the FIN is generated after acknowledging 517 bytes. Is this FIN packet the result of TLS handshake? Moreover, the FIN packet is never acknowledged by the browser, since simple link keeps retransmitting it.
I am able to reach the simple link with ping command. What might be the problem?

Thank you!