LwIP with WolfSSL Azure Iot Hub C SDK

dan.bom 21 Reputation points
2021-12-13T18:48:34.723+00:00

Hi,
Anyone get the Azure IoT Hub SDK for C (or middleware FreeRTOS) working with LwIP and WolfSSL?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
228 questions
{count} votes

2 answers

Sort by: Most helpful
  1. dan.bom 21 Reputation points
    2021-12-21T15:42:36.37+00:00

    Well I have now...

    In coreMQTT/source/interface/transport_interface.h I define NetworkContext and NetworkContext_t.

    /* Each compilation unit must define the NetworkContext struct. */
    struct NetworkContext
    {
      SocketHandle       xTCPSocket;
      void               *xSSLContext;
      Tls_t              *NgrfTls;
    };
    
    typedef struct NetworkContext NetworkContext_t;
    

    Where Tls_t is our structure containing the everything necessary to use WolfSSL.

    Then you must write your own Tls_SocketConnect, Tls_SocketDisconnect, Tls_SocketRecv, and Tls_SocketSend as mentioned in the SDK documetation.

    1 person found this answer helpful.

  2. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee Moderator
    2022-01-08T01:21:46.337+00:00

    Hello @dan.bom ,
    I have discussed this with Product Team and here's what are our current suggestions:

    1) Implement your own LwIP + WolfSSL + coreMQTT stack (the rest should be identical for Azure IoT FreeRTOS convenience)

    2) Use our FreeRTOS reference with mbedTLS.

    3) Use our Azure RTOS E2E solution with NetX.

    Thank you!

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.