CC3551E: Recommended Architecture for HTTPS Client Implementation

Part Number: CC3551E

Hi Team,

I am working with CC3551 using SimpleLink Wi-Fi SDK 9.21 (GA) and the AT-Commands example.

I need clarification on the recommended architecture for implementing an HTTPS client in this SDK, and whether any reference example is available.

I understand that the SDK integrates mbedTLS with a custom configuration. Before proceeding further, I would like confirmation on the officially supported approach.

Could you please clarify:

What is the recommended method for HTTPS client implementation in SDK 9.21:

lwIP raw API + ALTCP TLS

OR lwIP BSD sockets + direct mbedTLS API?

Is there any official HTTPS client example (non-MQTT) available for CC3551?

Please confirm the recommended and production-supported method.

Thank you.

Regards,
Vignesh

  • Hi,

    Currently there is no HTTPS (or HTTP) example in the SDK.

    Since I played a little with the implementation in LwIP, I would not recommend to use the LwIP internal HTTP server for several reasons.

    • it only has server authentication and not a client authentication
    • I find CGI and SSI support not so trivial
    • HTTP pages are static and CGI/SSI do not make it feel dynamic
    • using the altcp_tls_mbedtls layer makes LwIP and mbedTLS work in a bundle and since mbedTLS always upgrades and LwIP not too often, it creates mismatch when trying to compile

    I would recommend using mbedTLS extenally over an open sockets and then you would have full flexibility.

    Any HTTPS implementation may work.

    Regards,

    Shlomi

  • Hi Shlomi,

    Thank you for the clarification.

    Based on your suggestion, I implemented an HTTPS client using **lwIP BSD sockets with mbedTLS over a standard TCP socket** in the **AT-Commands example project** (SDK 9.22.00.15).

    The device successfully:

    * Connects to Wi-Fi
    * Obtains an IP address
    * Resolves DNS
    * Establishes a TCP connection to the HTTPS server

    However, the issue occurs during the **TLS handshake**. The driver starts reporting memory allocation errors as shown below:


    Free heap before HTTPS: 44488 bytes
    TCP CONNECTED
    TLS HANDSHAKE...

    ERROR! drv_handleRxMngPacket : allocation of pIE_addr_table failed

    It appears that during the TLS handshake the available heap drops significantly and the Wi-Fi driver fails to allocate internal buffers.

    Could you please advise:

    1. Is there a **recommended heap/stack configuration** for running mbedTLS HTTPS on CC3551?
    2. Are there any **mbedTLS configuration parameters (e.g. SSL buffer sizes)** that should be adjusted for this device?
    3. Is there a recommended way to integrate HTTPS with the **AT-Commands example** to avoid such memory issues?

    Any guidance would be appreciated.

    Regards,
    Vignesh

  • Hi,

    The only suggestion I can provide at this point is to increase the heap size since it might be that the amount of data that needs to be stored during handshake is large due to:

    • certificates chain
    • TLS renegotiation or EMS features that require to store the entire handshake
    • etc

    You can easily do it via the syscfg under freertos section.

    I would also recommend to increase the stack size of your main task since the context of mbedtls is the same as the main task.

    you can find it on the top of the main_freertos.c as THREADSTACKSIZE.

    Regards,

    Shlomi