All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Setup Target

Here's how to set up and run your target:

Setup Serial Communication to Target

You need to install a serial commmunication program (e.g., Minicom) to access the target and obtain an IP address.

Check the Dev Kit Cables UART1 settings are correct. If you're using Minicom, you access the config and initialize menus through CTRL+A Z. Run ifconfig to display the IP address values.

Once you have IP addresses for the dev host and target, you can complete the target setup.

Copy Startup Scripts to Target

Using ssh, access the target:

ssh root@<target ip address>

When prompted for a password, press enter.

Then create the startup directory:

mkdir -p /mnt/flash/startup

Then copy the startup files to the target by running the following from the dev host:

scp targetFiles/mdm-9x15/startup/fg_* root@<device ip addr>:/mnt/flash/startup

Scripts beginning with fg_ are run first during startup, and then everything else is runs in the background. You can add more scripts to customize your target. fg_ scripts must have executable permissions or they will not run.

See Yocto Install Notes for helpful target setup tips.

Note
In the rare case you need to prevent legato starting automatically, run
touch /mnt/flash/startup/stoplegato

Reboot Target

Wait for the target to fully reboot. The target IP address may have changed. Check it using ifconfig through the serial console before proceeding.

Copy Libraries and Executables

Run this to copy the Legato framework libraries and executables onto the target, and start the Legato runtime components:

$ instlegato build/wp7 <target ip address>

Start Apps

To start an app on the target, run:

root@swi-mdm9x15:~# app start

To stop an app on the target, run:

root@swi-mdm9x15:~# app stop

Run app help for options.

New Sessions

Any time you start a new session, you might find these steps helpful to ensure your dev host can communicate with your target:

  • Open a terminal; go to your Legato directory.
  • Run bin/legs
  • Plug-in and power-up the target.
  • Open a second terminal; go to your Legato directory.
  • Run bin/legs
  • Start target by running something like:
    minicom –D /dev/ttyUSB0 
  • Press enter when Minicom boot screen displays. Check IP address using ifconfig.
  • Go back to the first terminal window and ensure IP address is configured correctly by running (where the subnet of the dev host and target match):
     sudo ifconfig usb0 <ip address> up 

Dev host should now be able to ping target IP address.

If errors occur (e.g., can’t find network), re-run the ifconfig up command (sometimes, it just doesn’t take) and/or reboot the target.


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.