Mosquitto broker via Mqtt: (error)
1491560759: New connection from 89.114.125.123 on port 8883.
1491560759: OpenSSL Error: error:140940E5:SSL
routines:SSL3_READ_BYTES:ssl handshake failure
1491560759: Socket error on client <unknown>,
disconnecting.
Mosquitto broker via websockets: (success)
1491568948: New client connected from 89.114.125.123 as
websocket_client_86f8624b (c1, k60, u'admin').
1491568948: Sending CONNACK to websocket_client_86f8624b (0,
0)
1491568948: Received SUBSCRIBE from websocket_client_86f8624b
1491568948: tedayc/# (QoS 0)
1491568948: websocket_client_86f8624b 0 tedayc/#
1491568948: Sending SUBACK to websocket_client_86f8624b
1491568949: Received PUBLISH from websocket_client_86f8624b
(d0, q0, r0, m0, 'tedayc/websocket_client_86f8624b', ... (9
bytes))
1491568949: Sending PUBLISH to websocket_client_86f8624b (d0,
q0, r0, m0, 'tedayc/websocket_client_86f8624b', ... (9 bytes))
I think i need to send the ca certificate via mqtt but i dont have extra options or parameters to send it. My function only asks for the username and the password.
/**
* \brief Send MQTT connect message to broker server with
MQTT parameter.
* If operation of this function is complete,
MQTT_CALLBACK_CONNECTED event will be sent through MQTT
callback.
*
* \param[in] module_inst Instance of MQTT module.
* \param[in] clean_session If this value set to 1,
Broker server store the previous subscribed informations
after disconnected.
* \param[in] id ID of user.
* \param[in] password Password of user.
* \param[in] client_id Client ID of this connection.
* \param[in] will_topic A MQTT topic that will be
sent to subscribers when this connection is disconnected.
* \param[in] will_msg A MQTT payload that will be
sent to subscribers when this connection is disconnected.
* \param[in] will_qos QOS level of will message.
* \param[in] will_retain Whether broker server will be
store MQTT will message or not.
*
* \return 0 Function succeeded
* \return -ENOENT No such address.
* \return -EINVAL Invalid argument.
* \return -ENOSPC No space left on device.
* \return -EIO Device was occurred error due
to unknown exception.
* \return -EDESTADDRREQ Destination address required.
* \return -ECONNRESET Connection reset by peer.
* \return -EAGAIN Try again.
* \return -EBUSY Device or resource busy.
* \return -EADDRINUSE Address already in use.
* \return -EALREADY Socket already connected.
* \return -ENOTCONN Service in bad state.
* \return -ECONNREFUSED Connection refused.
* \return -EOVERFLOW Value too large for defined
data type.
* \return -EBADMSG Not a data message.
*/
int mqtt_connect_broker (struct mqtt_module
*const module, uint8_t clean_session, const char *id, const
char *password, const char *client_id, const char
*will_topic, const char *will_msg, uint32_t will_msg_len,
uint8_t will_qos, uint8_t will_retain);
mqtt_connect_broker(&module_inst,
1, MAIN_MQTT_USERNAME, MAIN_MQTT_PASSWORD, mqtt_user,
NULL, NULL, 0, 0, 0);