mangOH Red Manual

Wireless smart sim
Hide thumbs Also See for Red:

Advertisement

Quick Links

mangOH™ Red
Getting Started—WPx5xx +
Linux Dev Machine + CLI
41110481
Rev 3
Contents subject to change

Advertisement

Table of Contents
loading

Summary of Contents for mangOH Red

  • Page 1 Red Getting Started—WPx5xx + Linux Dev Machine + CLI 41110481 Rev 3 Contents subject to change...
  • Page 2 This product may contain technology developed by or for Sierra Wireless Inc. This document contains information which is proprietary to Sierra Wireless Inc. and is licensed pursuant to Creative Commons Attribution 4.0 International License. Document Title: mangOH Red Getting Started—WPx5xx + Linux Dev Machine + CLI details Author: Sierra Wireless Source: http://mangoh.io/...
  • Page 3 Revision History Revision Release date Changes number August 2017 Document created Rev 3 9/21/17...
  • Page 4: Table Of Contents

    Prepare Your mangOH Red For Development ........
  • Page 5 Update Legato Application Framework........47 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 Windows 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 Linux 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

    Some terminology: · "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 Linux computer ·...
  • 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: Hardware Setup

    3.1: Hardware Setup 3.1 Hardware Setup To set up the mangOH Red board: 1. Remove the protective film from the dipswitches: Remove this film 2. Make sure the dipswitches are set as follows: · ON—1,3,5,8 · OFF—2,4,6,7 For switch details (not needed for this tutorial), see...
  • Page 11 3.1: Hardware Setup 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.1: Hardware Setup Note: The mangOH Red has two USB connectors: • CF3 USB is used for SSH connections, AT commands, and firmware downloads. • CONSOLE_USB is a serial connection used to access the module’s console for diagnostic purposes. 5. Move the power select jumper onto the pins closest to the battery connector to select the CF3 USB connector.
  • 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.1: Hardware Setup Now you are ready to Prepare Your Linux Dev Machine For Legato Development on page Rev 3 9/21/17...
  • Page 15: Prepare Your Linux Dev Machine For Legato Development

    • mangOH Red platform—Drivers for on-board components, and a basic device-to-cloud application. To build and install the development environment on your dev machine: 1. Open a terminal window.
  • Page 16 4.2: Build and Install the Development Environment 4. Install several packages that are required for the Legato Platform and the mangOH Red platform: $ sudo apt-get install -y build-essential openjdk-8-jre \ libwebkitgtk-1.0-0 python python-jinja2 cmake \ git subversion libsdl-dev diffstat texinfo gawk \...
  • Page 17 4.2: Build and Install the Development Environment ii. Either move or delete any old toolchain files: Delete files: $ rm poky* Move files: $ mkdir old_toolchains $ mv poky* old_toolchains iii. Edit your ~/.bashrc file, comment out any items at the bottom of the file that begin with "LEGATO", and save and close the file.
  • Page 18 When finished, installing, the message "SDK has been successfully set up and is ready to be used." will appear. h. Configure the toolchain to make it available for use in generating the mangOH Red platform and the kernel modules that it references:...
  • Page 19 <mangOH_work_directory> is optional—if not used, a working directory is created with the same name as the repository (in this case, "mangOH"). 12. Add an environment variable (shortcut) for the mangoh work directory—this will be available each time you open a new terminal window: a.
  • 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 Now that your dev machine has its development environment set up, you will: •...
  • Page 21 5.1: Build and Install Legato Platform and mangOH Red Platform on Target IMEI IMEI Note: This may take several minutes to run. 2. In a terminal window, build the Legato AF: $ cd ~/legato_framework/legato $ make clean # Optional step to remove clutter from previous builds...
  • Page 22 5.1: Build and Install Legato Platform and mangOH Red Platform on Target Ignore these toolchain warnings. 3. To use the Legato AF’s tools in the terminal window, you must configure it to work with the tools. To do this, you will define a short ’alias’ in your ~/.bashrc file (the startup script that runs each time you open a new...
  • Page 23 5.1: Build and Install Legato Platform and mangOH Red Platform on Target iii. Click your module type. iv. In the Software download section, click Firmware to display the list of available firmware packages. v. In the Combined Images table, click the Download link in the Binaries column for the Generic carrier.
  • Page 24 5.1: Build and Install Legato Platform and mangOH Red Platform on Target iii. Display information about the CF3 module and confirm that the Firmware version shown is the one that you downloaded: # cm info IMEI Firmware version iv. Disconnect from the mangOH Red: # exit 6.
  • Page 25 5.1: Build and Install Legato Platform and mangOH Red Platform on Target 9. Make sure the mangOH board is powered on and is connected to your dev machine—the board is connected if you receive ping responses: $ ping 192.168.2.2 Press Ctrl+C to return to the command prompt.
  • Page 26 5.1: Build and Install Legato Platform and mangOH Red Platform on Target Now that the mangOH Red platform is installed, you will learn how to Connect To Mobile Networks on page Rev 3 9/21/17...
  • Page 27: 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 28 6.1: Connect To a Mobile Network 3. Display the status of the target’s radio: # cm radio Example response when Power is OFF Example response when Power is ON, Status is Searching Important: Typically, your module will register on a network in < 1 minute. However, the very first time your CF3 module and Sierra SIM are used, registration may take from 5–20 minutes.
  • Page 29 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 30 6.1: Connect To a Mobile Network 8. The target is registered on a mobile network, and the SIM is installed and configured with the correct APN. You are now ready to transmit data to the IoT cloud. In the next section—Connect to the IoT Cloud on page 31, you will set up your free account on the Sierra Wireless AirVantage IoT Acceleration Platform and begin sending data to the ’cloud’.
  • Page 31: 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 32 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 33 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 34 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 35: 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 36 (Shows when your board last communicated with AirVantage, and the type of communication. For example, this CF3 communicated its Registration. System Info (Information about the CF3 module in your mangOH board) Last Communication Shows your most recent sensor data. Rev 3 9/21/17...
  • Page 37 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 38 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 39: 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 40: Update An Installed Application

    A.1.2 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.
  • Page 41 At this point, you have modified the redSensorToCloud application’s source code. Now you have to build (compile) 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 42 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 43: 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 44 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 45 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 46 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...
  • Page 47: Update Legato Application Framework

    B: Update Legato Application Framework As part of the Build and Install Legato Platform and mangOH Red Platform on Target on page 20 process, you downloaded and installed 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 48 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 49 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...
  • Page 50: 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 51: 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 52: 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 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 However, only one console connection can be opened at any time since it locks the USB serial port. Example If you open the console terminal window before you connect power to the mangOH Red, you will see the messages that are generated during the module boot process:...
  • 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 • 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) minicom -D /dev/ttyUSB0 Open a terminal window connected to the specified USB port.
  • Page 60 G:: Quick Reference — Commands in this Guide Table G-1: Commands Used in the Getting Started Guide (Continued) Command Description mv <file> <destination> If <destination> is an existing directory name, move the <file> into that directory. Otherwise, rename the <file> using the <destination> name. ping <ip_address>...

Table of Contents