7: Connect to the IoT Cloud

In this chapter, you will register your device with Sierra Wireless’ AirVantage IoT Acceleration platform (a cloud-based service to collect data from your device), and begin sending / receiving data.

Note:   If you have a Sierra Wireless SIM provided with the kit, you must register your device (and SIM) in AirVantage, which will activate the SIM.

7.1 Claim Your Free AirVantage Account

Your mangOH Red kit includes a free mangOH-customized account on the AirVantage IoT Acceleration Platform for your CF3 module. This platform provides Sierra Wireless’ cloud-based services for over-the-air (OTA) device management and application enablement. These services provide the infrastructure for you to build, connect, and operate your IoT applications in a single platform.

Note:   You can register up to five devices on your free account.

To use AirVantage, you must register your device and then connect your mangOH Red to the AirVantage server. If you have an AirVantage account for non-mangOH devices, register for a new account for your mangOH device(s) to enable access to the mangOH-specific customizations.

7.1.1 Register / Log In to AirVantage

1.In a browser, go to https://eu.airvantage.net/accounts/signup?type=Mangoh.



2.If you already have a mangOH AirVantage account, click the link in the AirVantage Login section and go to Step 10. Otherwise, continue to the next step.

3.Enter your registration details, including:

·First and last names

·Email address

Important:   Use a valid email address —This is your username for accessing AirVantage, and is needed to complete the registration process.

·Company   Descriptive name to identify this AirVantage account. Use a unique name such as a combi­nation of your company name, the project name, your name, etc.

Important:   Company name must be unique  If the name has been used by any other person to set up their account, you will have to change this to make it unique.

·Phone number  Use international format (for example, for North American phone numbers, use "001" plus the 10-digit area code and phone number).

4.Review the Terms of Service and select "I agree to the Terms of Service".

5.Click Signup.

An email is sent automatically to your email address with a confirmation link.

6.Open the email and click the link to confirm your signup request.



7.When your browser opens to confirm the signup request, enter a password that satisfies the requirements shown on-screen, and re-enter it to confirm.



8.Click Save.

If your password is acceptable, You will receive an email to confirm your account creation.



9.Click the link to go to http://eu.airvantage.net/start. The AirVantage Login screen appears.

10.Enter your account’s email address and password, and click Log In.



11.The first time you log in to your AirVantage account, a walkthrough tutorial appears.

If you don’t want to use it, click Skip. Otherwise, click Next to step through it.



12.If you did not record your SIM’s ICCID and your device’s FSN and IMEI earlier, record them now:

a.Connect to the mangOH Red:

$ ssh root@ 

b.Display the device information (including the FSN and IMEI):

# cm info 

c.Display the SIM information (including the ICCID):

# cm sim info 

13.In the mangOH tile, click Register.



14.In the Register a new mangOH window, enter your SIM and device’s information:



·SIM ICCID  Enter the SIM’s ICCID.

·WP IMEI  Enter the module’s IMEI.

·WP S/N  Enter the module’s FSN.

Note:   Your device and SIM are linked in AirVantage. If you change your SIM at some point after registering the device, you will have to unlink the module from the SIM, and then re-register the device with a new SIM:
On the dashboard, select More > Edit, clear the IMEI and Serial Number, and click Save. Then re-register the device with your new SIM ICCID.

15.Click Register.

Note:   If you are using a Sierra Wireless SIM provided with the kit, it is now activated and your CF3 module will be able to register on a mobile network.

16.Click Monitor, then select Systems to display your registered devices.



17.Click anywhere in the line showing your device to display the device dashboard (System Details) screen. (All the devices registered on your account appear in this list; make sure to click the correct device.)



18.The device dashboard displays:

·System information  Device registration details (ICCID, IMEI, Serial Number), month-to-date SIM data usage, and more.



·Last Communication  Details about the most recent communication from / to your device, plus a link to a full list of all communications.



·Provisioning options  Details about the SIMs network support, supported services, and roaming zones.



·Widgets showing your device’s most recent sensor readings and charts of those readings over time.



·GPS location (if your device is in view of GPS satellites)



·Switch mangOH LED  A widget to demonstrate how AirVantage can push data to your device.



19.If you are using the Sierra Wireless SIM included with the kit, check the General field in the Provisioning options tile:



·If General = LTE, no change is required.

·If General = LTE-Only:

i.Click the Change Provisioning Options icon in the toolbar:



ii.In the Provisioning options box, begin typing "SMS - MO" and select the option when it appears.



iii.Repeat and select "SMS-MT".

iv.Click Change Provisioning Options.
This change will take a few minutes to take effect, and the General option will change to "LTE".

Note:   The communication and sensor widgets are initially blank because you have not connected your mangOH Red to AirVantage yet. Leave this browser window open and continue to Connect to AirVantage.

7.1.2 Connect to AirVantage

Now that you are registered on AirVantage, you can connect your mangOH Red to the AirVantage server and begin transmitting sensor data:

1.On the dev machine, open a terminal window.

2.Connect to the mangOH Red:

$ ssh root@ 

3.The mangOH Red platform includes redSensorToCloud, an application that reports sensor data from your mangOH Red to the IoT cloud. Start the application to send data to AirVantage, and confirm that it started running:

# app start redSensorToCloud 

# app status 



Note:   redSensorToCloud automatically opens a data connection, so you do not need to use "cm data connect".

4.In your browser, refresh the device dashboard screen.

The Last Communication section shows your Registration connection or sensor data (whichever was most recently received) and the sensor widgets will show the readings that are detailed in the communication entries.





5.For details on all transmissions received, in the Last Communication Section, click See all communications (Timeline).



6.Now that your device is connected to AirVantage, you can also push data to the device. The Switch mangOH LED widget demonstrates this by enabling you to turn on the mangOH Red’s CARD DETECT LED from AirVantage and make it start blinking:



a.In the Switch mangOH LED widget, click the light bulb icon to turn on the CARD DETECT LED.

(Note: To turn the LED off, click the light bulb icon again.)



b.Click Set Blink Interval (sec) and enter a blink interval (in seconds), then click OK. AirVantage sends the command to your device and when the command is received, the LED begins to blink at the requested rate.

7.You have now successfully transmitted and received data to / from the cloud. You can now stop sending sensor data from the device (if desired):

# app stop redSensorToCloud 

8.Make sure redSensorToCloud has stopped:

# app status 



Note:   redSensorToCloud uses the Legato data connection service, so the data connection closes automatically when redSensorToCloud is stopped.

success_mangoh_canstockphoto22930807_2.jpgYou have now registered and connected your device to AirVantage, and completed the mangOH Red Getting Started tutorial. For more information on the mangOH platform, visit mangoh.io.

To begin developing simple applications or modifying existing applications, work through the examples in Develop and Test Applications.