cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

joMa_1809706
Contributor

Dev kit 3.5.2

Note I'm NOT using the AWS IoT (I have that working fine)

I can connect to HiveMQ broker fine  (iot.eclipse.org) using the unsecured example.

When using the snip.secure_mqtt example (modified with host lookup: if (wiced_hostname_lookup( MQTT_BROKER, &broker_address, 30000 ) != WICED_SUCCESS)

it hangs trying to connect.

I am using the supplied certificate in the example.

Is there something I'm missing in my setup?

0 Likes
8 Replies
AxLi_1746341
Honored Contributor

jmartin wrote:

Dev kit 3.5.2

Note I'm NOT using the AWS IoT (I have that working fine)

I can connect to HiveMQ broker fine  (iot.eclipse.org) using the unsecured example.

When using the snip.secure_mqtt example (modified with host lookup: if (wiced_hostname_lookup( MQTT_BROKER, &broker_address, 30000 ) != WICED_SUCCESS)

it hangs trying to connect.

I am using the supplied certificate in the example.

Is there something I'm missing in my setup?

You need to use the certificate from http://iot.eclipse.org/iot.eclipse.org.crt

And also make sure using encrypted port 8883.

0 Likes
joMa_1809706
Contributor

It still hangs when trying to open the connection.

Also if the certificate was a problem shouldn't the call to open return a certificate error rather than hanging?

0 Likes
VikramR_26
Employee

can you point to which secure iot.eclipse.org you are referring to ?

0 Likes
joMa_1809706
Contributor

#define MQTT_BROKER "iot.eclipse.org"

if (wiced_hostname_lookup( MQTT_BROKER, &broker_address, 30000 ) != WICED_SUCCESS)

{

WPRINT_APP_INFO(("broker lookup failed\n"));

}

else

{

WPRINT_APP_INFO(("[MQTT] Connecting to broker %u.%u.%u.%u ...\n", (uint8_t)(GET_IPV4_ADDRESS(broker_address) >> 24),

(uint8_t)(GET_IPV4_ADDRESS(broker_address) >> 16),

(uint8_t)(GET_IPV4_ADDRESS(broker_address) >> 8),

(uint8_t)(GET_IPV4_ADDRESS(broker_address) >> 0)));

}

Which gives

Connecting to broker 198.41.30.241 ...

0 Likes
VikramR_26
Employee

Yes thats correct, I meant where in eclipse IoT you are referring to their secured connection ? Can you point me to a link where they describe their secure connection to their broker?

0 Likes
joMa_1809706
Contributor

No, axel.lin pointed me to the cert. I don’t know how he found it. (see earlier post)

0 Likes
VikramR_26
Employee

Whats the use case you are trying ?

0 Likes
joMa_1809706
Contributor

The secure_mqtt project in sdk 3.5.2

0 Likes