2 of 2 people found this helpful
Root CA is to ensure the authenticity of the server. If you do not want a secure conneection, you can omit the certificates. In general, when a client wants to connect to a server, it sends a connection request. The server then sends a certificate in the server hello message. The client can verify the authenticity of the server as a trusted root ca is present with the client.
As you were already able to establish a connection with your local server, I believe you are familiar with the flow. Can you give more details about the failure of sending the 400kB file? At what point it fails? Is your connection still intact with the server? Do you specifically have problems with "POST" request or with "GET" request only?
Thank you for your replay.
I use "400k.bin" that is filled with "0x35". The size is just 400KB. I use "GET" request.
I am checking the payload_data_length. The server finished sending the data. But Device received only 16384byte data.
When I checked by debug mode. "wiced_assert" was called in tls_host_create_buffer function.
I have checked "PUT" request . It's OK. But I have not checked "POST" request.
I made simple files. I have checked on AWS S3.
File Name "5M.bin" the file size is just 5MByte , filled with 0xFF.
File Name "5M1.bin" the file size is 5MByte +1 Byte , filled with 0xFF
I don't call "wiced_tls_init_root_ca_certificates" function in "application_start" function.
It seems that the remaining data size is not managed properly.
Since the variable is uint16, it seems that it is doing abnormal operation by judging with only the lower 16 bits of the actual file size.
5MB is 0x00500000, it seems that it is recognized as 0 byte on the program.
400KB is 0x00064000, so it seems that it is recognized as 16384 bytes on the program. )
Attach the modified file for reference.
This seems like a cause, but what about it?
http_client.c.zip 5.6 K
I have tried the patch(http_client.c.zip). and It worked correctly.
But I checked between local server. It does not work correctly.
I run "testing snip.httpbin_org-debug download" by WICED debug.
the system stopped by "wiced_assert" at tls_host_create_buffer fucntion of wiced_tls.c.
And MBEDTLS_SSL_DEBUG_MSG( 1, ( "unknown record type" ) ) was called in ssl_tls.c.
Is this another issue?