AnyCloud_MQTT_Client Build error with MQTT_SECURE_CONNECTION (0)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
raya_4824241
Level 1
Level 1
10 sign-ins 5 sign-ins First like received

I am trying to run on a local network with an unsecure connection to an MQTT broker.

The AnyCloud_MQTT_Client example fails to build if I change the MQTT_SECURE_CONNECTION to 0.

Is something else that needs to be changed besides this?  It will fail to build even if I only change this one setting.  I know that once it can build that I'll need to update the WiFi and Broker settings to operate it.

I am using MTB 2.3.1 and the AnyCloud_MQTT_Client latest-v3.X d0325cb.  BSP CY8CKIT-062S2-43012

Here is the build error:

source/mqtt_client_config.c:118:38: error: conflicting types for 'security_info'
118 | struct cy_awsport_ssl_credentials_t *security_info = NULL;

In file included from source/mqtt_client_config.c:44:
./configs/mqtt_client_config.h:192:39: note: previous declaration of 'security_info' was here
192 | extern cy_awsport_ssl_credentials_t *security_info;

0 Likes
1 Solution
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Please remove the keyword "struct" from struct cy_awsport_ssl_credentials_t *security_info = NULL; 

This line as provided by you is given in source/mqtt_client_config.c:118:38:

After removing the keyword, your build will pass. Let me know if you still face issues.

Thanks

Aditi

View solution in original post

2 Replies
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Please remove the keyword "struct" from struct cy_awsport_ssl_credentials_t *security_info = NULL; 

This line as provided by you is given in source/mqtt_client_config.c:118:38:

After removing the keyword, your build will pass. Let me know if you still face issues.

Thanks

Aditi

Thanks, tried that last night and everything is working.