summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Michael Abrina <abrinao@amazon.com>2020-09-27 12:00:44 -0700
committerGitHub <noreply@github.com>2020-09-27 12:00:44 -0700
commit5ac89f6705bdadbfdcdf37dea6fd708756d9bce4 (patch)
treecfa9492be2bd2ef380cda4c528d25de717d1e223
parent39089201041459dda46d4292d7dd5c6677a4bf90 (diff)
downloadfreertos-git-5ac89f6705bdadbfdcdf37dea6fd708756d9bce4.tar.gz
Add reconnection and resubscribe logic to the MQTT lightweight, keep alive, and mutual auth demos (#291)
This PR simply follows changes from PR #271: It copies changes from the plaintext demo and implements retries for the MQTT lightweight, keep alive, and mutual auth demos. If a connect or subscribe attempt fails, vTaskDelay is called to make the task sleep for some bounded backoff period that doubles on each retry. In addition, SUBACK status codes are updated to support multiple topic filters. This way, if a SUBSCRIBE is sent for multiple topic filters and the broker returns 0x80 (a failure) for any of them, a SUBSCRIBE will attempt to be resent.
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/DemoTasks/KeepAliveMQTTExample.c340
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj3
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj.filters6
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/DemoTasks/LightWeightMQTTExample.c373
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj397
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj.filters390
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/DemoTasks/MutualAuthMQTTExample.c305
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj1216
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj.filters6
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_plain_text/DemoTasks/PlaintextMQTTExample.c164
10 files changed, 1892 insertions, 1308 deletions
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/DemoTasks/KeepAliveMQTTExample.c b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/DemoTasks/KeepAliveMQTTExample.c
index e25d5a3ff..b80f2b251 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/DemoTasks/KeepAliveMQTTExample.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/DemoTasks/KeepAliveMQTTExample.c
@@ -22,7 +22,6 @@
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
- * 1 tab == 4 spaces!
*/
/*
@@ -57,6 +56,9 @@
/* MQTT library includes. */
#include "mqtt.h"
+/* Retry utilities include. */
+#include "retry_utils.h"
+
/* Transport interface include. */
#include "plaintext_freertos.h"
@@ -98,7 +100,7 @@
/**
* @brief Timeout for receiving CONNACK packet in milliseconds.
*/
-#define mqttexampleCONNACK_RECV_TIMEOUT_MS ( 1000U )
+#define mqttexampleCONNACK_RECV_TIMEOUT_MS ( 1000U )
/**
* @brief The topic to subscribe and publish to in the example.
@@ -106,28 +108,33 @@
* The topic name starts with the client identifier to ensure that each demo
* interacts with a unique topic name.
*/
-#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
+#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
+
+/**
+ * @brief The number of topic filters to subscribe.
+ */
+#define mqttexampleTOPIC_COUNT ( 1 )
/**
* @brief The MQTT message published in this example.
*/
-#define mqttexampleMESSAGE "Hello World!"
+#define mqttexampleMESSAGE "Hello World!"
/**
* @brief Dimensions a file scope buffer currently used to send and receive MQTT data
* from a socket.
*/
-#define mqttexampleSHARED_BUFFER_SIZE ( 500U )
+#define mqttexampleSHARED_BUFFER_SIZE ( 500U )
/**
* @brief Time to wait between each cycle of the demo implemented by prvMQTTDemoTask().
*/
-#define mqttexampleDELAY_BETWEEN_DEMO_ITERATIONS ( pdMS_TO_TICKS( 5000U ) )
+#define mqttexampleDELAY_BETWEEN_DEMO_ITERATIONS ( pdMS_TO_TICKS( 5000U ) )
/**
* @brief Timeout for MQTT_ReceiveLoop in milliseconds.
*/
-#define mqttexampleRECEIVE_LOOP_TIMEOUT_MS ( 500U )
+#define mqttexampleRECEIVE_LOOP_TIMEOUT_MS ( 500U )
/**
* @brief Keep alive time reported to the broker while establishing an MQTT connection.
@@ -137,7 +144,7 @@
* absence of sending any other Control Packets, the Client MUST send a
* PINGREQ Packet.
*/
-#define mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS ( 60U )
+#define mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS ( 60U )
/**
* @brief Time to wait before sending ping request to keep MQTT connection alive.
@@ -146,19 +153,19 @@
* seconds. This is to make sure that a PINGREQ is always sent before the timeout
* expires in broker.
*/
-#define mqttexampleKEEP_ALIVE_DELAY ( pdMS_TO_TICKS( ( ( mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS / 4 ) * 1000 ) ) )
+#define mqttexampleKEEP_ALIVE_DELAY ( pdMS_TO_TICKS( ( ( mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS / 4 ) * 1000 ) ) )
/**
* @brief Delay between MQTT publishes. Note that the receive loop also has a
* timeout, so the total time between publishes is the sum of the two delays. The
* keep-alive delay is added here so the keep-alive timer callback executes.
*/
-#define mqttexampleDELAY_BETWEEN_PUBLISHES ( mqttexampleKEEP_ALIVE_DELAY + pdMS_TO_TICKS( 500U ) )
+#define mqttexampleDELAY_BETWEEN_PUBLISHES ( mqttexampleKEEP_ALIVE_DELAY + pdMS_TO_TICKS( 500U ) )
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
-#define TRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
+#define mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
/*-----------------------------------------------------------*/
@@ -183,22 +190,45 @@
static void prvMQTTDemoTask( void * pvParameters );
/**
+ * @brief Connect to MQTT broker with reconnection retries.
+ *
+ * If connection fails, retry is attempted after a timeout.
+ * Timeout value will exponentially increase until maximum
+ * timeout value is reached or the number of attempts are exhausted.
+ *
+ * @param pxNetworkContext The output parameter to return the created network context.
+ *
+ * @return The status of the final connection attempt.
+ */
+static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkContext_t * pxNetworkContext );
+
+/**
* @brief Sends an MQTT Connect packet over the already connected TCP socket.
*
* @param pxMQTTContext MQTT context pointer.
- * @param xNetworkContext network context.
+ * @param pxNetworkContext Network context.
*
*/
static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
NetworkContext_t * pxNetworkContext );
/**
+ * @brief Function to update variable #xGlobalSubAckStatus with status
+ * information from Subscribe ACK. Called by the event callback after processing
+ * an incoming SUBACK packet.
+ *
+ * @param Server response to the subscription request.
+ */
+static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo );
+
+/**
* @brief Subscribes to the topic as specified in mqttexampleTOPIC at the top of
- * this file.
+ * this file. In the case of a Subscribe ACK failure, then subscription is
+ * retried using an exponential backoff strategy with jitter.
*
* @param pxMQTTContext MQTT context pointer.
*/
-static void prvMQTTSubscribeToTopic( MQTTContext_t * pxMQTTContext );
+static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext );
/**
* @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
@@ -269,14 +299,11 @@ static void prvKeepAliveTimerCallback( TimerHandle_t pxTimer );
*
* @param pxMQTTContext MQTT context pointer.
* @param pxPacketInfo Packet Info pointer for the incoming packet.
- * @param usPacketIdentifier Packet identifier of the incoming packet.
- * @param pxPublishInfo Deserialized publish info pointer for the incoming
- * packet.
+ * @param pxDeserializedInfo Deserialized information from the incoming packet.
*/
static void prvEventCallback( MQTTContext_t * pxMQTTContext,
MQTTPacketInfo_t * pxPacketInfo,
- uint16_t usPacketIdentifier,
- MQTTPublishInfo_t * pxPublishInfo );
+ MQTTDeserializedInfo_t * pxDeserializedInfo );
/*-----------------------------------------------------------*/
@@ -312,6 +339,24 @@ static uint16_t usSubscribePacketIdentifier;
static uint16_t usUnsubscribePacketIdentifier;
/**
+ * @brief A pair containing a topic filter and its SUBACK status.
+ */
+typedef struct topicFilterContext
+{
+ const char * pcTopicFilter;
+ MQTTSubAckStatus_t xSubAckStatus;
+} topicFilterContext_t;
+
+/**
+ * @brief An array containing the context of a SUBACK; the SUBACK status
+ * of a filter is updated when the event callback processes a SUBACK.
+ */
+static topicFilterContext_t xTopicFilterContext[ mqttexampleTOPIC_COUNT ] =
+{
+ { mqttexampleTOPIC, MQTTSubAckFailure }
+};
+
+/**
* @brief Timer to handle the MQTT keep-alive mechanism.
*/
static TimerHandle_t xKeepAliveTimer;
@@ -373,21 +418,19 @@ void vStartSimpleMQTTDemo( void )
static void prvMQTTDemoTask( void * pvParameters )
{
- uint32_t ulPublishCount = 0U;
+ uint32_t ulPublishCount = 0U, ulTopicCount = 0U;
const uint32_t ulMaxPublishCount = 5UL;
NetworkContext_t xNetworkContext = { 0 };
MQTTContext_t xMQTTContext;
MQTTStatus_t xMQTTStatus;
+ PlaintextTransportStatus_t xNetworkStatus;
BaseType_t xTimerStatus;
- BaseType_t xNetworkStatus;
/* Remove compiler warnings about unused parameters. */
( void ) pvParameters;
ulGlobalEntryTimeMs = prvGetTimeMs();
- /* Create a mutex to lock the MQTT Context in case of . */
-
/* Serialize a PINGREQ packet to send upon invoking the keep-alive timer callback. */
xMQTTStatus = MQTT_SerializePingreq( &xPingReqBuffer );
configASSERT( xMQTTStatus == MQTTSuccess );
@@ -396,16 +439,13 @@ static void prvMQTTDemoTask( void * pvParameters )
{
/****************************** Connect. ******************************/
- /* Establish a TCP connection with the MQTT broker. This example connects to
- * the MQTT broker as specified in democonfigMQTT_BROKER_ENDPOINT and
- * democonfigMQTT_BROKER_PORT at the top of this file. */
- LogInfo( ( "Create a TCP connection to %s.\r\n", democonfigMQTT_BROKER_ENDPOINT ) );
- xNetworkStatus = Plaintext_FreeRTOS_Connect( &xNetworkContext,
- democonfigMQTT_BROKER_ENDPOINT,
- democonfigMQTT_BROKER_PORT,
- TRANSPORT_SEND_RECV_TIMEOUT_MS,
- TRANSPORT_SEND_RECV_TIMEOUT_MS );
- configASSERT( xNetworkStatus == 0 );
+ /* Attempt to connect to the MQTT broker. If connection fails, retry after
+ * a timeout. Timeout value will be exponentially increased until the maximum
+ * number of attempts are reached or the maximum timeout value is reached.
+ * The function returns a failure status if the TCP connection cannot be established
+ * to the broker after the configured number of attempts. */
+ xNetworkStatus = prvConnectToServerWithBackoffRetries( &xNetworkContext );
+ configASSERT( xNetworkStatus == PLAINTEXT_TRANSPORT_SUCCESS );
/* Sends an MQTT Connect packet over the already connected TCP socket,
* and waits for connection acknowledgment (CONNACK) packet. */
@@ -427,25 +467,10 @@ static void prvMQTTDemoTask( void * pvParameters )
/**************************** Subscribe. ******************************/
- /* The client is now connected to the broker. Subscribe to the topic
- * as specified in mqttexampleTOPIC at the top of this file by sending a
- * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
- * This client will then publish to the same topic it subscribed to, so it
- * will expect all the messages it sends to the broker to be sent back to it
- * from the broker. This demo uses QOS0 in Subscribe, therefore, the Publish
- * messages received from the broker will have QOS0. */
- LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
- prvMQTTSubscribeToTopic( &xMQTTContext );
-
- /* Process incoming packet from the broker. After sending the subscribe, the
- * client may receive a publish before it receives a subscribe ack. Therefore,
- * call generic incoming packet processing function. Since this demo is
- * subscribing to the topic to which no one is publishing, probability of
- * receiving Publish message before subscribe ack is zero; but application
- * must be ready to receive any packet. This demo uses the generic packet
- * processing function everywhere to highlight this fact. */
- xMQTTStatus = MQTT_ReceiveLoop( &xMQTTContext, mqttexampleRECEIVE_LOOP_TIMEOUT_MS );
- configASSERT( xMQTTStatus == MQTTSuccess );
+ /* If server rejected the subscription request, attempt to resubscribe to topic.
+ * Attempts are made according to the exponential backoff retry strategy
+ * implemented in retryUtils. */
+ prvMQTTSubscribeWithBackoffRetries( &xMQTTContext );
/**************************** Publish and Receive Loop. ******************************/
/* Publish messages with QOS0, send and process Keep alive messages. */
@@ -486,7 +511,14 @@ static void prvMQTTDemoTask( void * pvParameters )
configASSERT( xTimerStatus == pdPASS );
/* Close the network connection. */
- Plaintext_FreeRTOS_Disconnect( &xNetworkContext );
+ xNetworkStatus = Plaintext_FreeRTOS_Disconnect( &xNetworkContext );
+ configASSERT( xNetworkStatus == PLAINTEXT_TRANSPORT_SUCCESS );
+
+ /* Reset SUBACK status for each topic filter after completion of subscription request cycle. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = MQTTSubAckFailure;
+ }
/* Wait for some time between two iterations to ensure that we do not
* bombard the public test mosquitto broker. */
@@ -498,6 +530,51 @@ static void prvMQTTDemoTask( void * pvParameters )
}
/*-----------------------------------------------------------*/
+static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkContext_t * pxNetworkContext )
+{
+ PlaintextTransportStatus_t xNetworkStatus;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xReconnectParams;
+
+ /* Initialize reconnect attempts and interval. */
+ RetryUtils_ParamsReset( &xReconnectParams );
+ xReconnectParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
+
+ /* Attempt to connect to MQTT broker. If connection fails, retry after
+ * a timeout. Timeout value will exponentially increase till maximum
+ * attempts are reached.
+ */
+ do
+ {
+ /* Establish a TCP connection with the MQTT broker. This example connects to
+ * the MQTT broker as specified in democonfigMQTT_BROKER_ENDPOINT and
+ * democonfigMQTT_BROKER_PORT at the top of this file. */
+ LogInfo( ( "Create a TCP connection to %s:%d.",
+ democonfigMQTT_BROKER_ENDPOINT,
+ democonfigMQTT_BROKER_PORT ) );
+ xNetworkStatus = Plaintext_FreeRTOS_Connect( pxNetworkContext,
+ democonfigMQTT_BROKER_ENDPOINT,
+ democonfigMQTT_BROKER_PORT,
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS,
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS );
+
+ if( xNetworkStatus != PLAINTEXT_TRANSPORT_SUCCESS )
+ {
+ LogWarn( ( "Connection to the broker failed. Retrying connection with backoff and jitter." ) );
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xReconnectParams );
+ }
+
+ if( xRetryUtilsStatus == RetryUtilsRetriesExhausted )
+ {
+ LogError( ( "Connection to the broker failed, all attempts exhausted." ) );
+ xNetworkStatus = PLAINTEXT_TRANSPORT_CONNECT_FAILURE;
+ }
+ } while( ( xNetworkStatus != PLAINTEXT_TRANSPORT_SUCCESS ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
+
+ return xNetworkStatus;
+}
+/*-----------------------------------------------------------*/
+
static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
NetworkContext_t * pxNetworkContext )
{
@@ -505,7 +582,6 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
MQTTConnectInfo_t xConnectInfo;
bool xSessionPresent;
TransportInterface_t xTransport;
- MQTTApplicationCallbacks_t xCallbacks;
/***
* For readability, error handling in this function is restricted to the use of
@@ -517,17 +593,12 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
xTransport.send = Plaintext_FreeRTOS_send;
xTransport.recv = Plaintext_FreeRTOS_recv;
- /* Application callbacks for receiving incoming published and incoming acks
- * from MQTT library. */
- xCallbacks.appCallback = prvEventCallback;
- xCallbacks.getTime = prvGetTimeMs;
-
/* Initialize MQTT library. */
- xResult = MQTT_Init( pxMQTTContext, &xTransport, &xCallbacks, &xBuffer );
+ xResult = MQTT_Init( pxMQTTContext, &xTransport, prvGetTimeMs, prvEventCallback, &xBuffer );
configASSERT( xResult == MQTTSuccess );
/* Many fields not used in this demo so start with everything at 0. */
- memset( ( void * ) &xConnectInfo, 0x00, sizeof( xConnectInfo ) );
+ ( void ) memset( ( void * ) &xConnectInfo, 0x00, sizeof( xConnectInfo ) );
/* Start with a clean session i.e. direct the MQTT broker to discard any
* previous session data. Also, establishing a connection with clean session
@@ -557,39 +628,97 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
}
/*-----------------------------------------------------------*/
-static void prvMQTTSubscribeToTopic( MQTTContext_t * pxMQTTContext )
+static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo )
{
- MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
- BaseType_t xTimerStatus;
+ MQTTStatus_t xResult = MQTTSuccess;
+ uint8_t * pucPayload = NULL;
+ size_t ulSize = 0;
+ uint32_t ulTopicCount = 0U;
- /***
- * For readability, error handling in this function is restricted to the use of
- * asserts().
- ***/
+ xResult = MQTT_GetSubAckStatusCodes( pxPacketInfo, &pucPayload, &ulSize );
+
+ /* MQTT_GetSubAckStatusCodes always returns success if called with packet info
+ * from the event callback and non-NULL parameters. */
+ configASSERT( xResult == MQTTSuccess );
+
+ for( ulTopicCount = 0; ulTopicCount < ulSize; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = pucPayload[ ulTopicCount ];
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext )
+{
+ MQTTStatus_t xResult = MQTTSuccess;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xRetryParams;
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
+ bool xFailedSubscribeToTopic = false;
+ uint32_t ulTopicCount = 0U;
/* Some fields not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+ /* Get a unique packet id. */
+ usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+
/* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
- * only one topic and uses QOS0. */
+ * only one topic and uses QoS0. */
xMQTTSubscription[ 0 ].qos = MQTTQoS0;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
- /* Get a unique packet id. */
- usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+ /* Initialize retry attempts and interval. */
+ RetryUtils_ParamsReset( &xRetryParams );
+ xRetryParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
- /* Send SUBSCRIBE packet. */
- xResult = MQTT_Subscribe( pxMQTTContext,
- xMQTTSubscription,
- sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
- usSubscribePacketIdentifier );
- configASSERT( xResult == MQTTSuccess );
+ do
+ {
+ /* The client is now connected to the broker. Subscribe to the topic
+ * as specified in mqttexampleTOPIC at the top of this file by sending a
+ * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
+ * This client will then publish to the same topic it subscribed to, so it
+ * will expect all the messages it sends to the broker to be sent back to it
+ * from the broker. This demo uses QOS0 in Subscribe, therefore, the Publish
+ * messages received from the broker will have QOS0. */
+ LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
+ xResult = MQTT_Subscribe( pxMQTTContext,
+ xMQTTSubscription,
+ sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
+ usSubscribePacketIdentifier );
+ configASSERT( xResult == MQTTSuccess );
- /* When a SUBSCRIBE packet has been sent, the keep-alive timer can be reset. */
- xTimerStatus = prvCheckTimeoutThenResetTimer( xKeepAliveTimer );
- configASSERT( xTimerStatus == pdPASS );
+ LogInfo( ( "SUBSCRIBE sent for topic %s to broker.\n\n", mqttexampleTOPIC ) );
+
+ /* Process incoming packet from the broker. After sending the subscribe, the
+ * client may receive a publish before it receives a subscribe ack. Therefore,
+ * call generic incoming packet processing function. Since this demo is
+ * subscribing to the topic to which no one is publishing, probability of
+ * receiving Publish message before subscribe ack is zero; but application
+ * must be ready to receive any packet. This demo uses the generic packet
+ * processing function everywhere to highlight this fact. */
+ xResult = MQTT_ProcessLoop( pxMQTTContext, mqttexampleRECEIVE_LOOP_TIMEOUT_MS );
+ configASSERT( xResult == MQTTSuccess );
+
+ /* Check if recent subscription request has been rejected. #xTopicFilterContext is updated
+ * in the event callback to reflect the status of the SUBACK sent by the broker. It represents
+ * either the QoS level granted by the server upon subscription, or acknowledgement of
+ * server rejection of the subscription request. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus == MQTTSubAckFailure )
+ {
+ LogWarn( ( "Server rejected subscription request. Attempting to re-subscribe to topic %s.",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter ) );
+ xFailedSubscribeToTopic = true;
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xRetryParams );
+ break;
+ }
+ }
+
+ configASSERT( xRetryUtilsStatus != RetryUtilsRetriesExhausted );
+ } while( ( xFailedSubscribeToTopic == true ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
}
/*-----------------------------------------------------------*/
@@ -607,7 +736,7 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
/* Some fields not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTPublishInfo, 0x00, sizeof( xMQTTPublishInfo ) );
- /* This demo uses QOS0 */
+ /* This demo uses QoS0. */
xMQTTPublishInfo.qos = MQTTQoS0;
xMQTTPublishInfo.retain = false;
xMQTTPublishInfo.pTopicName = mqttexampleTOPIC;
@@ -628,42 +757,58 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
static void prvMQTTUnsubscribeFromTopic( MQTTContext_t * pxMQTTContext )
{
MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
- BaseType_t xTimerStatus;
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
/* Some fields not used by this demo so start with everything at 0. */
- memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+ ( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
- /* Unsubscribe to the mqttexampleTOPIC topic filter. */
+ /* Get a unique packet id. */
+ usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+
+ /* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
+ * only one topic and uses QoS0. */
xMQTTSubscription[ 0 ].qos = MQTTQoS0;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
- /* Get next unique packet identifier */
+ /* Get next unique packet identifier. */
usUnsubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
- /* Make sure the packet id obtained is valid. */
- configASSERT( usUnsubscribePacketIdentifier != 0 );
/* Send UNSUBSCRIBE packet. */
xResult = MQTT_Unsubscribe( pxMQTTContext,
xMQTTSubscription,
sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
usUnsubscribePacketIdentifier );
- configASSERT( xResult == MQTTSuccess );
- /* When an UNSUBSCRIBE packet has been sent, the keep-alive timer can be reset. */
- xTimerStatus = prvCheckTimeoutThenResetTimer( xKeepAliveTimer );
- configASSERT( xTimerStatus == pdPASS );
+ configASSERT( xResult == MQTTSuccess );
}
/*-----------------------------------------------------------*/
static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
uint16_t usPacketId )
{
+ uint32_t ulTopicCount = 0U;
+
switch( pxIncomingPacket->type )
{
case MQTT_PACKET_TYPE_SUBACK:
- LogInfo( ( "Subscribed to the topic %s.\r\n", mqttexampleTOPIC ) );
+
+ /* A SUBACK from the broker, containing the server response to our subscription request, has been received.
+ * It contains the status code indicating server approval/rejection for the subscription to the single topic
+ * requested. The SUBACK will be parsed to obtain the status code, and this status code will be stored in global
+ * variable #xTopicFilterContext. */
+ prvUpdateSubAckStatus( pxIncomingPacket );
+
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus != MQTTSubAckFailure )
+ {
+ LogInfo( ( "Subscribed to the topic %s with maximum QoS %u.\r\n",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter,
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus ) );
+ }
+ }
+
/* Make sure ACK packet identifier matches with Request packet identifier. */
configASSERT( usSubscribePacketIdentifier == usPacketId );
break;
@@ -764,19 +909,18 @@ static void prvKeepAliveTimerCallback( TimerHandle_t pxTimer )
static void prvEventCallback( MQTTContext_t * pxMQTTContext,
MQTTPacketInfo_t * pxPacketInfo,
- uint16_t usPacketIdentifier,
- MQTTPublishInfo_t * pxPublishInfo )
+ MQTTDeserializedInfo_t * pxDeserializedInfo )
{
/* The MQTT context is not used for this demo. */
( void ) pxMQTTContext;
if( ( pxPacketInfo->type & 0xF0U ) == MQTT_PACKET_TYPE_PUBLISH )
{
- prvMQTTProcessIncomingPublish( pxPublishInfo );
+ prvMQTTProcessIncomingPublish( pxDeserializedInfo->pPublishInfo );
}
else
{
- prvMQTTProcessResponse( pxPacketInfo, usPacketIdentifier );
+ prvMQTTProcessResponse( pxPacketInfo, pxDeserializedInfo->packetIdentifier );
}
}
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj
index d27ba32ef..728cdcc45 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj
@@ -157,7 +157,9 @@
<ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c" />
<ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c" />
<ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\freertos_sockets_wrapper.c" />
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\plaintext_freertos.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c" />
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c" />
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_state.c" />
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt.c" />
@@ -191,6 +193,7 @@
<ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h" />
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include\plaintext_freertos.h" />
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\transport_interface.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\retry_utils.h" />
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h" />
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_state.h" />
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt.h" />
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj.filters
index 8ad1213cf..c2630433f 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj.filters
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_keep_alive/WIN32.vcxproj.filters
@@ -123,6 +123,9 @@
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\plaintext_freertos.c">
<Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h">
@@ -213,5 +216,8 @@
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\transport_interface.h">
<Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\retry_utils.h">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
+ </ClInclude>
</ItemGroup>
</Project>
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/DemoTasks/LightWeightMQTTExample.c b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/DemoTasks/LightWeightMQTTExample.c
index 3e333df33..4d506b844 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/DemoTasks/LightWeightMQTTExample.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/DemoTasks/LightWeightMQTTExample.c
@@ -22,7 +22,6 @@
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
- * 1 tab == 4 spaces!
*/
/*
@@ -61,6 +60,9 @@
/* MQTT library includes. */
#include "mqtt_lightweight.h"
+/* Retry utilities include. */
+#include "retry_utils.h"
+
/*-----------------------------------------------------------*/
/* Compile time error for undefined configs. */
@@ -86,8 +88,6 @@
#define democonfigCLIENT_IDENTIFIER "testClient"__TIME__
#endif
-
-
#ifndef democonfigMQTT_BROKER_PORT
/**
@@ -107,6 +107,11 @@
#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
/**
+ * @brief The number of topic filters to subscribe.
+ */
+#define mqttexampleTOPIC_COUNT ( 1 )
+
+/**
* @brief The MQTT message published in this example.
*/
#define mqttexampleMESSAGE "Hello Light Weight MQTT World!"
@@ -146,6 +151,7 @@
* graceful socket shutdown.
*/
#define mqttexampleMAX_SOCKET_SHUTDOWN_LOOPS ( 3 )
+
/*-----------------------------------------------------------*/
/**
@@ -167,6 +173,19 @@ static void prvMQTTDemoTask( void * pvParameters );
static Socket_t prvCreateTCPConnectionToBroker( void );
/**
+ * @brief Connect to MQTT broker with reconnection retries.
+ *
+ * If connection fails, retry is attempted after a timeout.
+ * Timeout value will exponentially increase until maximum
+ * timeout value is reached or the number of attempts are exhausted.
+ *
+ * @param xMQTTSocket is a TCP socket that is connected to an MQTT broker.
+ *
+ * @return The socket of the final connection attempt.
+ */
+static Socket_t prvConnectToServerWithBackoffRetries();
+
+/**
* @brief Sends an MQTT Connect packet over the already connected TCP socket.
*
* @param xMQTTSocket is a TCP socket that is connected to an MQTT broker.
@@ -193,6 +212,25 @@ static void prvGracefulShutDown( Socket_t xSocket );
static void prvMQTTSubscribeToTopic( Socket_t xMQTTSocket );
/**
+ * @brief Subscribes to the topic as specified in mqttexampleTOPIC at the top of
+ * this file. In the case of a Subscribe ACK failure, then subscription is
+ * retried using an exponential backoff strategy with jitter.
+ *
+ * @param xMQTTSocket is a TCP socket that is connected to an MQTT broker to which
+ * an MQTT connection has been established.
+ */
+static void prvMQTTSubscribeWithBackoffRetries( Socket_t xMQTTSocket );
+
+/**
+ * @brief Function to update variable #xTopicFilterContext with status
+ * information from Subscribe ACK. Called by the event callback after processing
+ * an incoming SUBACK packet.
+ *
+ * @param Server response to the subscription request.
+ */
+static void prvMQTTUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo );
+
+/**
* @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
*
* @param xMQTTSocket is a TCP socket that is connected to an MQTT broker to which
@@ -296,6 +334,24 @@ static uint16_t usSubscribePacketIdentifier;
*/
static uint16_t usUnsubscribePacketIdentifier;
+/**
+ * @brief A pair containing a topic filter and its SUBACK status.
+ */
+typedef struct topicFilterContext
+{
+ const char * pcTopicFilter;
+ bool xSubAckSuccess;
+} topicFilterContext_t;
+
+/**
+ * @brief An array containing the context of a SUBACK; the SUBACK status
+ * of a filter is updated when a SUBACK packet is processed.
+ */
+static topicFilterContext_t xTopicFilterContext[ mqttexampleTOPIC_COUNT ] =
+{
+ { mqttexampleTOPIC, false }
+};
+
/** @brief Static buffer used to hold MQTT messages being sent and received. */
const static MQTTFixedBuffer_t xBuffer =
@@ -340,7 +396,7 @@ void vStartSimpleMQTTDemo( void )
static void prvMQTTDemoTask( void * pvParameters )
{
Socket_t xMQTTSocket;
- uint32_t ulPublishCount = 0U;
+ uint32_t ulPublishCount = 0U, ulTopicCount = 0U;
const uint32_t ulMaxPublishCount = 5UL;
/* Remove compiler warnings about unused parameters. */
@@ -350,11 +406,13 @@ static void prvMQTTDemoTask( void * pvParameters )
{
/****************************** Connect. ******************************/
- /* Establish a TCP connection with the MQTT broker. This example connects to
- * the MQTT broker as specified in democonfigMQTT_BROKER_ENDPOINT and
- * democonfigMQTT_BROKER_PORT at the top of this file. */
- LogInfo( ( "Create a TCP connection to %s.\r\n", democonfigMQTT_BROKER_ENDPOINT ) );
- xMQTTSocket = prvCreateTCPConnectionToBroker();
+ /* Attempt to connect to the MQTT broker. If connection fails, retry after
+ * a timeout. Timeout value will be exponentially increased until the maximum
+ * number of attempts are reached or the maximum timeout value is reached.
+ * The function returns a failure status if the TCP connection cannot be established
+ * to the broker after the configured number of attempts. */
+ xMQTTSocket = prvConnectToServerWithBackoffRetries();
+ configASSERT( xMQTTSocket != FREERTOS_INVALID_SOCKET );
/* Sends an MQTT Connect packet over the already connected TCP socket
* xMQTTSocket, and waits for connection acknowledgment (CONNACK) packet. */
@@ -363,27 +421,13 @@ static void prvMQTTDemoTask( void * pvParameters )
/**************************** Subscribe. ******************************/
- /* The client is now connected to the broker. Subscribe to the topic
- * as specified in mqttexampleTOPIC at the top of this file by sending a
- * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
- * This client will then publish to the same topic it subscribed to, so it
- * will expect all the messages it sends to the broker to be sent back to it
- * from the broker. This demo uses QOS0 in Subscribe, therefore, the Publish
- * messages received from the broker will have QOS0. */
- LogInfo( ( "Attempt to subscribed to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
- prvMQTTSubscribeToTopic( xMQTTSocket );
-
- /* Process incoming packet from the broker. After sending the subscribe, the
- * client may receive a publish before it receives a subscribe ack. Therefore,
- * call generic incoming packet processing function. Since this demo is
- * subscribing to the topic to which no one is publishing, probability of
- * receiving Publish message before subscribe ack is zero; but application
- * must be ready to receive any packet. This demo uses the generic packet
- * processing function everywhere to highlight this fact. */
- prvMQTTProcessIncomingPacket( xMQTTSocket );
+ /* If server rejected the subscription request, attempt to resubscribe to topic.
+ * Attempts are made according to the exponential backoff retry strategy
+ * implemented in retryUtils. */
+ prvMQTTSubscribeWithBackoffRetries( xMQTTSocket );
/**************************** Publish and Keep Alive Loop. ******************************/
- /* Publish messages with QOS0, send and process Keep alive messages. */
+ /* Publish messages with QoS0, send and process Keep alive messages. */
for( ulPublishCount = 0; ulPublishCount < ulMaxPublishCount; ulPublishCount++ )
{
LogInfo( ( "Publish to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
@@ -424,6 +468,12 @@ static void prvMQTTDemoTask( void * pvParameters )
/* Close the network connection. */
prvGracefulShutDown( xMQTTSocket );
+ /* Reset SUBACK status for each topic filter after completion of subscription request cycle. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckSuccess = false;
+ }
+
/* Wait for some time between two iterations to ensure that we do not
* bombard the public test mosquitto broker. */
LogInfo( ( "prvMQTTDemoTask() completed an iteration successfully. Total free heap is %u.\r\n", xPortGetFreeHeapSize() ) );
@@ -562,6 +612,47 @@ static Socket_t prvCreateTCPConnectionToBroker( void )
}
/*-----------------------------------------------------------*/
+static Socket_t prvConnectToServerWithBackoffRetries()
+{
+ Socket_t xSocket;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xReconnectParams;
+
+ /* Initialize reconnect attempts and interval. */
+ RetryUtils_ParamsReset( &xReconnectParams );
+ xReconnectParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
+
+ /* Attempt to connect to MQTT broker. If connection fails, retry after
+ * a timeout. Timeout value will exponentially increase till maximum
+ * attempts are reached.
+ */
+ do
+ {
+ /* Establish a TCP connection with the MQTT broker. This example connects to
+ * the MQTT broker as specified in democonfigMQTT_BROKER_ENDPOINT and
+ * democonfigMQTT_BROKER_PORT at the top of this file. */
+ LogInfo( ( "Create a TCP connection to %s:%d.",
+ democonfigMQTT_BROKER_ENDPOINT,
+ democonfigMQTT_BROKER_PORT ) );
+ xSocket = prvCreateTCPConnectionToBroker();
+
+ if( xSocket == FREERTOS_INVALID_SOCKET )
+ {
+ LogWarn( ( "Connection to the broker failed. Retrying connection with backoff and jitter." ) );
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xReconnectParams );
+ }
+
+ if( xRetryUtilsStatus == RetryUtilsRetriesExhausted )
+ {
+ LogError( ( "Connection to the broker failed, all attempts exhausted." ) );
+ xSocket = FREERTOS_INVALID_SOCKET;
+ }
+ } while( ( xSocket == FREERTOS_INVALID_SOCKET ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
+
+ return xSocket;
+}
+/*-----------------------------------------------------------*/
+
static void prvCreateMQTTConnectionWithBroker( Socket_t xMQTTSocket )
{
BaseType_t xStatus;
@@ -633,9 +724,11 @@ static void prvCreateMQTTConnectionWithBroker( Socket_t xMQTTSocket )
* asserts.
*/
xNetworkContext.xTcpSocket = xMQTTSocket;
+
xResult = MQTT_GetIncomingPacketTypeAndLength( prvTransportRecv,
&xNetworkContext,
&xIncomingPacket );
+
configASSERT( xResult == MQTTSuccess );
configASSERT( xIncomingPacket.type == MQTT_PACKET_TYPE_CONNACK );
configASSERT( xIncomingPacket.remainingLength <= mqttexampleSHARED_BUFFER_SIZE );
@@ -663,25 +756,25 @@ static void prvCreateMQTTConnectionWithBroker( Socket_t xMQTTSocket )
static void prvMQTTSubscribeToTopic( Socket_t xMQTTSocket )
{
MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
size_t xRemainingLength;
size_t xPacketSize;
BaseType_t xStatus;
-
- /***
- * For readability, error handling in this function is restricted to the use of
- * asserts().
- ***/
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
/* Some fields not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
/* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
- * only one topic and uses QOS0. */
+ * only one topic and uses QoS0. */
xMQTTSubscription[ 0 ].qos = MQTTQoS0;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
+ /***
+ * For readability, error handling in this function is restricted to the use of
+ * asserts().
+ ***/
+
xResult = MQTT_GetSubscribePacketSize( xMQTTSubscription,
sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
&xRemainingLength,
@@ -710,10 +803,103 @@ static void prvMQTTSubscribeToTopic( Socket_t xMQTTSocket )
( void * ) xBuffer.pBuffer,
xPacketSize,
0 );
+
configASSERT( xStatus == ( BaseType_t ) xPacketSize );
}
/*-----------------------------------------------------------*/
+static void prvMQTTSubscribeWithBackoffRetries( Socket_t xMQTTSocket )
+{
+ uint32_t ulTopicCount = 0U;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xRetryParams;
+ bool xFailedSubscribeToTopic = false;
+
+ /* Initialize retry attempts and interval. */
+ RetryUtils_ParamsReset( &xRetryParams );
+ xRetryParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
+
+ do
+ {
+ /* The client is now connected to the broker. Subscribe to the topic
+ * as specified in mqttexampleTOPIC at the top of this file by sending a
+ * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
+ * This client will then publish to the same topic it subscribed to, so it
+ * will expect all the messages it sends to the broker to be sent back to it
+ * from the broker. This demo uses QOS0 in Subscribe, therefore, the Publish
+ * messages received from the broker will have QOS0. */
+ LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
+ prvMQTTSubscribeToTopic( xMQTTSocket );
+
+ LogInfo( ( "SUBSCRIBE sent for topic %s to broker.\n\n", mqttexampleTOPIC ) );
+
+ /* Process incoming packet from the broker. After sending the subscribe, the
+ * client may receive a publish before it receives a subscribe ack. Therefore,
+ * call generic incoming packet processing function. Since this demo is
+ * subscribing to the topic to which no one is publishing, probability of
+ * receiving Publish message before subscribe ack is zero; but application
+ * must be ready to receive any packet. This demo uses the generic packet
+ * processing function everywhere to highlight this fact. */
+ prvMQTTProcessIncomingPacket( xMQTTSocket );
+
+ /* Check if recent subscription request has been rejected. #xTopicFilterContext is updated
+ * in the event callback to reflect the status of the SUBACK sent by the broker. It represents
+ * either the QoS level granted by the server upon subscription, or acknowledgement of
+ * server rejection of the subscription request. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckSuccess == false )
+ {
+ LogWarn( ( "Server rejected subscription request. Attempting to re-subscribe to topic %s.",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter ) );
+ xFailedSubscribeToTopic = true;
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xRetryParams );
+ break;
+ }
+ }
+
+ configASSERT( xRetryUtilsStatus != RetryUtilsRetriesExhausted );
+ } while( ( xFailedSubscribeToTopic == true ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
+}
+/*-----------------------------------------------------------*/
+
+static void prvMQTTUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo )
+{
+ uint8_t * pucPayload = NULL;
+ uint32_t ulTopicCount = 0U;
+ size_t ulSize = 0U;
+
+ /* Check if the pxPacketInfo contains a valid SUBACK packet. */
+ configASSERT( pxPacketInfo != NULL );
+ configASSERT( pxPacketInfo->type == MQTT_PACKET_TYPE_SUBACK );
+ configASSERT( pxPacketInfo->pRemainingData != NULL );
+
+ /* A SUBACK must have a remaining length of at least 3 to accommodate the
+ * packet identifier and at least 1 return code. */
+ configASSERT( pxPacketInfo->remainingLength >= 3U );
+
+ /* According to the MQTT 3.1.1 protocol specification, the "Remaining Length" field is a
+ * length of the variable header (2 bytes) plus the length of the payload.
+ * Therefore, we add 2 positions for the starting address of the payload, and
+ * subtract 2 bytes from the remaining length for the length of the payload.*/
+ pucPayload = pxPacketInfo->pRemainingData + ( ( uint16_t ) sizeof( uint16_t ) );
+ ulSize = pxPacketInfo->remainingLength - sizeof( uint16_t );
+
+ for( ulTopicCount = 0; ulTopicCount < ulSize; ulTopicCount++ )
+ {
+ /* 0x80 denotes that the broker rejected subscription to a topic filter. */
+ if( pucPayload[ ulTopicCount ] == 0x80 )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckSuccess = false;
+ }
+ else
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckSuccess = true;
+ }
+ }
+}
+/*-----------------------------------------------------------*/
+
static void prvMQTTPublishToTopic( Socket_t xMQTTSocket )
{
MQTTStatus_t xResult;
@@ -723,7 +909,6 @@ static void prvMQTTPublishToTopic( Socket_t xMQTTSocket )
size_t xHeaderSize;
BaseType_t xStatus;
-
/***
* For readability, error handling in this function is restricted to the use of
* asserts().
@@ -732,7 +917,7 @@ static void prvMQTTPublishToTopic( Socket_t xMQTTSocket )
/* Some fields not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTPublishInfo, 0x00, sizeof( xMQTTPublishInfo ) );
- /* This demo uses QOS0 */
+ /* This demo uses QoS0. */
xMQTTPublishInfo.qos = MQTTQoS0;
xMQTTPublishInfo.retain = false;
xMQTTPublishInfo.pTopicName = mqttexampleTOPIC;
@@ -778,21 +963,21 @@ static void prvMQTTPublishToTopic( Socket_t xMQTTSocket )
static void prvMQTTUnsubscribeFromTopic( Socket_t xMQTTSocket )
{
MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
size_t xRemainingLength;
size_t xPacketSize;
BaseType_t xStatus;
+ MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
/* Some fields not used by this demo so start with everything at 0. */
- memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+ ( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
- /* Unsubscribe to the mqttexampleTOPIC topic filter. The task handle is passed
- * as the callback context which is used by the callback to send a task
- * notification to this task.*/
+ /* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
+ * only one topic and uses QoS0. */
xMQTTSubscription[ 0 ].qos = MQTTQoS0;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
+
xResult = MQTT_GetUnsubscribePacketSize( xMQTTSubscription,
sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
&xRemainingLength,
@@ -869,10 +1054,24 @@ static void prvMQTTDisconnect( Socket_t xMQTTSocket )
static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
uint16_t usPacketId )
{
+ uint32_t ulTopicCount = 0U;
+
switch( pxIncomingPacket->type )
{
case MQTT_PACKET_TYPE_SUBACK:
- LogInfo( ( "Subscribed to the topic %s.\r\n", mqttexampleTOPIC ) );
+
+ /* Check if recent subscription request has been accepted. #xTopicFilterContext is updated
+ * in #prvMQTTProcessIncomingPacket to reflect the status of the SUBACK sent by the broker. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckSuccess != false )
+ {
+ LogInfo( ( "Subscribed to the topic %s with maximum QoS %u.\r\n",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter,
+ xTopicFilterContext[ ulTopicCount ].xSubAckSuccess ) );
+ }
+ }
+
/* Make sure ACK packet identifier matches with Request packet identifier. */
configASSERT( usSubscribePacketIdentifier == usPacketId );
break;
@@ -889,7 +1088,7 @@ static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
/* Any other packet type is invalid. */
default:
- LogInfo( ( "prvMQTTProcessResponse() called with unknown packet type:(%02X).\r\n",
+ LogWarn( ( "prvMQTTProcessResponse() called with unknown packet type:(%02X).\r\n",
pxIncomingPacket->type ) );
}
}
@@ -901,7 +1100,7 @@ static void prvMQTTProcessIncomingPublish( MQTTPublishInfo_t * pxPublishInfo )
configASSERT( pxPublishInfo != NULL );
/* Process incoming Publish. */
- LogInfo( ( "Incoming QOS : %d\n", pxPublishInfo->qos ) );
+ LogInfo( ( "Incoming QoS : %d\n", pxPublishInfo->qos ) );
/* Verify the received publish is for the we have subscribed to. */
if( ( pxPublishInfo->topicNameLength == strlen( mqttexampleTOPIC ) ) &&
@@ -944,47 +1143,65 @@ static void prvMQTTProcessIncomingPacket( Socket_t xMQTTSocket )
/* Determine incoming packet type and remaining length. */
xNetworkContext.xTcpSocket = xMQTTSocket;
+
xResult = MQTT_GetIncomingPacketTypeAndLength( prvTransportRecv,
&xNetworkContext,
&xIncomingPacket );
- configASSERT( xResult == MQTTSuccess );
- configASSERT( xIncomingPacket.remainingLength <= mqttexampleSHARED_BUFFER_SIZE );
-
- /* Current implementation expects an incoming Publish and three different
- * responses ( SUBACK, PINGRESP and UNSUBACK ). */
-
- /* Receive the remaining bytes. In case of PINGRESP, remaining length will be zero.
- * Skip reading from network for remaining length zero. */
- if( xIncomingPacket.remainingLength > 0 )
- {
- xStatus = FreeRTOS_recv( xMQTTSocket,
- ( void * ) xBuffer.pBuffer,
- xIncomingPacket.remainingLength, 0 );
- configASSERT( xStatus == ( BaseType_t ) xIncomingPacket.remainingLength );
- xIncomingPacket.pRemainingData = xBuffer.pBuffer;
- }
- /* Check if the incoming packet is a publish packet. */
- if( ( xIncomingPacket.type & 0xf0 ) == MQTT_PACKET_TYPE_PUBLISH )
+ if( xResult != MQTTNoDataAvailable )
{
- xResult = MQTT_DeserializePublish( &xIncomingPacket, &usPacketId, &xPublishInfo );
configASSERT( xResult == MQTTSuccess );
+ configASSERT( xIncomingPacket.remainingLength <= mqttexampleSHARED_BUFFER_SIZE );
- /* Process incoming Publish message. */
- prvMQTTProcessIncomingPublish( &xPublishInfo );
- }
- else
- {
- /* If the received packet is not a Publish message, then it is an ACK for one
- * of the messages we sent out, verify that the ACK packet is a valid MQTT
- * packet. Session present is only valid for a CONNACK. CONNACK is not
- * expected to be received here. Hence pass NULL for pointer to session
- * present. */
- xResult = MQTT_DeserializeAck( &xIncomingPacket, &usPacketId, NULL );
- configASSERT( xResult == MQTTSuccess );
+ /* Current implementation expects an incoming Publish and three different
+ * responses ( SUBACK, PINGRESP and UNSUBACK ). */
- /* Process the response. */
- prvMQTTProcessResponse( &xIncomingPacket, usPacketId );
+ /* Receive the remaining bytes. In case of PINGRESP, remaining length will be zero.
+ * Skip reading from network for remaining length zero. */
+ if( xIncomingPacket.remainingLength > 0 )
+ {
+ xStatus = FreeRTOS_recv( xMQTTSocket,
+ ( void * ) xBuffer.pBuffer,
+ xIncomingPacket.remainingLength, 0 );
+ configASSERT( xStatus == ( BaseType_t ) xIncomingPacket.remainingLength );
+ xIncomingPacket.pRemainingData = xBuffer.pBuffer;
+ }
+
+ /* Check if the incoming packet is a publish packet. */
+ if( ( xIncomingPacket.type & 0xf0 ) == MQTT_PACKET_TYPE_PUBLISH )
+ {
+ xResult = MQTT_DeserializePublish( &xIncomingPacket, &usPacketId, &xPublishInfo );
+ configASSERT( xResult == MQTTSuccess );
+
+ /* Process incoming Publish message. */
+ prvMQTTProcessIncomingPublish( &xPublishInfo );
+ }
+ else
+ {
+ /* If the received packet is not a Publish message, then it is an ACK for one
+ * of the messages we sent out, verify that the ACK packet is a valid MQTT
+ * packet. Session present is only valid for a CONNACK. CONNACK is not
+ * expected to be received here. Hence pass NULL for pointer to session
+ * present. */
+ xResult = MQTT_DeserializeAck( &xIncomingPacket, &usPacketId, NULL );
+ configASSERT( xResult == MQTTSuccess );
+
+ if( xIncomingPacket.type == MQTT_PACKET_TYPE_SUBACK )
+ {
+ prvMQTTUpdateSubAckStatus( &xIncomingPacket );
+
+ /* #MQTTServerRefused is returned when the broker refuses the client
+ * to subscribe to a specific topic filter. */
+ configASSERT( xResult == MQTTSuccess || xResult == MQTTServerRefused );
+ }
+ else
+ {
+ configASSERT( xResult == MQTTSuccess );
+ }
+
+ /* Process the response. */
+ prvMQTTProcessResponse( &xIncomingPacket, usPacketId );
+ }
}
}
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj
index 922b327d2..fb1c04829 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj
@@ -1,198 +1,199 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
- <ProjectName>RTOSDemo</ProjectName>
- <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Midl>
- <TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\..\Source\FreeRTOS-Plus-Trace\Include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;..\..\common\logging-stack;..\common\WinPCap;..\..\..\..\..\FreeRTOS\Source\include;..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
- <ObjectFileName>.\Debug/</ObjectFileName>
- <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
- <WarningLevel>Level4</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableLanguageExtensions>false</DisableLanguageExtensions>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 /wd4200 %(AdditionalOptions)</AdditionalOptions>
- <BrowseInformation>true</BrowseInformation>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <ExceptionHandling>false</ExceptionHandling>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0c09</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\common\WinPCap</AdditionalLibraryDirectories>
- <Profile>false</Profile>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Debug/WIN32.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Midl>
- <TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
- <ObjectFileName>.\Release/</ObjectFileName>
- <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalIncludeDirectories>..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0c09</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>.\Release/RTOSDemo.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalLibraryDirectories>..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap</AdditionalLibraryDirectories>
- <AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Release/WIN32.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c" />
- <ClCompile Include="..\common\demo_logging.c" />
- <ClCompile Include="..\common\main.c" />
- <ClCompile Include="DemoTasks\LightWeightMQTTExample.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h" />
- <ClInclude Include="demo_config.h" />
- <ClInclude Include="FreeRTOSConfig.h" />
- <ClInclude Include="FreeRTOSIPConfig.h" />
- <ClInclude Include="mqtt_config.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
+ <ProjectName>RTOSDemo</ProjectName>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\Source\FreeRTOS-Plus-Trace\Include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;..\..\common\logging-stack;..\common\WinPCap;..\..\..\..\..\FreeRTOS\Source\include;..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DisableLanguageExtensions>false</DisableLanguageExtensions>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 /wd4200 %(AdditionalOptions)</AdditionalOptions>
+ <BrowseInformation>true</BrowseInformation>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <ExceptionHandling>false</ExceptionHandling>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c09</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\common\WinPCap</AdditionalLibraryDirectories>
+ <Profile>false</Profile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug/WIN32.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalIncludeDirectories>..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c09</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>.\Release/RTOSDemo.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap</AdditionalLibraryDirectories>
+ <AdditionalDependencies>wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release/WIN32.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c" />
+ <ClCompile Include="..\common\demo_logging.c" />
+ <ClCompile Include="..\common\main.c" />
+ <ClCompile Include="DemoTasks\LightWeightMQTTExample.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h" />
+ <ClInclude Include="demo_config.h" />
+ <ClInclude Include="FreeRTOSConfig.h" />
+ <ClInclude Include="FreeRTOSIPConfig.h" />
+ <ClInclude Include="mqtt_config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj.filters
index 75518d83b..19825a77f 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj.filters
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_light_weight/WIN32.vcxproj.filters
@@ -1,193 +1,199 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="FreeRTOS">
- <UniqueIdentifier>{af3445a1-4908-4170-89ed-39345d90d30c}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS\Source">
- <UniqueIdentifier>{f32be356-4763-4cae-9020-974a2638cb08}</UniqueIdentifier>
- <Extensions>*.c</Extensions>
- </Filter>
- <Filter Include="FreeRTOS\Source\Portable">
- <UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+">
- <UniqueIdentifier>{e5ad4ec7-23dc-4295-8add-2acaee488f5a}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS\Source\include">
- <UniqueIdentifier>{d2dcd641-8d91-492b-852f-5563ffadaec6}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS+TCP">
- <UniqueIdentifier>{8672fa26-b119-481f-8b8d-086419c01a3e}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS+TCP\portable">
- <UniqueIdentifier>{4570be11-ec96-4b55-ac58-24b50ada980a}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS+TCP\include">
- <UniqueIdentifier>{5d93ed51-023a-41ad-9243-8d230165d34b}</UniqueIdentifier>
- </Filter>
- <Filter Include="DemoTasks">
- <UniqueIdentifier>{b71e974a-9f28-4815-972b-d930ba8a34d0}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries">
- <UniqueIdentifier>{60717407-397f-4ea5-8492-3314acdd25f0}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard">
- <UniqueIdentifier>{8a90222f-d723-4b4e-8e6e-c57afaf7fa92}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt">
- <UniqueIdentifier>{2d17d5e6-ed70-4e42-9693-f7a63baf4948}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src">
- <UniqueIdentifier>{7158b0be-01e7-42d1-8d3f-c75118a596a2}</UniqueIdentifier>
- </Filter>
- <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include">
- <UniqueIdentifier>{6ad56e6d-c330-4830-8f4b-c75b05dfa866}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c">
- <Filter>FreeRTOS\Source\Portable</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c">
- <Filter>FreeRTOS\Source\Portable</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c">
- <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c">
- <Filter>FreeRTOS\Source</Filter>
- </ClCompile>
- <ClCompile Include="..\common\demo_logging.c" />
- <ClCompile Include="..\common\main.c" />
- <ClCompile Include="DemoTasks\LightWeightMQTTExample.c">
- <Filter>DemoTasks</Filter>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c">
- <Filter>FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="FreeRTOSConfig.h" />
- <ClInclude Include="FreeRTOSIPConfig.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h">
- <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h">
- <Filter>FreeRTOS\Source\include</Filter>
- </ClInclude>
- <ClInclude Include="demo_config.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h">
- <Filter>FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include</Filter>
- </ClInclude>
- <ClInclude Include="mqtt_config.h" />
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="FreeRTOS">
+ <UniqueIdentifier>{af3445a1-4908-4170-89ed-39345d90d30c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS\Source">
+ <UniqueIdentifier>{f32be356-4763-4cae-9020-974a2638cb08}</UniqueIdentifier>
+ <Extensions>*.c</Extensions>
+ </Filter>
+ <Filter Include="FreeRTOS\Source\Portable">
+ <UniqueIdentifier>{88f409e6-d396-4ac5-94bd-7a99c914be46}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+">
+ <UniqueIdentifier>{e5ad4ec7-23dc-4295-8add-2acaee488f5a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS\Source\include">
+ <UniqueIdentifier>{d2dcd641-8d91-492b-852f-5563ffadaec6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS+TCP">
+ <UniqueIdentifier>{8672fa26-b119-481f-8b8d-086419c01a3e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS+TCP\portable">
+ <UniqueIdentifier>{4570be11-ec96-4b55-ac58-24b50ada980a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS+TCP\include">
+ <UniqueIdentifier>{5d93ed51-023a-41ad-9243-8d230165d34b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="DemoTasks">
+ <UniqueIdentifier>{b71e974a-9f28-4815-972b-d930ba8a34d0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries">
+ <UniqueIdentifier>{60717407-397f-4ea5-8492-3314acdd25f0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard">
+ <UniqueIdentifier>{8a90222f-d723-4b4e-8e6e-c57afaf7fa92}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt">
+ <UniqueIdentifier>{2d17d5e6-ed70-4e42-9693-f7a63baf4948}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src">
+ <UniqueIdentifier>{7158b0be-01e7-42d1-8d3f-c75118a596a2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include">
+ <UniqueIdentifier>{6ad56e6d-c330-4830-8f4b-c75b05dfa866}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="FreeRTOS+\FreeRTOS IoT Libraries\platform">
+ <UniqueIdentifier>{84613aa2-91dc-4e1a-a3b3-823b6d7bf0e0}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c">
+ <Filter>FreeRTOS\Source\Portable</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\portable</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c">
+ <Filter>FreeRTOS\Source\Portable</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c">
+ <Filter>FreeRTOS+\FreeRTOS+TCP</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c">
+ <Filter>FreeRTOS\Source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\common\demo_logging.c" />
+ <ClCompile Include="..\common\main.c" />
+ <ClCompile Include="DemoTasks\LightWeightMQTTExample.c">
+ <Filter>DemoTasks</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\src</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="FreeRTOSConfig.h" />
+ <ClInclude Include="FreeRTOSIPConfig.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h">
+ <Filter>FreeRTOS+\FreeRTOS+TCP\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h">
+ <Filter>FreeRTOS\Source\include</Filter>
+ </ClInclude>
+ <ClInclude Include="demo_config.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\standard\mqtt\include</Filter>
+ </ClInclude>
+ <ClInclude Include="mqtt_config.h" />
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/DemoTasks/MutualAuthMQTTExample.c b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/DemoTasks/MutualAuthMQTTExample.c
index 7934171d3..584f4d514 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/DemoTasks/MutualAuthMQTTExample.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/DemoTasks/MutualAuthMQTTExample.c
@@ -21,6 +21,7 @@
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
+ *
*/
/*
@@ -53,6 +54,9 @@
/* MQTT library includes. */
#include "mqtt.h"
+/* Retry utilities include. */
+#include "retry_utils.h"
+
/* Transport interface implementation include header for TLS. */
#include "tls_freertos.h"
@@ -114,6 +118,11 @@
#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
/**
+ * @brief The number of topic filters to subscribe.
+ */
+#define mqttexampleTOPIC_COUNT ( 1 )
+
+/**
* @brief The MQTT message published in this example.
*/
#define mqttexampleMESSAGE "Hello World!"
@@ -175,21 +184,45 @@
static void prvMQTTDemoTask( void * pvParameters );
/**
+ * @brief Connect to MQTT broker with reconnection retries.
+ *
+ * If connection fails, retry is attempted after a timeout.
+ * Timeout value will exponentially increase until maximum
+ * timeout value is reached or the number of attempts are exhausted.
+ *
+ * @param[out] pxNetworkContext The output parameter to return the created network context.
+ *
+ * @return The status of the final connection attempt.
+ */
+static TlsTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkCredentials_t * pxNetworkCredentials,
+ NetworkContext_t * pNetworkContext );
+
+/**
* @brief Sends an MQTT Connect packet over the already connected TLS over TCP connection.
*
* @param[in, out] pxMQTTContext MQTT context pointer.
- * @param[in] xNetworkContext network context.
+ * @param[in] xNetworkContext Network context.
*/
static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
NetworkContext_t * pxNetworkContext );
/**
+ * @brief Function to update variable #xTopicFilterContext with status
+ * information from Subscribe ACK. Called by the event callback after processing
+ * an incoming SUBACK packet.
+ *
+ * @param[in] Server response to the subscription request.
+ */
+static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo );
+
+/**
* @brief Subscribes to the topic as specified in mqttexampleTOPIC at the top of
- * this file.
+ * this file. In the case of a Subscribe ACK failure, then subscription is
+ * retried using an exponential backoff strategy with jitter.
*
* @param[in] pxMQTTContext MQTT context pointer.
*/
-static void prvMQTTSubscribeToTopic( MQTTContext_t * pxMQTTContext );
+static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext );
/**
* @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
@@ -245,19 +278,11 @@ static void prvEventCallback( MQTTContext_t * pxMQTTContext,
MQTTPacketInfo_t * pxPacketInfo,
MQTTDeserializedInfo_t * pxDeserializedInfo );
-/**
- * @brief TLS connect to endpoint democonfigMQTT_BROKER_ENDPOINT.
- *
- * @param[in] pxNetworkCredentials Network credentials to establish a TLS connection
- * with democonfigMQTT_BROKER_ENDPOINT.
- * @param[in] pxNetworkCredentials Network context.
- */
-static void prvTLSConnect( NetworkCredentials_t * pxNetworkCredentials,
- NetworkContext_t * pxNetworkContext );
-
/*-----------------------------------------------------------*/
-/* @brief Static buffer used to hold MQTT messages being sent and received. */
+/**
+ * @brief Static buffer used to hold MQTT messages being sent and received.
+ */
static uint8_t ucSharedBuffer[ democonfigNETWORK_BUFFER_SIZE ];
/**
@@ -287,6 +312,25 @@ static uint16_t usSubscribePacketIdentifier;
*/
static uint16_t usUnsubscribePacketIdentifier;
+/**
+ * @brief A pair containing a topic filter and its SUBACK status.
+ */
+typedef struct topicFilterContext
+{
+ const char * pcTopicFilter;
+ MQTTSubAckStatus_t xSubAckStatus;
+} topicFilterContext_t;
+
+/**
+ * @brief An array containing the context of a SUBACK; the SUBACK status
+ * of a filter is updated when the event callback processes a SUBACK.
+ */
+static topicFilterContext_t xTopicFilterContext[ mqttexampleTOPIC_COUNT ] =
+{
+ { mqttexampleTOPIC, MQTTSubAckFailure }
+};
+
+
/** @brief Static buffer used to hold MQTT messages being sent and received. */
static MQTTFixedBuffer_t xBuffer =
{
@@ -328,12 +372,13 @@ void vStartSimpleMQTTDemo( void )
*/
static void prvMQTTDemoTask( void * pvParameters )
{
- uint32_t ulPublishCount = 0U;
+ uint32_t ulPublishCount = 0U, ulTopicCount = 0U;
const uint32_t ulMaxPublishCount = 5UL;
NetworkContext_t xNetworkContext = { 0 };
NetworkCredentials_t xNetworkCredentials = { 0 };
MQTTContext_t xMQTTContext = { 0 };
MQTTStatus_t xMQTTStatus;
+ TlsTransportStatus_t xNetworkStatus;
/* Remove compiler warnings about unused parameters. */
( void ) pvParameters;
@@ -348,13 +393,14 @@ static void prvMQTTDemoTask( void * pvParameters )
{
/****************************** Connect. ******************************/
- /* Establish a TLS connection with the MQTT broker. This example connects to
- * the MQTT broker as specified by democonfigMQTT_BROKER_ENDPOINT and
- * democonfigMQTT_BROKER_PORT in the demo_config.h file. */
- LogInfo( ( "Creating a TLS connection to %s:%u.\r\n",
- democonfigMQTT_BROKER_ENDPOINT,
- democonfigMQTT_BROKER_PORT ) );
- prvTLSConnect( &xNetworkCredentials, &xNetworkContext );
+ /* Attempt to establish TLS session with MQTT broker. If connection fails,
+ * retry after a timeout. Timeout value will be exponentially increased until
+ * the maximum number of attempts are reached or the maximum timeout value is reached.
+ * The function returns a failure status if the TCP connection cannot be established
+ * to the broker after the configured number of attempts. */
+ xNetworkStatus = prvConnectToServerWithBackoffRetries( &xNetworkCredentials,
+ &xNetworkContext );
+ configASSERT( xNetworkStatus == TLS_TRANSPORT_SUCCESS );
/* Sends an MQTT Connect packet over the already established TLS connection,
* and waits for connection acknowledgment (CONNACK) packet. */
@@ -363,17 +409,10 @@ static void prvMQTTDemoTask( void * pvParameters )
/**************************** Subscribe. ******************************/
- /* The client is now connected to the broker. Subscribe to the topic
- * as specified in mqttexampleTOPIC at the top of this file by sending a
- * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
- * The function #prvMQTTSubscribeToTopic will not wait to receive a SUBACK,
- * but the function #MQTT_ProcessLoop will attempt to receive the SUBACK
- * from network and if a SUBACK is received, application will be notified
- * through the callback registered (#prvEventCallback for this application).
- * This demo uses QoS1 in Subscribe, therefore, the Publish messages
- * received from the broker will have QoS1. */
- LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
- prvMQTTSubscribeToTopic( &xMQTTContext );
+ /* If server rejected the subscription request, attempt to resubscribe to topic.
+ * Attempts are made according to the exponential backoff retry strategy
+ * implemented in retryUtils. */
+ prvMQTTSubscribeWithBackoffRetries( &xMQTTContext );
/* Process incoming packet from the broker. After sending the subscribe, the
* client may receive a publish before it receives a subscribe ack. Therefore,
@@ -422,6 +461,12 @@ static void prvMQTTDemoTask( void * pvParameters )
/* Close the network connection. */
TLS_FreeRTOS_Disconnect( &xNetworkContext );
+ /* Reset SUBACK status for each topic filter after completion of subscription request cycle. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = MQTTSubAckFailure;
+ }
+
/* Wait for some time between two iterations to ensure that we do not
* the broker. */
LogInfo( ( "prvMQTTDemoTask() completed an iteration successfully. Total free heap is %u.\r\n", xPortGetFreeHeapSize() ) );
@@ -432,10 +477,12 @@ static void prvMQTTDemoTask( void * pvParameters )
}
/*-----------------------------------------------------------*/
-static void prvTLSConnect( NetworkCredentials_t * pxNetworkCredentials,
- NetworkContext_t * pxNetworkContext )
+static TlsTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkCredentials_t * pxNetworkCredentials,
+ NetworkContext_t * pxNetworkContext )
{
- BaseType_t xNetworkStatus;
+ TlsTransportStatus_t xNetworkStatus;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xReconnectParams;
/* Set the credentials for establishing a TLS connection. */
pxNetworkCredentials->pRootCa = ( const unsigned char * ) democonfigROOT_CA_PEM;
@@ -445,19 +492,47 @@ static void prvTLSConnect( NetworkCredentials_t * pxNetworkCredentials,
pxNetworkCredentials->pPrivateKey = ( const unsigned char * ) democonfigCLIENT_PRIVATE_KEY_PEM;
pxNetworkCredentials->privateKeySize = sizeof( democonfigCLIENT_PRIVATE_KEY_PEM );
- /* Attempt to create a mutually authenticated TLS connection. */
- xNetworkStatus = TLS_FreeRTOS_Connect( pxNetworkContext,
- democonfigMQTT_BROKER_ENDPOINT,
- democonfigMQTT_BROKER_PORT,
- pxNetworkCredentials,
- mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS,
- mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS );
- configASSERT( xNetworkStatus == TLS_TRANSPORT_SUCCESS );
- LogInfo( ( "A mutually authenticated TLS connection established with %s:%u.\r\n",
- democonfigMQTT_BROKER_ENDPOINT,
- democonfigMQTT_BROKER_PORT ) );
+ /* Initialize reconnect attempts and interval. */
+ RetryUtils_ParamsReset( &xReconnectParams );
+ xReconnectParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
+
+ /* Attempt to connect to MQTT broker. If connection fails, retry after
+ * a timeout. Timeout value will exponentially increase till maximum
+ * attempts are reached.
+ */
+ do
+ {
+ /* Establish a TLS session with the MQTT broker. This example connects to
+ * the MQTT broker as specified in democonfigMQTT_BROKER_ENDPOINT and
+ * democonfigMQTT_BROKER_PORT at the top of this file. */
+ LogInfo( ( "Creating a TLS connection to %s:%u.\r\n",
+ democonfigMQTT_BROKER_ENDPOINT,
+ democonfigMQTT_BROKER_PORT ) );
+ /* Attempt to create a mutually authenticated TLS connection. */
+ xNetworkStatus = TLS_FreeRTOS_Connect( pxNetworkContext,
+ democonfigMQTT_BROKER_ENDPOINT,
+ democonfigMQTT_BROKER_PORT,
+ pxNetworkCredentials,
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS,
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS );
+
+ if( xNetworkStatus != TLS_TRANSPORT_SUCCESS )
+ {
+ LogWarn( ( "Connection to the broker failed. Retrying connection with backoff and jitter." ) );
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xReconnectParams );
+ }
+
+ if( xRetryUtilsStatus == RetryUtilsRetriesExhausted )
+ {
+ LogError( ( "Connection to the broker failed, all attempts exhausted." ) );
+ xNetworkStatus = TLS_TRANSPORT_CONNECT_FAILURE;
+ }
+ } while( ( xNetworkStatus != TLS_TRANSPORT_SUCCESS ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
+
+ return xNetworkStatus;
}
/*-----------------------------------------------------------*/
+
static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
NetworkContext_t * pxNetworkContext )
{
@@ -481,7 +556,7 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
configASSERT( xResult == MQTTSuccess );
/* Some fields are not used in this demo so start with everything at 0. */
- memset( ( void * ) &xConnectInfo, 0x00, sizeof( xConnectInfo ) );
+ ( void ) memset( ( void * ) &xConnectInfo, 0x00, sizeof( xConnectInfo ) );
/* Start with a clean session i.e. direct the MQTT broker to discard any
* previous session data. Also, establishing a connection with clean session
@@ -513,35 +588,97 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
}
/*-----------------------------------------------------------*/
-static void prvMQTTSubscribeToTopic( MQTTContext_t * pxMQTTContext )
+static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo )
{
- MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
+ MQTTStatus_t xResult = MQTTSuccess;
+ uint8_t * pucPayload = NULL;
+ size_t ulSize = 0;
+ uint32_t ulTopicCount = 0U;
- /***
- * For readability, error handling in this function is restricted to the use of
- * asserts().
- ***/
+ xResult = MQTT_GetSubAckStatusCodes( pxPacketInfo, &pucPayload, &ulSize );
- /* Some fields are not used by this demo so start with everything at 0. */
+ /* MQTT_GetSubAckStatusCodes always returns success if called with packet info
+ * from the event callback and non-NULL parameters. */
+ configASSERT( xResult == MQTTSuccess );
+
+ for( ulTopicCount = 0; ulTopicCount < ulSize; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = pucPayload[ ulTopicCount ];
+ }
+}
+/*-----------------------------------------------------------*/
+
+static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext )
+{
+ MQTTStatus_t xResult = MQTTSuccess;
+ RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
+ RetryUtilsParams_t xRetryParams;
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
+ bool xFailedSubscribeToTopic = false;
+ uint32_t ulTopicCount = 0U;
+
+ /* Some fields not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+ /* Get a unique packet id. */
+ usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+
/* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
* only one topic and uses QoS1. */
xMQTTSubscription[ 0 ].qos = MQTTQoS1;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
- /* Get a unique packet id. */
- usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+ /* Initialize retry attempts and interval. */
+ RetryUtils_ParamsReset( &xRetryParams );
+ xRetryParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
- /* Send SUBSCRIBE packet. */
- xResult = MQTT_Subscribe( pxMQTTContext,
- xMQTTSubscription,
- sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
- usSubscribePacketIdentifier );
+ do
+ {
+ /* The client is now connected to the broker. Subscribe to the topic
+ * as specified in mqttexampleTOPIC at the top of this file by sending a
+ * subscribe packet then waiting for a subscribe acknowledgment (SUBACK).
+ * This client will then publish to the same topic it subscribed to, so it
+ * will expect all the messages it sends to the broker to be sent back to it
+ * from the broker. This demo uses QOS0 in Subscribe, therefore, the Publish
+ * messages received from the broker will have QOS0. */
+ LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
+ xResult = MQTT_Subscribe( pxMQTTContext,
+ xMQTTSubscription,
+ sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
+ usSubscribePacketIdentifier );
+ configASSERT( xResult == MQTTSuccess );
- configASSERT( xResult == MQTTSuccess );
+ LogInfo( ( "SUBSCRIBE sent for topic %s to broker.\n\n", mqttexampleTOPIC ) );
+
+ /* Process incoming packet from the broker. After sending the subscribe, the
+ * client may receive a publish before it receives a subscribe ack. Therefore,
+ * call generic incoming packet processing function. Since this demo is
+ * subscribing to the topic to which no one is publishing, probability of
+ * receiving Publish message before subscribe ack is zero; but application
+ * must be ready to receive any packet. This demo uses the generic packet
+ * processing function everywhere to highlight this fact. */
+ xResult = MQTT_ProcessLoop( pxMQTTContext, mqttexamplePROCESS_LOOP_TIMEOUT_MS );
+ configASSERT( xResult == MQTTSuccess );
+
+ /* Check if recent subscription request has been rejected. #xTopicFilterContext is updated
+ * in the event callback to reflect the status of the SUBACK sent by the broker. It represents
+ * either the QoS level granted by the server upon subscription, or acknowledgement of
+ * server rejection of the subscription request. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus == MQTTSubAckFailure )
+ {
+ LogWarn( ( "Server rejected subscription request. Attempting to re-subscribe to topic %s.",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter ) );
+ xFailedSubscribeToTopic = true;
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xRetryParams );
+ break;
+ }
+ }
+
+ configASSERT( xRetryUtilsStatus != RetryUtilsRetriesExhausted );
+ } while( ( xFailedSubscribeToTopic == true ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
}
/*-----------------------------------------------------------*/
@@ -550,7 +687,6 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
MQTTStatus_t xResult;
MQTTPublishInfo_t xMQTTPublishInfo;
-
/***
* For readability, error handling in this function is restricted to the use of
* asserts().
@@ -559,7 +695,7 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
/* Some fields are not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTPublishInfo, 0x00, sizeof( xMQTTPublishInfo ) );
- /* This demo uses QoS1 */
+ /* This demo uses QoS1. */
xMQTTPublishInfo.qos = MQTTQoS1;
xMQTTPublishInfo.retain = false;
xMQTTPublishInfo.pTopicName = mqttexampleTOPIC;
@@ -580,19 +716,22 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
static void prvMQTTUnsubscribeFromTopic( MQTTContext_t * pxMQTTContext )
{
MQTTStatus_t xResult;
- MQTTSubscribeInfo_t xMQTTSubscription[ 1 ];
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
- /* Some fields are not used by this demo so start with everything at 0. */
- memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+ /* Some fields not used by this demo so start with everything at 0. */
+ ( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+
+ /* Get a unique packet id. */
+ usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
- /* Unsubscribe to the mqttexampleTOPIC topic filter. */
+ /* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
+ * only one topic and uses QoS1. */
+ xMQTTSubscription[ 0 ].qos = MQTTQoS1;
xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
- /* Get next unique packet identifier */
+ /* Get next unique packet identifier. */
usUnsubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
- /* Make sure the packet id obtained is valid. */
- configASSERT( usUnsubscribePacketIdentifier != 0 );
/* Send UNSUBSCRIBE packet. */
xResult = MQTT_Unsubscribe( pxMQTTContext,
@@ -607,6 +746,8 @@ static void prvMQTTUnsubscribeFromTopic( MQTTContext_t * pxMQTTContext )
static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
uint16_t usPacketId )
{
+ uint32_t ulTopicCount = 0U;
+
switch( pxIncomingPacket->type )
{
case MQTT_PACKET_TYPE_PUBACK:
@@ -616,7 +757,23 @@ static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
break;
case MQTT_PACKET_TYPE_SUBACK:
- LogInfo( ( "Subscribed to the topic %s.\r\n", mqttexampleTOPIC ) );
+
+ /* A SUBACK from the broker, containing the server response to our subscription request, has been received.
+ * It contains the status code indicating server approval/rejection for the subscription to the single topic
+ * requested. The SUBACK will be parsed to obtain the status code, and this status code will be stored in global
+ * variable #xTopicFilterContext. */
+ prvUpdateSubAckStatus( pxIncomingPacket );
+
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus != MQTTSubAckFailure )
+ {
+ LogInfo( ( "Subscribed to the topic %s with maximum QoS %u.\r\n",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter,
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus ) );
+ }
+ }
+
/* Make sure ACK packet identifier matches with Request packet identifier. */
configASSERT( usSubscribePacketIdentifier == usPacketId );
break;
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj
index 79dccb856..c0beacc3d 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj
@@ -1,608 +1,610 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
- <ProjectName>RTOSDemo</ProjectName>
- <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Midl>
- <TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\..\Source\FreeRTOS-Plus-Trace\Include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;..\..\common\logging-stack;..\common\WinPCap;..\..\..\..\..\FreeRTOS\Source\include;..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls;..\..\..\..\Source\mbedtls_utils;..\..\..\..\Source\mbedtls\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
- <ObjectFileName>.\Debug/</ObjectFileName>
- <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
- <WarningLevel>Level4</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableLanguageExtensions>false</DisableLanguageExtensions>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 /wd4200 %(AdditionalOptions)</AdditionalOptions>
- <BrowseInformation>true</BrowseInformation>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <ExceptionHandling>false</ExceptionHandling>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0c09</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalDependencies>wpcap.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>..\common\WinPCap</AdditionalLibraryDirectories>
- <Profile>false</Profile>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Debug/WIN32.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Midl>
- <TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
- <ObjectFileName>.\Release/</ObjectFileName>
- <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <AdditionalIncludeDirectories>..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0c09</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>.\Release/RTOSDemo.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
- <SubSystem>Console</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalLibraryDirectories>..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap</AdditionalLibraryDirectories>
- <AdditionalDependencies>wpcap.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Release/WIN32.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c" />
- <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls\mbedtls_freertos_port.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\freertos_sockets_wrapper.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\tls_freertos.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_state.c" />
- <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt.c" />
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\aes.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\aesni.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\arc4.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\aria.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\asn1parse.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\asn1write.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\base64.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\bignum.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\blowfish.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\camellia.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ccm.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\certs.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\chacha20.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\chachapoly.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\cipher.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\cipher_wrap.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\cmac.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ctr_drbg.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\debug.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\des.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\dhm.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecdh.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecdsa.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecjpake.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecp.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecp_curves.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\entropy.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\entropy_poll.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\error.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\gcm.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\havege.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\hkdf.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\hmac_drbg.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\md.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\md2.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\md4.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\md5.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\md_wrap.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\memory_buffer_alloc.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\net_sockets.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\nist_kw.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\oid.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\padlock.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pem.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pk.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs11.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs12.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs5.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkparse.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkwrite.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\pk_wrap.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\platform.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\platform_util.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\poly1305.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ripemd160.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\rsa.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\rsa_internal.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha1.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha256.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha512.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cache.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_ciphersuites.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cli.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cookie.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_srv.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_ticket.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_tls.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\threading.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\timing.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\version.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\version_features.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509write_crt.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509write_csr.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_create.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_crl.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_crt.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_csr.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls\library\xtea.c">
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
- <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
- </ClCompile>
- <ClCompile Include="..\..\..\..\Source\mbedtls_utils\mbedtls_error.c" />
- <ClCompile Include="..\..\..\..\Source\mbedtls_utils\mbedtls_utils.c" />
- <ClCompile Include="..\common\demo_logging.c" />
- <ClCompile Include="..\common\main.c" />
- <ClCompile Include="DemoTasks\MutualAuthMQTTExample.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h" />
- <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls\threading_alt.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include\freertos_sockets_wrapper.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include\tls_freertos.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\transport_interface.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_state.h" />
- <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aes.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aesni.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\arc4.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aria.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\asn1.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\asn1write.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\base64.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\bignum.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\blowfish.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\bn_mul.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\camellia.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ccm.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\certs.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\chacha20.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\chachapoly.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\check_config.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cipher.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cipher_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cmac.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\compat-1.3.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\config.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ctr_drbg.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\debug.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\des.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\dhm.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecdh.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecdsa.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecjpake.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecp.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecp_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\entropy.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\entropy_poll.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\error.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\gcm.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\havege.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\hkdf.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\hmac_drbg.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md2.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md4.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md5.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\memory_buffer_alloc.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\net.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\net_sockets.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\nist_kw.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\oid.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\padlock.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pem.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pk.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs11.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs12.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs5.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pk_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform_time.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform_util.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\poly1305.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\psa_util.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ripemd160.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\rsa.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\rsa_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha1.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha256.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha512.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_cache.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_ciphersuites.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_cookie.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_internal.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_ticket.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\threading.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\timing.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\version.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_crl.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_crt.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_csr.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\xtea.h" />
- <ClInclude Include="..\..\..\..\Source\mbedtls_utils\mbedtls_error.h" />
- <ClInclude Include="mbedtls_config.h" />
- <ClInclude Include="demo_config.h" />
- <ClInclude Include="FreeRTOSConfig.h" />
- <ClInclude Include="FreeRTOSIPConfig.h" />
- <ClInclude Include="mqtt_config.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C686325E-3261-42F7-AEB1-DDE5280E1CEB}</ProjectGuid>
+ <ProjectName>RTOSDemo</ProjectName>
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Debug/WIN32.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\..\Source\FreeRTOS-Plus-Trace\Include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement;..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\Compiler\MSVC;..\..\common\logging-stack;..\common\WinPCap;..\..\..\..\..\FreeRTOS\Source\include;..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include;..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls;..\..\..\..\Source\mbedtls_utils;..\..\..\..\Source\mbedtls\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>MBEDTLS_CONFIG_FILE="mbedtls_config.h";WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;WINVER=0x400;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Debug/WIN32.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <WarningLevel>Level4</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DisableLanguageExtensions>false</DisableLanguageExtensions>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalOptions>/wd4210 /wd4127 /wd4214 /wd4201 /wd4244 /wd4310 /wd4200 %(AdditionalOptions)</AdditionalOptions>
+ <BrowseInformation>true</BrowseInformation>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <ExceptionHandling>false</ExceptionHandling>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c09</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>.\Debug/RTOSDemo.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/WIN32.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>wpcap.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\common\WinPCap</AdditionalLibraryDirectories>
+ <Profile>false</Profile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug/WIN32.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <TypeLibraryName>.\Release/WIN32.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PreprocessorDefinitions>_WINSOCKAPI_;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>.\Release/WIN32.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalIncludeDirectories>..\Common\Utils;..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap;..\Common\ethernet\lwip-1.4.0\src\include\ipv4;..\Common\ethernet\lwip-1.4.0\src\include;..\..\..\Source\include;..\..\..\Source\portable\MSVC-MingW;..\Common\ethernet\lwip-1.4.0\ports\win32\include;..\Common\Include;.\lwIP_Apps;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0c09</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>.\Release/RTOSDemo.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ProgramDatabaseFile>.\Release/WIN32.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>..\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap</AdditionalLibraryDirectories>
+ <AdditionalDependencies>wpcap.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release/WIN32.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\event_groups.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\list.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MemMang\heap_4.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\port.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\queue.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\stream_buffer.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\tasks.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS\Source\timers.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_ARP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_DNS.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_2.c" />
+ <ClCompile Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\portable\NetworkInterface\WinPCap\NetworkInterface.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls\mbedtls_freertos_port.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\freertos_sockets_wrapper.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\tls_freertos.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_lightweight.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt_state.c" />
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\src\mqtt.c" />
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\aes.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\aesni.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\arc4.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\aria.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\asn1parse.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\asn1write.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\base64.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\bignum.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\blowfish.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\camellia.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ccm.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\certs.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\chacha20.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\chachapoly.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\cipher.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\cipher_wrap.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\cmac.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ctr_drbg.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\debug.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\des.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\dhm.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecdh.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecdsa.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecjpake.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecp.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ecp_curves.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\entropy.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\entropy_poll.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\error.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\gcm.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\havege.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\hkdf.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\hmac_drbg.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\md.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\md2.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\md4.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\md5.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\md_wrap.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\memory_buffer_alloc.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\net_sockets.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\nist_kw.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\oid.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\padlock.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pem.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pk.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs11.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs12.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkcs5.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkparse.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pkwrite.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\pk_wrap.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\platform.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\platform_util.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\poly1305.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ripemd160.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\rsa.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\rsa_internal.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha1.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha256.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\sha512.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cache.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_ciphersuites.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cli.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_cookie.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_srv.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_ticket.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\ssl_tls.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\threading.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\timing.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\version.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\version_features.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509write_crt.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509write_csr.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_create.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_crl.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_crt.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\x509_csr.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls\library\xtea.c">
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
+ <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
+ </ClCompile>
+ <ClCompile Include="..\..\..\..\Source\mbedtls_utils\mbedtls_error.c" />
+ <ClCompile Include="..\..\..\..\Source\mbedtls_utils\mbedtls_utils.c" />
+ <ClCompile Include="..\common\demo_logging.c" />
+ <ClCompile Include="..\common\main.c" />
+ <ClCompile Include="DemoTasks\MutualAuthMQTTExample.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\event_groups.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\FreeRTOS.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\portable.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\projdefs.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\queue.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\semphr.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\task.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\include\timers.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS\Source\portable\MSVC-MingW\portmacro.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOSIPConfigDefaults.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_ARP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DHCP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_DNS.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_IP_Private.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Sockets.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_Stream_Buffer.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_TCP_WIN.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\FreeRTOS_UDP_IP.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\IPTraceMacroDefaults.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkBufferManagement.h" />
+ <ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\mbedtls\threading_alt.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include\freertos_sockets_wrapper.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\include\tls_freertos.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\transport_interface.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\retry_utils.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_lightweight.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt_state.h" />
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\standard\mqtt\include\mqtt.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aes.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aesni.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\arc4.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aria.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\asn1.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\asn1write.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\base64.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\bignum.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\blowfish.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\bn_mul.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\camellia.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ccm.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\certs.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\chacha20.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\chachapoly.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\check_config.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cipher.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cipher_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\cmac.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\compat-1.3.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\config.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ctr_drbg.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\debug.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\des.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\dhm.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecdh.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecdsa.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecjpake.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecp.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ecp_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\entropy.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\entropy_poll.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\error.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\gcm.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\havege.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\hkdf.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\hmac_drbg.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md2.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md4.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md5.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\md_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\memory_buffer_alloc.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\net.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\net_sockets.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\nist_kw.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\oid.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\padlock.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pem.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pk.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs11.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs12.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pkcs5.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\pk_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform_time.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\platform_util.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\poly1305.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\psa_util.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ripemd160.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\rsa.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\rsa_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha1.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha256.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\sha512.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_cache.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_ciphersuites.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_cookie.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_internal.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\ssl_ticket.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\threading.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\timing.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\version.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_crl.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_crt.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\x509_csr.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\xtea.h" />
+ <ClInclude Include="..\..\..\..\Source\mbedtls_utils\mbedtls_error.h" />
+ <ClInclude Include="mbedtls_config.h" />
+ <ClInclude Include="demo_config.h" />
+ <ClInclude Include="FreeRTOSConfig.h" />
+ <ClInclude Include="FreeRTOSIPConfig.h" />
+ <ClInclude Include="mqtt_config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project> \ No newline at end of file
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj.filters b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj.filters
index 2812cfa41..f547e5a2e 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj.filters
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_mutual_auth/WIN32.vcxproj.filters
@@ -399,6 +399,9 @@
<ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\transport\src\freertos_sockets_wrapper.c">
<Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform\freertos\transport\src</Filter>
</ClCompile>
+ <ClCompile Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\freertos\retry_utils\retry_utils_freertos.c">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\..\FreeRTOS-Plus\Source\FreeRTOS-Plus-TCP\include\NetworkInterface.h">
@@ -486,6 +489,9 @@
<ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\transport_interface.h">
<Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\..\Source\FreeRTOS-IoT-Libraries-LTS-Beta2\c_sdk\platform\include\retry_utils.h">
+ <Filter>FreeRTOS+\FreeRTOS IoT Libraries\platform</Filter>
+ </ClInclude>
<ClInclude Include="..\..\..\..\Source\mbedtls\include\mbedtls\aes.h">
<Filter>FreeRTOS+\mbedtls\include</Filter>
</ClInclude>
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_plain_text/DemoTasks/PlaintextMQTTExample.c b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_plain_text/DemoTasks/PlaintextMQTTExample.c
index e5ac5379a..87bac7ec1 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_plain_text/DemoTasks/PlaintextMQTTExample.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS-IoT-Libraries-LTS-Beta2/mqtt/mqtt_plain_text/DemoTasks/PlaintextMQTTExample.c
@@ -22,7 +22,6 @@
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
- * 1 tab == 4 spaces!
*/
/*
@@ -101,7 +100,7 @@
/**
* @brief Timeout for receiving CONNACK packet in milliseconds.
*/
-#define mqttexampleCONNACK_RECV_TIMEOUT_MS ( 1000U )
+#define mqttexampleCONNACK_RECV_TIMEOUT_MS ( 1000U )
/**
* @brief The topic to subscribe and publish to in the example.
@@ -109,28 +108,33 @@
* The topic name starts with the client identifier to ensure that each demo
* interacts with a unique topic name.
*/
-#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
+#define mqttexampleTOPIC democonfigCLIENT_IDENTIFIER "/example/topic"
+
+/**
+ * @brief The number of topic filters to subscribe.
+ */
+#define mqttexampleTOPIC_COUNT ( 1 )
/**
* @brief The MQTT message published in this example.
*/
-#define mqttexampleMESSAGE "Hello World!"
+#define mqttexampleMESSAGE "Hello World!"
/**
* @brief Dimensions a file scope buffer currently used to send and receive MQTT data
* from a socket.
*/
-#define mqttexampleSHARED_BUFFER_SIZE ( 500U )
+#define mqttexampleSHARED_BUFFER_SIZE ( 500U )
/**
* @brief Time to wait between each cycle of the demo implemented by prvMQTTDemoTask().
*/
-#define mqttexampleDELAY_BETWEEN_DEMO_ITERATIONS ( pdMS_TO_TICKS( 5000U ) )
+#define mqttexampleDELAY_BETWEEN_DEMO_ITERATIONS ( pdMS_TO_TICKS( 5000U ) )
/**
* @brief Timeout for MQTT_ProcessLoop in milliseconds.
*/
-#define mqttexamplePROCESS_LOOP_TIMEOUT_MS ( 500U )
+#define mqttexamplePROCESS_LOOP_TIMEOUT_MS ( 500U )
/**
* @brief Keep alive time reported to the broker while establishing an MQTT connection.
@@ -140,21 +144,21 @@
* absence of sending any other Control Packets, the Client MUST send a
* PINGREQ Packet.
*/
-#define mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS ( 60U )
+#define mqttexampleKEEP_ALIVE_TIMEOUT_SECONDS ( 60U )
/**
* @brief Delay between MQTT publishes. Note that the process loop also has a
* timeout, so the total time between publishes is the sum of the two delays.
*/
-#define mqttexampleDELAY_BETWEEN_PUBLISHES ( pdMS_TO_TICKS( 500U ) )
+#define mqttexampleDELAY_BETWEEN_PUBLISHES ( pdMS_TO_TICKS( 500U ) )
/**
* @brief Transport timeout in milliseconds for transport send and receive.
*/
-#define TRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
+#define mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS ( 200U )
-#define _MILLISECONDS_PER_SECOND ( 1000U ) /**< @brief Milliseconds per second. */
-#define _MILLISECONDS_PER_TICK ( _MILLISECONDS_PER_SECOND / configTICK_RATE_HZ ) /**< Milliseconds per FreeRTOS tick. */
+#define _MILLISECONDS_PER_SECOND ( 1000U ) /**< @brief Milliseconds per second. */
+#define _MILLISECONDS_PER_TICK ( _MILLISECONDS_PER_SECOND / configTICK_RATE_HZ ) /**< Milliseconds per FreeRTOS tick. */
/*-----------------------------------------------------------*/
@@ -190,9 +194,9 @@ static void prvCreateMQTTConnectionWithBroker( MQTTContext_t * pxMQTTContext,
NetworkContext_t * pxNetworkContext );
/**
- * @brief Function to update variable globalSubAckStatus with status
- * information from Subscribe ACK. Called by eventCallback after processing
- * incoming subscribe echo.
+ * @brief Function to update variable #xTopicFilterContext with status
+ * information from Subscribe ACK. Called by the event callback after processing
+ * an incoming SUBACK packet.
*
* @param Server response to the subscription request.
*/
@@ -208,7 +212,7 @@ static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo );
static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext );
/**
- * @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
+ * @brief Publishes a message mqttexampleMESSAGE on mqttexampleTOPIC topic.
*
* @param pxMQTTContext MQTT context pointer.
*/
@@ -262,7 +266,9 @@ static void prvEventCallback( MQTTContext_t * pxMQTTContext,
/*-----------------------------------------------------------*/
-/* @brief Static buffer used to hold MQTT messages being sent and received. */
+/**
+ * @brief Static buffer used to hold MQTT messages being sent and received.
+ */
static uint8_t ucSharedBuffer[ mqttexampleSHARED_BUFFER_SIZE ];
/**
@@ -287,16 +293,22 @@ static uint16_t usSubscribePacketIdentifier;
static uint16_t usUnsubscribePacketIdentifier;
/**
- * @brief Status of latest Subscribe ACK;
- * it is updated every time the callback function processes a Subscribe ACK.
+ * @brief A pair containing a topic filter and its SUBACK status.
*/
-static MQTTSubAckStatus_t xGlobalSubAckStatus = MQTTSubAckFailure;
+typedef struct topicFilterContext
+{
+ const char * pcTopicFilter;
+ MQTTSubAckStatus_t xSubAckStatus;
+} topicFilterContext_t;
/**
- * @brief Array to keep subscription topics.
- * Used to re-subscribe to topics that failed initial subscription attempts.
+ * @brief An array containing the context of a SUBACK; the SUBACK status
+ * of a filter is updated when the event callback processes a SUBACK.
*/
-static MQTTSubscribeInfo_t xGlobalSubscribeInfo;
+static topicFilterContext_t xTopicFilterContext[ mqttexampleTOPIC_COUNT ] =
+{
+ { mqttexampleTOPIC, MQTTSubAckFailure }
+};
/** @brief Static buffer used to hold MQTT messages being sent and received. */
@@ -327,7 +339,7 @@ void vStartSimpleMQTTDemo( void )
static void prvMQTTDemoTask( void * pvParameters )
{
- uint32_t ulPublishCount = 0U;
+ uint32_t ulPublishCount = 0U, ulTopicCount = 0U;
const uint32_t ulMaxPublishCount = 5UL;
NetworkContext_t xNetworkContext = { 0 };
MQTTContext_t xMQTTContext;
@@ -364,7 +376,7 @@ static void prvMQTTDemoTask( void * pvParameters )
prvMQTTSubscribeWithBackoffRetries( &xMQTTContext );
/**************************** Publish and Keep Alive Loop. ******************************/
- /* Publish messages with QOS0, send and process Keep alive messages. */
+ /* Publish messages with QoS0, send and process Keep alive messages. */
for( ulPublishCount = 0; ulPublishCount < ulMaxPublishCount; ulPublishCount++ )
{
LogInfo( ( "Publish to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
@@ -401,8 +413,11 @@ static void prvMQTTDemoTask( void * pvParameters )
xNetworkStatus = Plaintext_FreeRTOS_Disconnect( &xNetworkContext );
configASSERT( xNetworkStatus == PLAINTEXT_TRANSPORT_SUCCESS );
- /* Reset global SUBACK status variable after completion of subscription request cycle. */
- xGlobalSubAckStatus = MQTTSubAckFailure;
+ /* Reset SUBACK status for each topic filter after completion of subscription request cycle. */
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = MQTTSubAckFailure;
+ }
/* Wait for some time between two iterations to ensure that we do not
* bombard the public test mosquitto broker. */
@@ -414,15 +429,15 @@ static void prvMQTTDemoTask( void * pvParameters )
}
/*-----------------------------------------------------------*/
-static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkContext_t * pNetworkContext )
+static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkContext_t * pxNetworkContext )
{
PlaintextTransportStatus_t xNetworkStatus;
RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
RetryUtilsParams_t xReconnectParams;
/* Initialize reconnect attempts and interval. */
- xReconnectParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
RetryUtils_ParamsReset( &xReconnectParams );
+ xReconnectParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
/* Attempt to connect to MQTT broker. If connection fails, retry after
* a timeout. Timeout value will exponentially increase till maximum
@@ -436,11 +451,11 @@ static PlaintextTransportStatus_t prvConnectToServerWithBackoffRetries( NetworkC
LogInfo( ( "Create a TCP connection to %s:%d.",
democonfigMQTT_BROKER_ENDPOINT,
democonfigMQTT_BROKER_PORT ) );
- xNetworkStatus = Plaintext_FreeRTOS_Connect( pNetworkContext,
+ xNetworkStatus = Plaintext_FreeRTOS_Connect( pxNetworkContext,
democonfigMQTT_BROKER_ENDPOINT,
democonfigMQTT_BROKER_PORT,
- TRANSPORT_SEND_RECV_TIMEOUT_MS,
- TRANSPORT_SEND_RECV_TIMEOUT_MS );
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS,
+ mqttexampleTRANSPORT_SEND_RECV_TIMEOUT_MS );
if( xNetworkStatus != PLAINTEXT_TRANSPORT_SUCCESS )
{
@@ -517,6 +532,7 @@ static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo )
MQTTStatus_t xResult = MQTTSuccess;
uint8_t * pucPayload = NULL;
size_t ulSize = 0;
+ uint32_t ulTopicCount = 0U;
xResult = MQTT_GetSubAckStatusCodes( pxPacketInfo, &pucPayload, &ulSize );
@@ -524,8 +540,10 @@ static void prvUpdateSubAckStatus( MQTTPacketInfo_t * pxPacketInfo )
* from the event callback and non-NULL parameters. */
configASSERT( xResult == MQTTSuccess );
- /* Demo only subscribes to one topic, so only one status code is returned. */
- xGlobalSubAckStatus = pucPayload[ 0 ];
+ for( ulTopicCount = 0; ulTopicCount < ulSize; ulTopicCount++ )
+ {
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus = pucPayload[ ulTopicCount ];
+ }
}
/*-----------------------------------------------------------*/
@@ -534,22 +552,25 @@ static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext )
MQTTStatus_t xResult = MQTTSuccess;
RetryUtilsStatus_t xRetryUtilsStatus = RetryUtilsSuccess;
RetryUtilsParams_t xRetryParams;
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
+ bool xFailedSubscribeToTopic = false;
+ uint32_t ulTopicCount = 0U;
/* Some fields not used by this demo so start with everything at 0. */
- ( void ) memset( ( void * ) &xGlobalSubscribeInfo, 0x00, sizeof( MQTTSubscribeInfo_t ) );
+ ( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
/* Get a unique packet id. */
usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
/* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
- * only one topic and uses QOS0. */
- xGlobalSubscribeInfo.qos = MQTTQoS0;
- xGlobalSubscribeInfo.pTopicFilter = mqttexampleTOPIC;
- xGlobalSubscribeInfo.topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
+ * only one topic and uses QoS0. */
+ xMQTTSubscription[ 0 ].qos = MQTTQoS0;
+ xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
+ xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
/* Initialize retry attempts and interval. */
- xRetryParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
RetryUtils_ParamsReset( &xRetryParams );
+ xRetryParams.maxRetryAttempts = MAX_RETRY_ATTEMPTS;
do
{
@@ -562,8 +583,8 @@ static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext )
* messages received from the broker will have QOS0. */
LogInfo( ( "Attempt to subscribe to the MQTT topic %s.\r\n", mqttexampleTOPIC ) );
xResult = MQTT_Subscribe( pxMQTTContext,
- &xGlobalSubscribeInfo,
- sizeof( xGlobalSubscribeInfo ) / sizeof( MQTTSubscribeInfo_t ),
+ xMQTTSubscription,
+ sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
usSubscribePacketIdentifier );
configASSERT( xResult == MQTTSuccess );
@@ -579,19 +600,24 @@ static void prvMQTTSubscribeWithBackoffRetries( MQTTContext_t * pxMQTTContext )
xResult = MQTT_ProcessLoop( pxMQTTContext, mqttexamplePROCESS_LOOP_TIMEOUT_MS );
configASSERT( xResult == MQTTSuccess );
- /* Check if recent subscription request has been rejected. #xGlobalSubAckStatus is updated
- * in eventCallback to reflect the status of the SUBACK sent by the broker. It represents
+ /* Check if recent subscription request has been rejected. #xTopicFilterContext is updated
+ * in the event callback to reflect the status of the SUBACK sent by the broker. It represents
* either the QoS level granted by the server upon subscription, or acknowledgement of
* server rejection of the subscription request. */
- if( xGlobalSubAckStatus == MQTTSubAckFailure )
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
{
- LogWarn( ( "Server rejected subscription request. Attempting to re-subscribe to topic %s.",
- mqttexampleTOPIC ) );
- xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xRetryParams );
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus == MQTTSubAckFailure )
+ {
+ LogWarn( ( "Server rejected subscription request. Attempting to re-subscribe to topic %s.",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter ) );
+ xFailedSubscribeToTopic = true;
+ xRetryUtilsStatus = RetryUtils_BackoffAndSleep( &xRetryParams );
+ break;
+ }
}
configASSERT( xRetryUtilsStatus != RetryUtilsRetriesExhausted );
- } while( ( xGlobalSubAckStatus == MQTTSubAckFailure ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
+ } while( ( xFailedSubscribeToTopic == true ) && ( xRetryUtilsStatus == RetryUtilsSuccess ) );
}
/*-----------------------------------------------------------*/
@@ -605,10 +631,10 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
* asserts().
***/
- /* Some fields not used by this demo so start with everything at 0. */
+ /* Some fields are not used by this demo so start with everything at 0. */
( void ) memset( ( void * ) &xMQTTPublishInfo, 0x00, sizeof( xMQTTPublishInfo ) );
- /* This demo uses QOS0. */
+ /* This demo uses QoS0. */
xMQTTPublishInfo.qos = MQTTQoS0;
xMQTTPublishInfo.retain = false;
xMQTTPublishInfo.pTopicName = mqttexampleTOPIC;
@@ -626,16 +652,27 @@ static void prvMQTTPublishToTopic( MQTTContext_t * pxMQTTContext )
static void prvMQTTUnsubscribeFromTopic( MQTTContext_t * pxMQTTContext )
{
MQTTStatus_t xResult;
+ MQTTSubscribeInfo_t xMQTTSubscription[ mqttexampleTOPIC_COUNT ];
+
+ /* Some fields not used by this demo so start with everything at 0. */
+ ( void ) memset( ( void * ) &xMQTTSubscription, 0x00, sizeof( xMQTTSubscription ) );
+
+ /* Get a unique packet id. */
+ usSubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
+
+ /* Subscribe to the mqttexampleTOPIC topic filter. This example subscribes to
+ * only one topic and uses QoS0. */
+ xMQTTSubscription[ 0 ].qos = MQTTQoS0;
+ xMQTTSubscription[ 0 ].pTopicFilter = mqttexampleTOPIC;
+ xMQTTSubscription[ 0 ].topicFilterLength = ( uint16_t ) strlen( mqttexampleTOPIC );
/* Get next unique packet identifier. */
usUnsubscribePacketIdentifier = MQTT_GetPacketId( pxMQTTContext );
- /* Send UNSUBSCRIBE packet. Note that because #xGlobalSubscribeInfo
- * was initialized before sending the SUBSCRIBE packet, there is no need
- * to initialize it again. */
+ /* Send UNSUBSCRIBE packet. */
xResult = MQTT_Unsubscribe( pxMQTTContext,
- &xGlobalSubscribeInfo,
- sizeof( xGlobalSubscribeInfo ) / sizeof( MQTTSubscribeInfo_t ),
+ xMQTTSubscription,
+ sizeof( xMQTTSubscription ) / sizeof( MQTTSubscribeInfo_t ),
usUnsubscribePacketIdentifier );
configASSERT( xResult == MQTTSuccess );
@@ -645,6 +682,8 @@ static void prvMQTTUnsubscribeFromTopic( MQTTContext_t * pxMQTTContext )
static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
uint16_t usPacketId )
{
+ uint32_t ulTopicCount = 0U;
+
switch( pxIncomingPacket->type )
{
case MQTT_PACKET_TYPE_SUBACK:
@@ -652,14 +691,17 @@ static void prvMQTTProcessResponse( MQTTPacketInfo_t * pxIncomingPacket,
/* A SUBACK from the broker, containing the server response to our subscription request, has been received.
* It contains the status code indicating server approval/rejection for the subscription to the single topic
* requested. The SUBACK will be parsed to obtain the status code, and this status code will be stored in global
- * variable globalSubAckStatus. */
+ * variable #xTopicFilterContext. */
prvUpdateSubAckStatus( pxIncomingPacket );
- if( xGlobalSubAckStatus != MQTTSubAckFailure )
+ for( ulTopicCount = 0; ulTopicCount < mqttexampleTOPIC_COUNT; ulTopicCount++ )
{
- LogInfo( ( "Subscribed to the topic %s with maximum QoS %u.\r\n",
- mqttexampleTOPIC,
- xGlobalSubAckStatus ) );
+ if( xTopicFilterContext[ ulTopicCount ].xSubAckStatus != MQTTSubAckFailure )
+ {
+ LogInfo( ( "Subscribed to the topic %s with maximum QoS %u.\r\n",
+ xTopicFilterContext[ ulTopicCount ].pcTopicFilter,
+ xTopicFilterContext[ ulTopicCount ].xSubAckStatus ) );
+ }
}
/* Make sure ACK packet identifier matches with Request packet identifier. */