Follow these steps to execute the application in your device:
-
Open a serial connection using any terminal program such as Tera Term, Minicom, Coolterm, or HyperTerminal. The examples in this documentation use Minicom to work with the device command line.
Use the following settings:
Parameter Value Port
Serial port where the device is connected
Baud rate
115200
Data bits
8
Parity
None
Stop bits
1
Flow control
None
-
Log in to the device. The default login user is root without password. See How to find the IP of your device.
Your device and your host machine must be in the same network. -
Transfer the application to your device using SCP in your host computer. If it is the first connection, you are prompted to continue. In this case, type yes and press Enter.
~> scp hello-world root@192.168.42.30:/home/root/ The authenticity of host '192.168.42.30 (192.168.42.30)' can't be established. RSA key fingerprint is 46:91:93:11:31:d1:e0:b4:1e:3a:e9:fd:51:7f:bd:5a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.42.30' (RSA) to the list of known hosts. hello-world 100% 12KB 11.8KB/s 00:00 ~>
-
In the device terminal, launch the application you have just transferred. The message "Hello world!" is printed 10 times, one every second.
#> /home/root/hello-world 1 - Hello world! 2 - Hello world! 3 - Hello world! 4 - Hello world! 5 - Hello world! 6 - Hello world! 7 - Hello world! 8 - Hello world! 9 - Hello world! 10 - Hello world! #>
How to find the IP of your device
Use the ifconfig command to get the device id. Your device and your host machine must be in the same network.
~# ifconfig eth0 Link encap:Ethernet HWaddr 00:FA:C0:00:24:01 inet addr:192.168.42.30 Bcast:192.168.42.255 Mask:255.255.255.0 inet6 addr: fe80::2fa:c0ff:fe00:2401%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:719975 errors:0 dropped:0 overruns:0 frame:0 TX packets:61809 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:111965191 (106.7 MiB) TX bytes:9871502 (9.4 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:58 errors:0 dropped:0 overruns:0 frame:0 TX packets:58 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:4569 (4.4 KiB) TX bytes:4569 (4.4 KiB) wlan0 Link encap:Ethernet HWaddr 00:FA:C0:00:24:02 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan1 Link encap:Ethernet HWaddr 02:03:7F:D7:00:01 inet addr:192.168.46.30 Bcast:192.168.46.255 Mask:255.255.255.0 inet6 addr: fe80::3:7fff:fed7:1%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:14848 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:4304060 (4.1 MiB)
~# ifconfig eth0 Link encap:Ethernet HWaddr 00:40:9D:98:A6:37 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) eth1 Link encap:Ethernet HWaddr 00:40:9D:98:A6:36 inet addr:192.168.42.30 Bcast:10.101.2.255 Mask:255.255.255.0 inet6 addr: fe80::240:9dff:fe98:a636%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1360759 errors:0 dropped:0 overruns:0 frame:0 TX packets:172594 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:163158464 (155.5 MiB) TX bytes:29408643 (28.0 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:22 errors:0 dropped:0 overruns:0 frame:0 TX packets:22 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:1581 (1.5 KiB) TX bytes:1581 (1.5 KiB) wlan0 Link encap:Ethernet HWaddr 00:40:9D:98:A6:38 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan1 Link encap:Ethernet HWaddr 02:03:7F:D7:00:01 inet addr:192.168.46.30 Bcast:192.168.46.255 Mask:255.255.255.0 inet6 addr: fe80::3:7fff:fed7:1%lo/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:21770 errors:0 dropped:3 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:6312817 (6.0 MiB)
In this example, the target IP address is 192.168.42.30.