Sierra Wireless mangOH Red Getting Started
Sierra Wireless mangOH Red Getting Started

Sierra Wireless mangOH Red Getting Started

Wpx5xx + windows vm + cli

Advertisement

Quick Links

mangOH™ Red
Getting Started—WPx5xx +
Windows VM + CLI
41110479
Rev 3
Contents subject to change

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the mangOH Red and is the answer not in the manual?

Questions and answers

Summary of Contents for Sierra Wireless mangOH Red

  • Page 1 mangOH™ Red Getting Started—WPx5xx + Windows VM + CLI 41110479 Rev 3 Contents subject to change...
  • Page 2 Although significant delays or losses of data are rare when wireless devices such as the Sierra Wireless modem are used in a normal manner with a well-constructed network, the Sierra Wireless modem should not be used in situations where failure to transmit or receive data could result in damage of any kind to the user or any other party, including but not limited to personal injury, death, or loss of property.
  • Page 3: Revision History

    Revision History Revision Release date Changes number August 2017 Document created Rev 3 9/21/17 41110479...
  • Page 4: Table Of Contents

    Prepare Your mangOH Red For Development ........
  • Page 5 Update Legato Application Framework........45 Update the Legato AF on Your Dev Machine .
  • Page 6: Introduction

    Install and run applications, and send data to the IoT Cloud via AirVantage, Sierra Wireless’ cloud-based service platform for over-the-air (OTA) device management. To get started with a native Linux dev machine, or for other mangOH Red resources (guides, tutorials, etc.), visit mangoh.io/mangoh-red-resources.
  • Page 7 • STEP 1: Check Out Some Helpful Tips on page 8 • STEP 2: Set Up Your mangOH Red Hardware on page 9 • STEP 3: Prepare Your Windows Dev Machine For Legato Development on page 15 • STEP 4: Prepare Your mangOH Red For Development on page 20 •...
  • Page 8: Check Out Some Helpful Tips

    "CF3"—The mangOH Red supports CF3 (Common Form Factor) embedded modules, such as the WP8548 and HL8548. Throughout this tutorial, "CF3" refers to the module that comes with your mangOH Red kit. · "Dev(elopment) machine"—Your Legato VM with Ubuntu 16.04 guest OS.
  • Page 9: Set Up Your Mangoh Red Hardware

    • Antenna (diversity)—Included if the CF3 module supports LTE • Sierra Wireless micro-SIM The following image summarizes the parts of the mangOH Red that you will set up when you follow the instructions in Hardware Setup on page Important: Do not start connecting components until told to in the instructions, otherwise you may encounter problems later in the guide.
  • Page 10: Install Drivers

    3.1: Install Drivers 3.1 Install Drivers Your Windows computer requires drivers for your mangOH Red’s CF3 module. To download and install the drivers: 1. Go to http://mangoh.io/mangoh-red-resources-getting-started. 2. In the Getting Started with mangOH section, find and click Drivers for mangOH-compatible CF3 Modules. This takes you to the drivers page on the Source.
  • Page 11 Dipswitch Settings on page 3. Insert a micro-SIM in the slot on the bottom side of the mangOH Red. You can use the Sierra Wireless micro-SIM that is included in the kit, or another micro-SIM that has been activated by a mobile network provider.
  • Page 12 3.2: Hardware Setup 4. Attach the main antenna and (for LTE CF3 modules) the diversity antenna. Note: The main antenna is required if you want to connect the mangOH Red to a mobile network in Connect To Mobile Networks on page...
  • Page 13 When the mangOH Red is powered, the Power LED turns solid green. Power LED Note: For future reference, the mangOH Red’s power supply (USB port on your dev machine, or an AC adapter) connects to the board via either USB connector—CF3 USB or CONSOLE USB (depending on the jumper position on the power header).
  • Page 14 3.2: Hardware Setup b. Wait until the device enumerates (1 to 4 minutes)—Hover your cursor over the network status icon. When the device enumerates, this shows that you are connected to an “Unidentified Network” (your CF3 module) with “No Internet access” (because the module is not connected to a mobile network). Connected to target device c.
  • Page 15: Prepare Your Windows Dev Machine For Legato Development

    4.1.1 Install Oracle VirtualBox The VM image provided for mangOH Red is built for use with Oracle VirtualBox. If you do not have Oracle VirtualBox installed on your computer yet: 1.
  • Page 16 4.1.2: Download Legato Application Development Image To download the VM image: 1. Go to http://mangoh.io/mangoh-red-resources-getting-started. 2. In the Legato Virtual Machines section, locate and click Download VM. Note: The VM image size is ~2.1 GB. 3. Load (import) the Legato VM into VirtualBox: a.
  • Page 17 4.1.2: Download Legato Application Development Image Oracle VirtualBox with imported Linux VM Windows desktop 4. Make sure the Legato VM is set up to use the Internet connection: a. In the VirtualBox window, click Settings. The Settings window appears. b. Select Network. c.
  • Page 18 4.1.2: Download Legato Application Development Image 5. Check whether your computer has virtualization enabled (which allows you to run the Linux VM): a. In the VirtualBox window, click Settings. The Settings window appears. b. Select System. c. Try to select Acceleration: ·...
  • Page 19 The Linux VM will not lock if it is left unused. However, if you manually lock it, the password to unlock it is ‘mangoh’. Now that the VM is loaded and running and you have a terminal emulator installed, you can Prepare Your mangOH Red For Development on page 20 Rev 3 9/21/17 41110479...
  • Page 20: Prepare Your Mangoh Red For Development

    5: Prepare Your mangOH Red For Development In this chapter, you will update the CF3 module on your mangOH Red with the basic mangOH Red Platform (application suite). 5.1 Build and Install Legato Platform and mangOH Red Platform on Target...
  • Page 21 5.1: Build and Install Legato Platform and mangOH Red Platform on Target d. Verify that the firmware updated: i. Connect to the mangOH Red: $ ssh root@192.168.2.2 ii. The following message appears if you are using your CF3 module for the first time (modules are shipped without a password).
  • Page 22 4. Change directory to the mangoh work directory: $ cd $MANGOH_ROOT 5. The VM is pre-installed with the files for the mangOH Red platform. However, you should make sure you have the latest versions of the files using the following git (version control system) commands: a.
  • Page 23 Done". Note: If the target has any problems starting the mangOH Red platformat applications, it automatically reboots and restores to its original state (prior to the instsys command). If this happens, the target will not be reachable whlie it is rebooting.
  • Page 24 If gpioExpanderServiceRed, mqttClient, and redSensorToCloud are listed, the install succeeded. c. Disconnect from the mangOH Red: # exit Now that the mangOH Red platform is installed, you will learn how to Connect To Mobile Networks on page Rev 3 9/21/17 41110479...
  • Page 25: Connect To Mobile Networks

    Insert a micro-SIM in the slot on the bottom side of the mangOH Red. You can use the Sierra Wireless micro-SIM that is included in the kit, or another micro-SIM that has been activated by a mobile network provider.
  • Page 26 This may be different than the provider of the SIM if you are connecting to a network that your SIM’s provider has an agreement with. For example, Sierra Wireless SIMs will connect to a variety of networks as in the example above.
  • Page 27 Example response when Not connected, no APN a. If "Connected" is: · "no", and APN has a value—The mangOH Red is ready to connect to the network. Go to Step 8 on page · "no", and APN is blank—You must set the APN. Continue to the next step (step b.
  • Page 28 IoT cloud. In the next section—Connect to the IoT Cloud on page 29, you will set up your free account on the Sierra Wireless AirVantage IoT Acceleration Platform and begin sending data to the ’cloud’. Rev 3 9/21/17 41110479...
  • Page 29: Connect To The Iot Cloud

    Red’s on-board sensor data. 7.1 Register and connect to AirVantage Your mangOH Red kit includes a free 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.
  • Page 30 7.1.1: Register with AirVantage 2. In the MangOH Signup area, enter your: · First and last names · Email address—Address to use as your AirVantage username. Important: Use a valid address—This is your username for accessing AirVantage, and is needed to complete the registration process.
  • Page 31 If your password is acceptable, the AirVantage Login screen appears. 8. Enter your account’s email address and password, and click Log In. 9. If you did not record your device’s FSN and IMEI earlier (in Build and Install Legato Platform and mangOH Red Platform on Target on page 20): a.
  • Page 32 The areas shown below (Last Communication and System Info) are both blank because you have not con- nected your mangOH Red to AirVantage yet. Leave this browser window open and continue to Connect to Air-...
  • Page 33: Connect To Airvantage

    $ ssh root@192.168.2.2 3. The mangOH Red platform that you installed earlier includes 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:...
  • Page 34 7.1.2: Connect to AirVantage 4. In your browser, refresh the AirVantage System Details screen. The System Info section now shows details about your module, and the Last Communication section shows your Registration connection or sensor data, whichever was most recently received. Last Communication (Shows when your board last communicated...
  • Page 35 7.1.2: Connect to AirVantage 5. To see details on all transmissions received, click Timeline. Timeline has sorting options to choose the data to display. This example shows the two most recent sets of sensor data. The second set is expanded to show each sensor reading.
  • Page 36 7.1.2: Connect to AirVantage You 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...
  • Page 37: Develop And Test Applications

    A: Develop and Test applications In this section, you will learn how to develop applications in the Legato development environment, install them onto your mangOH Red, and test that they run. Legato provides two interfaces for developing applications: • CLI—Command Line Interpreter in a terminal window.
  • Page 38: Update An Installed Application

    As you saw when you set up your AirVantage account, one of the mangOH platform applications loaded on your device in Build and Install Legato Platform and mangOH Red Platform on Target on page 20 redSensorToCloud. This application reports sensor readings to the cloud (e.g. AirVantage) every two minutes.
  • Page 39 A.1.2: Update an Installed Application This application was created as part of the mangOH Red platform; to rebuild the application, you will rebuild the whole platform. This method is suggested when applications may interact with each other. If only one application is rebuilt, it may not work properly with other applications that it depends on (or that depend on it).
  • Page 40 Done". Note: If the target has any problems starting the mangOH Red platformat applications, it automatically reboots and restores to its original state (prior to the instsys command). If this happens, the target will not be reachable whlie it is rebooting.
  • Page 41: Update And Install A New Application

    A.1.3: Update and Install a New Application Sync status 30 seconds interval 2 minutes interval 12. When you’re ready to stop sending data: # app stop redSensorToCloud Note: redSensorToCloud automatically closes the data connection, so you do not need to use "cm data connect -1". A.1.3 Update and Install a New Application When you installed Legato, sample application files were also stored.
  • Page 42: Rev 3 9/21/17

    A.1.3: Update and Install a New Application 4. Compile the application. $ make wp85 Note: This ’make’ command uses the Makefile in the current directory to build only the sample application. It does not build the entire system like the ’make’ command in Update an Installed Application on page 5.
  • Page 43 A.1.3: Update and Install a New Application b. Connect to the target: $ ssh root@192.168.2.2 c. Check that the application is installed: # app status Hello World application The "hello world" application should appear in the list with a status of ’running’. The application was built to run automatically;...
  • Page 44 A.1.3: Update and Install a New Application g. In the LOG_TERM terminal window, press Ctrl+C to return to the command prompt. You have now successfully compiled a working application, and installed, stopped, and run it on the module. Note: To learn more about the Legato development environment, visit http://legato.io/legato-docs/latest/. Rev 3 9/21/17 41110479...
  • Page 45: Update Legato Application Framework

    B: Update Legato Application Framework The Legato VM that you installed on your dev machine in Download Legato Application Development Image on page 15 was pre-configured with the latest version of the Legato Application Framework (AF). When new versions of the framework are released, you can install them on your dev machine using the procedure below.
  • Page 46 B.1: Update the Legato AF on Your Dev Machine 5. If your release is older (lower version number) than the most recent release: a. Download the framework files into your working directory (for example, "legato_framework")—Replace the release number in the ’repo’ command with the most recent release (this example downloads version 17.07.1): Note: Through the rest of this guide, "legato_framework"...
  • Page 47 B.1: Update the Legato AF on Your Dev Machine 6. Build and install the Legato AF: $ cd legato $ make clean # Optional step to remove clutter from previous builds $ make wp85 # Build the framework $ cfglegato # Set up the environment Rev 3 9/21/17 41110479...
  • Page 48: Tips

    Ubuntu includes a terminal emulator, which is labeled as "Terminal" in the desktop environment. The emulator allows you to execute command-line programs that interact with the Legato framework tools on your dev machine and the CF3 module in the mangOH Red. For this tutorial, here are some useful tips: •...
  • Page 49: Useful Commands For This Tutorial (And More)

    C.3: Useful commands for this tutorial (and more) C.3 Useful commands for this tutorial (and more) The following table describes the Legato and Linux commands used in this tutorial, plus other useful commands. Table C-1: Legato commands Command types Command Description Versioning cm info...
  • Page 50: Definitions

    C.4: Definitions Table C-2: Linux commands Command types Command Description Packages add-apt-repository Add a package repository to your list of locations where the apt-get package management tool searches for the packages you request. apt-get update Update the list of repositories to include those you added with add-apt- repository.
  • Page 51: Virtualbox Tips

    C.5: VirtualBox Tips C.5 VirtualBox Tips C.5.1 Modifying resources When you open a virtual machine (.ova) file, the Import Virtual Appliance window opens, showing the suggesting settings for VirtualBox. Before you click Import to load the VM into VirtualBox, you can adjust the CPU and RAM settings to fine-tune its performance if necessary.
  • Page 52 C.6: Enable virtualization on a Windows computer 2. If you do not know how to boot directly into your computer’s BIOS, check online for instructions specific to your operating system. Some typical methods include: · Windows 7—Reboot the computer and press the appropriate key to go to the BIOS screen (for example, F2, Esc, Del, blue ThinkVantage on Lenovo machines, etc.) ·...
  • Page 53: Hardware Tips

    D: Hardware Tips D.1 Dipswitch Settings The multi-function dipswitch block (SW401) is used to control module signals. Note: The ’Default’ switch positions are the settings recommended when using this guide. Signal On/Off State On (Default) Enable CF3 module’s POWER_ON signal PWR_ON Disable POWER_ON signal Enable CF3 module’s firmware download (recovery) mode.
  • Page 54: Console Access

    E: Console Access If you have two USB ports on your dev machine, you can use one of them to display the mangOH Red’s diagnostic messages when the device boots, when certain commands are run, etc. To set up a window to display diagnostic messages: 1.
  • Page 55 E:: Console Access c. Click Open. The window will remain empty until you power up the mangOH Red in the next step. Note: Only one console connection can be opened at any time since it locks the USB serial port.
  • Page 56: Removing/Inserting A Cf3 Module

    F: Removing/Inserting a CF3 Module F.1 Removing a CF3 module To remove a CF3 module from the mangOH Red: 1. Remove the module cover using the module cover removal tool—Starting at one corner, insert the tool in the pair of holes and carefully pry the cover away from the module.
  • Page 57: Inserting A Cf3 Module

    F.2: Inserting a CF3 module F.2 Inserting a CF3 module To insert a CF3 module on the mangOH Red board: 1. Insert the CF3 module—Hold the module above the socket and line up the triangles on the module and socket. The module will drop straight into the socket. (Position matters!)
  • Page 58: Quick Reference-Commands In This Guide

    G: Quick Reference—Commands in this Guide The following table contains a list of the commands that are used in this guide with explanations of their purposes. Table G-1: Commands Used in the Getting Started Guide Command Description app install <update_file> <ip_address> Install the specified file on the device at <ip_address>.
  • Page 59: Rev 3 9/21/17

    • wp85—Build for wp85 modules • wp750x—Build for wp750x modules • red_wp85—Build for wp85 modules used in mangOH Red boards • green_wp85—Build for wp85 modules used in mangOH Green boards. make clean Remove ’build artifacts’ (clutter left over from previous builds) mv <file>...

Table of Contents