Problem with AWS (pls62t-w) | Telit Cinterion IoT Developer Community
January 9, 2020 - 11:21am, 1277 views
Hi,
I am trying to connect an pls62t-w to AWS IOT, using MQTT with SSL. After installing the security certificates on the module, I was temporarily able to receive data on my AWS iot dashboard. However, I have now stumbled across an error every time the terminal tries to connect to AWS. The error code is
[MqttMessenger]: MqttException connect() system error:
reason 32103
msg Unable to connect to server
loc Unable to connect to server
cause javax.microedition.pki.CertificateException: Certificate failed verification
excep Unable to connect to server (32103) - javax.microedition.pki.CertificateException: Certificate failed verification
My current firmware version is
ATICinterion
PLS62-W
REVISION 02.000
Hello,
If you have installed the certificates and activated the http certificate verification (and rebooted the module) and it was possible to connect without any exceptions, it's like an evidence that the certs were converted and loaded properly. Have you changed anything after that? Did you try to delete certificates from the module and load again? What's AT^SJMSEC? answer?
The exception clearly states that the certificate verification failed. Is it possible that the connection was only working before the module was rebooted (which is needed after certificates loading)?
I'm not sure at the moment if the certificate date is also verified, if so you'd also have to set the correct date on the module.
Best regards,
Bartłomiej
Hi,
Thanks for getting back to me so shortly.
AT^SJMSEC?^SJMSEC: 1,1,1,1,0,0
I have reinstalled the certificates to the module with no luck. Sometimes it manages to establish a connection with the broker as the AWS iot analytics shows some successful connections.
I have reinstalled a jad file which is able to connect to AWS and publish messages. I have made sure that the correct broker address is used. It was able to successfully publish data two days ago, however now it does not work. The error messages that it keeps showing are the following:
#----Started Main Applet----#
[Main]: ------------ Settings from JAD ------------
[Main]: JAD id: .. 1035
[Main]: JAD broker: ssl://a21g22klfb6x4u-ats.iot.us-west-2.amazonaws.com
[Main]: JAD brokerUser: null
[Main]: JAD brokerPass: null
[Main]: JAD setAPN: wap.vodafone.co.uk
[Main]: JAD setUser: Vodaphone
[Main]: JAD setPass: null
[Main]: JAD awsTopic: unitedutilities
[Main]: ------------------- end -------------------
[MQTT]: PAHO Version = @@VERSION@@
[MQTT]: Found APN defined as 'setAPN:' in .JAD file
[MQTT]: MqttClient sampleClient = new MqttClient(broker, clientId, persistence);
[MQTT]: MqttConnectOptions connOpts = new MqttConnectOptions()
[MQTT]: Connecting to broker: ssl://a21g22klfb6x4u-ats.iot.us-west-2.amazonaws.com
Connection state: CONNECTING
Connection state: UP
Connection state: UP
[MQTT]: MqttException system error:
reason 32103
msg Unable to connect to server
loc Unable to connect to server
cause javax.microedition.pki.CertificateException: Certificate failed verification
excep Unable to connect to server (32103) - javax.microedition.pki.CertificateException: Certificate failed verification
[MQTT]: MqttException system error:
reason 32101
msg Client is disconnected
loc Client is disconnected
cause null
excep Client is disconnected (32101)
[MQTT]: Disconnected
java.lang.NullPointerException: 0
- Main.destroyApp(Main.java:174)
- Main.startApp(Main.java:94)
- javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
- com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=261
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
[MQTT]: MqttException system error:
reason 32101
msg Client is disconnected
loc Client is disconnected
cause null
excep Client is disconnected (32101)
[MQTT]: Disconnected
java.lang.NullPointerException: 0
- Main.destroyApp(Main.java:174)
- javax.microedition.midlet.MIDletTunnelImpl.callDestroyApp(), bci=2
- com.sun.midp.midlet.MIDletPeer.destroyApp(), bci=6
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=385
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
MIDlet:Main abnormal exit
Thanks
Hello,
I think that most probably you may have installed the certificates 2 days ago without rebooting the module and that's why the connection was still working until the reboot when it stopped to work. That would mean that the certificates are wrong - possibly not correctly formatted.
The only thing that does not match is that you say that "the AWS iot analytics shows some successful connections". Maybe the successful connections were logged when everything was still working. If it is really true that the connection still succeeds randomly from time to time, we still know nothing, at least I can't explain how it could be possible.
Regards,
Bartłomiej