{"id":469,"date":"2017-04-20T21:26:55","date_gmt":"2017-04-20T19:26:55","guid":{"rendered":"http:\/\/systev.com\/?p=469"},"modified":"2019-06-09T20:06:14","modified_gmt":"2019-06-09T18:06:14","slug":"starting-with-a-mangoh-green-board","status":"publish","type":"post","link":"https:\/\/systev.com\/starting-with-a-mangoh-green-board\/","title":{"rendered":"Starting with a mangOH Green board"},"content":{"rendered":"
This post explains how to start using a mangOH Green<\/em> board, and to connect it to Sierra Wireless AirVantage<\/em>. Some knowledge of Linux OS is required.<\/p>\n mangOH, Legato and AirVantage documentation is good, so I won’t provide all details. My aim is more to provide a broad view, so that you know how to use the existing documentation.<\/p>\n The mangOH Green board I use is equipped with a WP8548 module.<\/p>\n Following instructions from mangOH Fundamentals guide<\/a>:<\/em><\/p>\n [a few words about GNSS<\/em> acronym: it means Global Navigation Satellite System,<\/em> and refers to any satellite-based system providing location information through a receiving device. GPS<\/em> is one GNSS system. GLONASS, Beidou, Galileo<\/em> are other GNSS systems.]<\/p>\n The computer I use runs Linux Mint<\/a> 18.1<\/em>, based on Ubuntu 16.04<\/em>. More precisely, this computer is a VirtualBox<\/a> virtual machine that I run on my MacBook Pro<\/em>.<\/p>\n Legato Development Environment results from the assembly of two main components: Developer Studio, the Eclipse-based IDE (Integrated Development Environment), and Legato, the application framework.<\/p>\n Start Legato Development Environment, enter information requested by the startup wizard.<\/p>\n After a while, Developer studio will display a message about an available update, for Developer Studio 5.1. Install it.<\/p>\n The mangOH board being connected to the computer with the USB cable, a new network interface (Ethernet over USB) is available. Its IP address is set to 192.168.2.3 while the mangOH IP address is 192.168.2.2.<\/p>\n Note<\/strong>: depending on your Linux configuration, it could happen that the network interface is created, but no IP address is assigned to it. You will realize that you are facing this problem if you can’t SSH into the board, as directed below. To correct this:<\/p>\n First network interface is the one that allows my virtual machine to communicate with the host machine. Last network interface is the loopback interface, always present. The second network interface is the one in trouble.<\/p>\n Open an SSH session with the board, using root<\/tt> username. There is no password by default, but you are advised either to define one, or to define keys. I choose the password method.<\/p>\n Follow instructions from section 6 of mangOH Fundamentals guide<\/a>,<\/em> to connect to a mobile network and test a data connection.<\/p>\n Follow instructions from section 7 of mangOH Fundamentals guide<\/a>,<\/em> to connect to AirVantage, the Sierra Wireless cloud platform.<\/p>\n We will start from an existing sample, provided by Legato Development Environment, that sends an SMS containing mangOH board location:<\/p>\n The second application is borrowed from the Exchange Data<\/em> sample application<\/a>. I follow these steps:<\/p>\nReference material<\/h2>\n
\n
Getting started<\/h2>\n
Board setup<\/h3>\n
\n
\n
Legato Development Environment installation<\/h3>\n
\n
\n<\/em><\/li>\n.\/legato-spm --installed --update-link<\/pre>\n
First connectivity test<\/h3>\n
\n
$ ifconfig\nenp0s3\u00a0\u00a0\u00a0 Link encap:Ethernet\u00a0 HWaddr 08:00:27:67:ab:ea \u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet addr:10.0.2.15\u00a0 Bcast:10.0.2.255\u00a0 Mask:255.255.255.0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 addr: fe80::ef54:6da4:3b59:206e\/64 Scope:Link\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 UP BROADCAST RUNNING MULTICAST\u00a0 MTU:1500\u00a0 Metric:1\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets:2739635 errors:0 dropped:0 overruns:0 frame:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets:1313190 errors:0 dropped:0 overruns:0 carrier:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 collisions:0 txqueuelen:1000 \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX bytes:2246513691 (2.2 GB)\u00a0 TX bytes:89647536 (89.6 MB)\n\nenp0s12u2i19 Link encap:Ethernet\u00a0 HWaddr 1e:86:2e:4b:33:68\u00a0 \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 UP BROADCAST RUNNING MULTICAST\u00a0 MTU:1500\u00a0 Metric:1\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets:44 errors:0 dropped:0 overruns:0 frame:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 collisions:0 txqueuelen:1000 \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX bytes:11086 (11.0 KB)\u00a0 TX bytes:8635 (8.6 KB)\n\nlo\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Link encap:Local Loopback \u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet addr:127.0.0.1\u00a0 Mask:255.0.0.0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 addr: ::1\/128 Scope:Host\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 UP LOOPBACK RUNNING\u00a0 MTU:65536\u00a0 Metric:1\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets:24365 errors:0 dropped:0 overruns:0 frame:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets:24365 errors:0 dropped:0 overruns:0 carrier:0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 collisions:0 txqueuelen:1 \n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX bytes:9628143 (9.6 MB)\u00a0 TX bytes:9628143 (9.6 MB)<\/pre>\n
\n
sudo ifconfig enp0s12u2i19 192.168.2.3 netmask 255.255.255.0<\/pre>\n
Connecting to AirVantage cloud platform<\/h3>\n
Coding with Legato<\/h2>\n
First application: send an SMS with current location<\/h3>\n
\n
<\/p>\n
\n
Second application: Legato and AirVantage<\/h3>\n