Now take the source code file (hello.c) and make an application out of it.
Applications are described by an "application definition" text file ending with the suffix ".adef". The format is intended to be easy to read and write.
To turn hello.c into an application, create an application definition file called "helloWorld.adef" that looks like this:
executables: helloWorld ( hello.c ) processes: run: (helloWorld)
This defines one executable called helloWorld implemented by hello.c, and then starts one instance of the helloWorld executable.
If your executable has multiple source files, add more files inside the parentheses after the executable name: "helloWorld ( hello.c foo.c )".
Run mkapp
to build the executable and bundle it into an application.
Use the "-t" option to build a target other than the default "localhost" target.
This is how to build the helloWorld application for a device running the Sierra Wireless WP7 module:
$ mkapp -t wp7 helloWorld.adef
ar7
for wp7
in the mkapp run command.Use instapp
to install it on your target.
$ instapp helloWorld.wp7 <ip addr>
The second argument tells the target device host address from where to run the application. This will connect to the target, upload the application, and start it.
Your installed application's LE_INFO
log message will appear in the system log ("syslog") on the target device.
Run logread (on the target) to view the system log.
# logread
Use logread's -f option to start monitoring the logs and display messages as they are logged.
# logread -f
Use "rmapp" to uninstall your application.
$ rmapp helloWorld.wp7 <ip addr>
Use "lsapp" to list the applications installed on a target.
$ lsapp <ip addr>
Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.