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.

av_1b_2.png

 

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.

av_5_2.png

 

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.

av_confirm_signup_new_2.png

 

8.Click Save.

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

av_7b_2.png

 

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.

av_login_2.png

 

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.

av_10_2.png

 

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@192.168.2.2 

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.

av_11_2.png

 

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

41112261_AirVan00254.jpg

 

·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.

av_monitor_2.png

 

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.)

av_14_2.png

 

18.The device dashboard displays:

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

av_16_14.png

 

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

av_16_15.png

 

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

av_16_16.png

 

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

av_16_17.png

 

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

av_16_18.png

 

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

av_16_19.png

 

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

av_16_20.png

 

·If General = LTE, no change is required.

·If General = LTE-Only:

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

av_change_provisioning_icon_2.png

 

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

av_select_sms-mo_2.png

 

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@192.168.2.2 

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 

41112261_AirVan00257.jpg

 

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.

av_30_4.png

 

av_30_5.png

 

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

av_32_timeline_2.png

 

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:

av_30_LED_2.png

 

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.)

LED_CARD_DETECT_2.jpg

 

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 

41112261_AirVan00268.jpg

 

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.