This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC3220S-LAUNCHXL: wifi_doorlock Project: Mqtt

Part Number: CC3220S-LAUNCHXL
Other Parts Discussed in Thread: CC3220S, CC3200

Tool/software: TI-RTOS

wifi_doorlock Project: Mqtt :  If Subscription topic increased above 4 , it throws Subscription error.

Hello,
We are using project "wifi_doorlock_CC3220S_LAUNCHXL_tirtos_ccs".
There are 4 subscription topics by default. In our design we need 7 subscription topics.
We are able to connect and subscribe to any (default or customized)4 topic.
But if I add any new topic & increase count to 5. The code give subscription error -4.
How to add more topic?
What is missing ?

FYR, Here are the changes we have made:
*************wifi_doorlock_app.h********************
#define SUBSCRIPTION_TOPIC_COUNT 9

#define SUBSCRIPTION_TOPIC0 "/Broker/To/cc32xx/doorLock"
#define SUBSCRIPTION_TOPIC1 "/cc3220/doorLock/%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x/LockControl"
#define SUBSCRIPTION_TOPIC2 "/cc3220/doorLock/%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x/LockStatus"
#define SUBSCRIPTION_TOPIC3 "/cc3220/doorLock/%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x/LockOTA"
#define SUBSCRIPTION_TOPIC4 "/cc3200/status" // #MQTT_TOPIC
#define SUBSCRIPTION_TOPIC5 "/cc3220/UpReq"
#define SUBSCRIPTION_TOPIC6 "/cc3220/UpResp"
#define SUBSCRIPTION_TOPIC7 "/cc3220/DownReq"
#define SUBSCRIPTION_TOPIC8 "/cc3220/DownResp"


***********mqtt_client_task.c************************
char *topic[SUBSCRIPTION_TOPIC_COUNT] =
{ SUBSCRIPTION_TOPIC0, SUBSCRIPTION_TOPIC1, \
SUBSCRIPTION_TOPIC2, SUBSCRIPTION_TOPIC3, \
SUBSCRIPTION_TOPIC4, SUBSCRIPTION_TOPIC5, SUBSCRIPTION_TOPIC6, SUBSCRIPTION_TOPIC7, SUBSCRIPTION_TOPIC8 };

unsigned char qos[SUBSCRIPTION_TOPIC_COUNT] =
{ MQTT_QOS_0, MQTT_QOS_0, MQTT_QOS_0, MQTT_QOS_0, \
MQTT_QOS_0, MQTT_QOS_0, MQTT_QOS_0, MQTT_QOS_0, MQTT_QOS_0 };