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.

CC3200-LAUNCHXL: Trouble to combine Mqtt-client and p2p example code

Part Number: CC3200-LAUNCHXL

Hello,

  I try to include p2p example code into mqtt-client, but facing some trouble.

  First, in the p2p example code, SimpleLinkWlanEventHandler() API will been noted by IAR as duplicate definitions, because the same API already exist in network_if.c.

    So I comment the one in the p2p example code, and then copy whatever inside it (SimpleLinkWlanEventHandler() ) to other one stands in network_if.c.

    But I don't know how to solve the other duplicate definitions issue with g_p2p_dev after I move it to the file "p2p.h" which I created for standing alone for p2p function.

    btw, could anyone tells me where does the SimpleLinkWlanEventHandler() been enabled? 

    I assume that if I know where it been enabled, then I can change the name of API to maybe P2P_SimpleLinkWlanEventHandler.

    So I don't need to use the one in network_if.c.

  Second, in the WlanConnect() in p2p example, it has _SlNonOsMainLoopTask(). But Mqtt-client example code based on FreeRTOS.

     Could anyone enlighten me how to combine p2p (nonOS) into Mqtt_client (FreeRTOS)?

  Regards,

    Lex

  • Hello,

    Every example has the set of SimpleLink callbacks as these are mandatory.

    You can see it under user.h header file.

    The other query is a little bit more treaky as it is not that trivial to combine a nonRTOS with RTOS.

    I recommend to change the nonRTOS to RTOS (i.e. create a task for it and possibly use semaphores for protection/sync).

    Using of SlNonOsMainLoopTask() is not needed under RTOS.

    Regards,

    Shlomi