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

You are here

Telit Cinterion IoT Developer Community

AT Command MQTT client

Showcase, January 22, 2019 - 4:37pm, 32667 views

This project allows you to use our, more recent, Java modules as simple MQTT clients.
Just use AT Commands - no Java programming needed.

The MQTT client is made possible via the Thales IoT Java AT Command Extensions (JAT).
Both Plain text :1883 and TLS 1.2 secure sockets :8883 Broker connections can be used (even AWS).

You can add new AT Commands to the ELS61 rel 1 "MR" / ELS61 rel 2 / PLS62-W rel 2 and EHSx rel 4 modules. URCs are generated showing broker connections, loss, and reconnections.

Publishing JSON formatted strings is supported, see the attached documentation for the syntax needed.

Publishing HEX formatted binary byte[] strings is supported, see the attached documentation for the syntax needed.

 

+PBREADY

 

at^sjam=1,"a:/ATSJMQTT.jad",""

OK

^SYSSTART_EXTENDED_AT

 

at^sjmqtt="tcp://broker.hivemq.com:1883","","","ATSJMQTTDemo","ATSJMQTTDemoListener","bearer_type=gprs;access_point=internet;username=;password=;timeout=30"

OK

 

at^sjmqtt="open"

OK

^SJMQTT: 'ATSJMQTTDemoListener'/****** - from your friendly broker :)'

 

at^sjmqtt="pub","The module says a big MQTT client Hello back to the broker"

OK

at^sjmqtt="pub","{'JSON style temperature': '35 degrees C'}"

OK

at^sjmqtt="close"

OK

 

at^sjam=2,"a:/ATSJMQTT.jad",""

OK

^SYSSTART

MQTT Dashboard

 

Netbeans 7.2 offline install: https://iot-developer.thalesgroup.com/tutorial/netbeans-72-offline-insta...

See other related articles:

https://iot-developer.thalesgroup.com/tutorial/data-transfer-methods-mqt...

https://iot-developer.thalesgroup.com/tutorial/flash-file-system-access-...
https://iot-developer.thalesgroup.com/tutorial/flash-file-system-access-...

21 - 27 of 27 Comments

Pages

Hi

You mentioned that this Java code can be used in PLS62-W Rel.2, that mean it's PLS62-W A100? Because I have never seen PLS62-W A200. Thanks a lot.

Hi,

Yes the PLS62-W rel 2 is ordered using the SAP order code ending -A100

Best regards
Simon

Hi MULLENGERS

How do we specify mqtt client id using your client?

Is there any possibility to support web sockets?

The client ID will normally be your module's unique IMEI number, see MqttMessenger.start(...). If this not used/not found then we resort to using a PAHO generated random unique client ID.

For the full PAHO MQTT sources, ported to the EHSx/ELS61/PLS62:
See https://iot-developer.thalesgroup.com/showcase/paho-project-110-july-201...

For the full "_Comman.jar" sources (of which the "wrapper" class MqttMessenger.java might be of interest):
See https://iot-developer.thalesgroup.com/showcase/cinterion-ehs6ehs8-concep...
 

Hi

I can succsessfully connect to test.mosquitto.org:1883 without username and password. However, when I try to connect to other brokers that require username and password, it will not connect. Any hints on how to solve this?

Regards

My above issue is resolved. Than

Dear Simon, I would like to compile this test that appears in the src.zip file but main.java ***** other complementary files such as atchandler.java ; connectionmanager.java...etc.

Where do I get these files?

Thanks

21 - 27 of 27 Comments

Pages

Author

mullengers's picture
mullengers