The MangOH Green is a board developed by Sierra Wireless to allow for easy development with their WP modules. These modules are specifically built for mobile/cellular IoT and have both cellular and GPS radios built into the chip. The MangOH Green runs a Linux application framework called Legato. Sierra Wireless has been working hard to keep the software moving forward. This has produced a number of versions each with subtle changes, and while there is a starter's guide for Legato that document has now become partially dated. This along with the relative newness of the manGO board and unique approach there is not a lot information to be found searching online, this however has been changing. As mangOH/legato becomes more popular the online content will also become more plentiful
With first hand experience as well as great help, from both the forums and mangOH personal, in getting my MangOH board running I have decided to document the steps I followed to get the newest virtual machine version “mangOH Dev using Legato 16.07 on Ubuntu 16.04.1” up and running.
The first thing to mention is the password for this version of the VM has been changed from “legato” to “mangoh”. While this has not been documented this was asked on the forums and has been answered. NOTE: This is only for 16.07 but moving forward the password will either be removed altogether or remain as “mangoh”.
The overall process follows a few basic steps each of which will be further explained below. The first step is to download and install the VM from mangOH. Then the firmware on the mangOH board should be updated. In the VM the environment variables are added to the batch file, the repository is updated, legato is updated and installed on the mangOH board. Finally the timerLed demo is compiled and installed on the mangOH board and the application is started. Each of these steps are explained in better detail in the steps below. It should be noted that steps 1 - 12 should only need to be done the first time the mangOH board is used. After the first time either 11 and 12 can be used or 13 - 15 can be used to add a new application to the mangOH board. Steps 16 - 19 always needs to be done to have the Legato application started on the mangOH board.
- Install Oracle VM Virtualbox
- Attach the mangOH board to the PC and update the firmware
- Download the “Generic” Windows EXE file
- Double click the executable (run the file with the board attached to the PC)
- Follow the onscreen instructions (it may take some time). If the system hangs for more than 20 minutes do a power cycle on the board and restart.
- Install the VM
- Follow the step #4 “Prepare your computer for Legato development” in either - “mangOH Fundamentals— Windows (Linux VM) + Legato CLI”
In the VM
- Open the VM and add “source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv” to .bashrc file
- Open a terminal window
- $edit .bashrc
- Scroll down to the bottom of the press the “insert” key on your keyboard
- Add the “source…” line at the very bottom of the file (after the last “fi”)
- Lastly enter “:wq” this will save and exit the editor
(Note: Moving forward to to Legato 16.10 this step will no longer be needed)
- cd mangOH/
- repo sync
- cd legato/
- source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv
(This step is not needed if close and then reopen the terminal)
- make wp85
- Add timerLed.adef to mangoh.sdef
- Open emacs
- file->Open file
- mangOH->mangOH->mangoh.sdef
- Under “apps:{“ add “$MANGOH_ROOT/samples/tutorials/hardwareInterfaces/gpio/timerLed.adef”
- Save and close emacs
- instlegato wp85 192.168.2.2
- cd mangOh/mangOH/samples/tutorials/hardwareInterfaces/gpio/TimerLed/
- mkapp -t wp85 timerLed.adef
- app install timerLed.wp85.update 192.168.2.2
- ssh root@192.168.2.2
- app status (should see “[stopped] timerLed”)
- app start timerLed
- You should now see the LED next to SW200 and the reset switch blinking
I have tested these steps out on a new install of the VM and have not encountered any issues. If you do have any issues or or have any comments regarding the process please share them in the comments below.
I would like to mention that the constant addition of new APIs for the mangOH board have made programing the board that much easier. As someone with a background in embedded code on microcontrollers, digging into the kernel to get to the GPIOs or other ports would be a quite a feat. The mangOH team is also working to add more demos, thi would allow someone wanting to create a prototype to have numerous starting points as well as projects that they could merge to get a usable prototype for the concept they are trying to display.
As I keep working with this board I will hopefully add more blogs giving over my experience with working with the mangOH Green board.