Hello
I want to use an encryptes MQTT connection in all my B4J projects.
My local Mosquitto MQTT broker has been configured to use TLS with a server and client certificate, both self signed, but there is no option in the library to parse the certificate to setup the connection.
I followed this tutorial in order to accept self signed certificate with the
I also configured Mosquitto with the following line
The application itselfs does not make a correct connection to the broker, not even a failed connection was found in the Mosquitto log files.
The only log message I receive from jMQTT is this:
I provided the MQTTConnector module as an attachment of this post.
All the variables from the connection are parsed out of a config file.
Can somebody help me further with this?
Thank you in advance!
I want to use an encryptes MQTT connection in all my B4J projects.
My local Mosquitto MQTT broker has been configured to use TLS with a server and client certificate, both self signed, but there is no option in the library to parse the certificate to setup the connection.
I followed this tutorial in order to accept self signed certificate with the
TrustAll
method that was provided there, but no succes.I also configured Mosquitto with the following line
require_certificate false
that I got from this tutorial, but that also didn't help.The application itselfs does not make a correct connection to the broker, not even a failed connection was found in the Mosquitto log files.
The only log message I receive from jMQTT is this:
B4X:
Waiting for debugger to connect...
shell switching to alternate port: 9054
shell switching to alternate port: 9055
Program started.
13/07/2022 12:15:14 Succesfully connected to MQTTBROKER mosquitto-mqtt-001
Logging disabled
13/07/2022 12:15:15 Connection to MQTTBROKER is false
13/07/2022 12:15:15 Error message: java.io.EOFException$
(EOFException) java.io.EOFException
13/07/2022 12:15:20 Trying to reconnect to MQTT broker mosquitto-mqtt-001
13/07/2022 12:15:20 Succesfully connected to MQTTBROKER mosquitto-mqtt-001
13/07/2022 12:15:21 Connection to MQTTBROKER is false
13/07/2022 12:15:21 Error message: java.io.EOFException$
(EOFException) java.io.EOFException
I provided the MQTTConnector module as an attachment of this post.
All the variables from the connection are parsed out of a config file.
Can somebody help me further with this?
Thank you in advance!
Attachments
Last edited: