Cinterion® Connect Shield: Library
Documentation, October 16, 2017 - 6:50am, 1725 views
FInally, we are able to present you our Arduino based library for your Cinterion® Connect Shield.
This library contains some examples to easily let you start your project idea!
A basic example how to use the Cinterion Connect Shield and register to the network is here avilable:
There are also two more examples, which show how to prepare your sketch for publishing and subscribing MQTT messages:
Note: To use the MQTT example you need to download and copy the Arduino MQTT library to your libraries.
Plug your Cinterion Connect Shield directly on your Arduino. The library uses the pin mapping below.
Therefore you are free to stack some other shields on top.
Next, you should download the library and place it into the directory where you have your other Arduino libraries.
Now you just need to create a new sketch and add:
then, create an object of class:
and start using it!
By default in ourMQTT example you will find the https://test.mosquitto.org/ server which for the first steps to get you project running is a good example because you do not need to create an account.
To test if something is published you can use the webinterface from HiveMQ.
Simply add as host : test.mosquitto.org
Use as port: 8080
Add the 'ClientID' and 'Topic' and you can start!
MQTT with Java
Depending on your project it could be usefull to let embedded Java from the ELS61 handle the MQTT connection and other tasks.
The benefit is that you can use the Arduino C code handle the module/ sensors and actors and let Java do the communication to the server/cloud. This idea of sharing resources is pretty common.
For an example check out the article:
The Cinterion Connect Shield as default uses the main serial connection which is also used for Arduino programing.
Therefore, if the LTE device is enabled during Arduino programing (loading a new software) it may brake the transmission and the programing fails.
Please turn off the LTE device for programing - press the ON/OFF button for at least 3 seconds.
Of course the library does not include everything. The main reason is to leave you enough space on your Arduino for your own application. If you desire some additional examples or modifications let us know!