Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

ELS61 ER2 with PAHO MQTT: 112 SSL-Error: mp_exptmod error state | Telit Cinterion IoT Developer Community

September 23, 2021 - 8:21am, 2332 views

Good morning,

we are a proud user of a new module based on ELS61ER2.

We are using the Eclipse PAHO Mqtt library shared in this forum for connecting to MQTT. We manged it to use TLS encryption for different modules now (EHS5 ARev >42, ELS61 ER1). We created our own CA and certificates for our servers.

With new module ELS61ER2 we received two different errors (depending on configuration):
- Unable to connect to server (32103) - -112 SSL-Error: mp_exptmod error state
- Unable to connect to server (32103) - TLS/SSL: SNI extension used without domain

The second error occurs if we try to connect with ip (e.g. ssl:// The ip is inside certificate's SAN. This worked with older devices.
The first error occurs if we connect via dns name: (e.g. ssl://

We followed the code until this fragment in

 public void start() throws IOExceptionMqttException {
        final String methodName = "start";
        try {
            log.fine(className, methodName, "252"new Object[] { uri });
            connection = (SecureConnection);
            connection.setSocketOption(SocketConnection.LINGER, 5); 
            in = connection.openInputStream();
            out = connection.openOutputStream();
        } catch (IOException ex) {
            // @TRACE 250=Failed to create TCP socket
            log.fine(className, methodName, "250"null, ex);
            throw new MqttException(
                    MqttException.REASON_CODE_SERVER_CONNECT_ERROR, ex);

At this place the exception is thrown but I have no clue why.

On our server side I see the connection but it breaks before payload is transmitted. So I'm going to prepare everything again for dumping the network traffic. But maybe someone already has better idea or can say someone about the error message? laugh

Best regards

Kris Budde