Note that the example application was compiled and tested in an i386 target. To run the application on a device, you need to build it on a proper ARMEL target. When you install the maemo SDK using the VMWare package or the installation script for Linux, the ARMEL target is installed by default. To compile and run the created application inside an ARMEL architecture simulation, follow these instructions.
Note: This process is the same for both Linux and Windows machines.
[sbox-SDK_X86: ~] > af-sb-init.sh stop
[sbox-SDK_X86: ~] > sb-menu
[sbox-SDK_ARMEL: ~] > af-sb-init.sh startThe maemo framework should load up just as before with the PC_ARMEL target.
There are several ways to get an application to a device. This section focuses on copying the application to the device instead of packaging it.
This section explains how to upload an application to a device using an USB cable and a memory card. If you have a memory card inserted on your device, do as follows:
$ run-standalone.sh /media/mmc1/helloworld
In this case, your computer needs to support Bluetooth (for example, a Bluetooth dongle).
$ run-standalone.sh ~/MyDocs/helloworld
First of all, you need a wireless infrastucture, such as a wireless router, or you can choose to have an ad-hoc connection between the device and the computer.
If you have a wireless router (or similar), your computer does not necessarily need to have a wireless card (it can be connected through a network cable, for example). The computer and the device are in the same subnet coverage, so you can simply grab the IP address from the device and connect to it. The process of grabbing the device's IP address is explained below.
An ad-hoc connection connects a set of devices (in this case, your computer and your device) on a wireless, non-centered connection. In this case you can start the ad-hoc network from both devices. To start an ad-hoc connection through the device:
Your device is now connected to a wireless network. It is time to grab its IP address in order to connect to it via SSH as explained below.
In order to install the 'osso-xterm' application, you need a working Internet connection on your device. After connecting to the Internet, follow these steps:
Osso-xterm is now installed on your device.
In order to install the ssh client/server, the maemo diablo repository must have been added and osso-xterm installed.
$ sudo gainroot
$ apt-get install -y ssh
Now that you have a connection between your computer and your device, it's time to create a secure shell (SSH) connection between them. It enables you to download and upload files and also work on the device from your computer, from a remote shell. Run the following command on your computer:
$ ssh root@<device_ip_address>
Note: Password: rootme
This remote shell allows you to create, execute, modify, and access files on your device. You can, for example, execute your application on the device remotely from your computer and check for console output at the same time you have the 'hello world' window open on the device.
SCP is a tool used to copy files from one device to another, through a secure remote connection. You can send or receive files from this. In general, the SSH-server acts as a daemon for incoming connections, so you will not be notified if someone wants to connect to your computer (but log-in access is, of course, needed). Run this command to send your application to the device from your computer using SCP:
$ scp helloworld root@<device_ip_address>:~/MyDocs
You can also make the invert: copy a file from the device to your computer, as in this example:
$ scp root@<device_ip_address>:~/foo.txt .
The file foo.txt is saved in the top directory where you are at the moment. Your application is now installed in the device, but not yet ready for execution. In order to execute it, open X-terminal on the device and run this command:
$ run-standalone.sh <folder>/helloworld
In order to install the application's dependencies, you have to complete the step (add maemo diablo repository and install osso-xterm) with an Internet connection working on your device. Follow the steps below:
$ sudo gainroot
$ apt-get install -y libhildonmm libhildon-fmmm libgconfmm