Gemalto is now part of the Thales Group, find out more.

You are here

Thingstream Cinterion MIDlet - MQTT 3.1.1

Showcase, February 20, 2019 - 4:06pm, 483 views

Thingstream provide global, enterprise-grade connectivity for IoT devices, using the MQTT-SN protocol.  The Thingstream Cinterion MIDlet has been produced to allow developers using Gemalto EHSx series devices to quickly leverage Thingstream's low cost, low power, global connectivity for their applications.

How to use the Gemalto EHSx series device to communicate using MQTT-SN and Thingstream

  1. Navigate to the Thingstream home page - https://portal.thingstream.io and register to get started with a free account providing a valid email and your chosen domain name.
  2. If you haven't already done so, you will need to order a Thingstream SIM from the Shop.  Select the 'Shop' link from the sidebar, click through and purchase an IoT SIM.
  3. Once you have received your SIM you will need to ensure that it is activated. Select the 'Things' link from the sidebar and locate your SIM in your list of Things.  The device name should include an 18 digit number that starts with '8944'. Select the 'Thing' in the list and on the details page of the slide out you will find an option to activate the Thing.  Once active, insert the SIM into the Gemalto device.
  4. Navigate to the downloads page and click on the Thingstream group.
  5. Click to download the Gemalto MIDlet client.
  6. Unzip the download into a folder of your choosing.
  7. In a folder named 'scripts' within the download, are Zoc scripts that enable you to upload, install, start and stop the Thingstream MIDlet.  There is also an example test script showing interaction with the Gemalto device via the MIDlet.
  8. NB it is VERY important before attempting to use the upload script that you edit the file and change the path to the Jad and Jar to the path to your unzipped download folder.
  9. Start by uploading the MIDlet (upload_midlet.zrx) and then installing the MIDlet (install_midlet.zrx)
  10. Next you will need to start the MIDlet, run the start script (start_midlet.zrx)
  11. At this point you can run the example and observe the connection, publishing and disconnection steps (example_test.zrx)
  12. Finally, when you have finished interacting with the Gemalto device via the MIDlet, stop it by running the stop script (stop_midlet.zrx).

Documentation covering installation and usage of the Thingstream MIDlet (Thingstream_Cinterion_Midlet_v1.0.pdf) is located in the unzipped gemalto-MIDlet folder.

The payload from (example_test.zrx) will be published to the MQTT topic, 'my-first-topic' which has been registered for you in your Thingstream domain. There is also a flow called 'Simple Email Payload' which was created during registration.  This flow is subscribed to the 'my-first-topic' topic, and will respond to payloads received on this topic by sending an email containing the message payload to the registered domain owner. 

If you do not have this flow in your domain, here is how to get started:

  1. Select 'Flows' from the sidebar
  2. Select 'Create Flow' and then 'From Flow Library'.
  3. Select the 'Universal' group and then look for 'Simple Email Payload' in the list of flows and select it.  Click on copy, to add the flow to your domain.

    Downloading a flow from the Library 

  4. From the overflow menu of your new Flow, select 'Deploy Test', Select Version 1.0.0

    Deploy a test Flow 

  5. In the 'What would you like to listen to?' section enter 'my-first-topic' as a subscription path and click Next and then Deploy.

    The Flow will Listen to...

Your Flow will now be set up to email the payload from your Gemalto device, to the email account used when creating the Thingstream domain.

If you have any questions about this, or need some help getting everything set up, please contact support@thingstream.io

Thingstream