Thingstream Cinterion MIDlet - MQTT-SN 1.2 / MQTT 3.1.1
Showcase, February 20, 2019 - 4:06pm, 579 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
- 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.
- 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.
- 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.
- Navigate to the downloads page and click on the Thingstream group.
- Click to download the Gemalto MIDlet client.
- Unzip the download into a folder of your choosing.
- 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.
- 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.
- Start by uploading the MIDlet (upload_midlet.zrx) and then installing the MIDlet (install_midlet.zrx)
- Next you will need to start the MIDlet, run the start script (start_midlet.zrx)
- At this point you can run the example and observe the connection, publishing and disconnection steps (example_test.zrx)
- 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:
- Select 'Flows' from the sidebar
- Select 'Create Flow' and then 'From Flow Library'.
- 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.
- From the overflow menu of your new Flow, select 'Deploy Test', Select Version 1.0.0
- In the 'What would you like to listen to?' section enter 'my-first-topic' as a subscription path and click Next and then Deploy.
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 email@example.com