blob: d9304317e3eedf9c5c29625ecec04aaa0a8d4469 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
User Documentation for Artik5 & Artik10 boards
Flash the image to SD card
==========================
Insert SD card to PC linux and use dd to flash the image to SD card
$ sudo dd if=artik10-snappy.img of=/dev/sdc bs=32M
$ sync
note:
1. replace /dev/sdc with your SD card driver.
2. replace artik10-snappy.img with artik5-snappy.img if flash for artik5 board.
Boot the board
==============
The boards have a "SW2" switches to control booting board from SD card or eMMC flash.
* Booting from SD card mode
Set "SW2" to 1:on and 2:on. u-boot will print following message:
Checking Boot Mode ... SDMMC
* Booting from eMMC flash mode
Set "SW2" to 1:off and 2:off. u-boot will print following message:
Checking Boot Mode ... EMMC
Boot board from SD card
------------------------
Set "SW2" to booting from SD card mode.
And insert the SD card to the board and power on the board. The board will auto-boot to snappy system.
Boot board from eMMC flash
--------------------------
Set "SW2" to booting from eMMC mode.
And insert the SD card to the board and power on the board. Press any key
when the u-boot prompts "Hit any key to stop autoboot".
Type the below commands on u-boot to boot the board:
# setenv loadaddr ${kernel_addr};mmc rescan;fatload mmc 1:1 ${loadaddr} uEnv.txt;env import -t ${loadaddr} $filesize;
# setenv mmcdev 1; setenv mmcpart 1;run snappy_boot
Test functions
==============
First we should install neccessary packages in /home/ubuntu:
$ cd /home/ubuntu/snaps
$ sudo snappy install *.snap
Then reboot system:
$ sudo reboot
Please boot system again.
Test WIFI
---------
Configure wpa_supplicant.conf to include your WiFi router settings. You can use the wpa_passphrase
command to write your router SSID and password into wpa_supplicant.conf.
$ wpa_passphrase "SSID" "PASSWORD" >> /home/ubuntu/wpa_supplicant.conf
And then run script to configure wifi interface:
$ sudo sh /home/ubuntu/wifi.sh
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Trying to associate with 4c:e6:76:64:a3:8a (SSID='test_ap' freq=2437 MHz)
ioctl[SIOCSIWFREQ]: Operation not supported
Association request to the driver failed
Associated with 4c:e6:76:64:a3:8a
WPA: Key negotiation completed with 4c:e6:76:64:a3:8a [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 4c:e6:76:64:a3:8a completed (auth) [id=0 id_str=]
wlan1 Link encap:Ethernet HWaddr e8:50:8b:97:86:d6
inet addr:192.168.1.52 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ea50:8bff:fe97:86d6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:1 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1080 (1.0 KB) TX bytes:1672 (1.6 KB)
Now wifi is enabled and configured, please use ping and ssh to test wifi.
Test Bluetooth
--------------
$ sudo sh /home/ubuntu/bt.sh
$ sudo bluetoothctl
[NEW] Controller 00:32:9F:AC:04:4A [default]
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 00:32:9F:AC:04:4A Powered: yes
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:32:9F:AC:04:4A Discovering: yes
[NEW] Device 18:CF:5E:B5:53:54 ubuntu-0
[bluetooth]# pair 18:CF:5E:B5:53:54
Attempting to pair with 18:CF:5E:B5:53:54
[CHG] Device 18:CF:5E:B5:53:54 Connected: yes
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb
[CHG] Device 18:CF:5E:B5:53:54 Paired: yes
Pairing successful
[ubuntu-0]#
Test USB
--------
* Artik5
Artik5 board only supports USB OTG. We use android_usb gadget test this function.
In this test, artik5 board will emulate an usb ethernet card.
Plug a miniusb cable to Artik5 board and link the cable to PC Linux.
On Board, run the script:
$ sudo sh /home/ubuntu/usb_android_otg.sh
$ sudo ifconfig rndis0 192.168.2.2
On PC Linux, run ifconfig:
$ sudo ifconfig usb0 192.168.2.1
On Board, ping the PC Linux through usb cable:
$ ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.568 ms
64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.413 ms
64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.432 ms
64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=0.395 ms
^C
--- 192.168.2.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 0.395/0.452/0.568/0.068 ms
* Artik10
Artik10 board supports USB1.1, USB2.0 and USB3.0. We only test USB2.0 and USB3.0.
1. USB2.0
Insert an USB disk into USB2.0 port and use dmesg to see whether kernel detect
the USB disk and try to mount the partition.
2. USB3.0
At first insert an USB disk into USB3.0 port and run the command on the board to enable USB host mode:
$ sudo sh -c "echo 0 > /sys/devices/usb.1/12000000.dwc3/id"
And then use dmesg to see whether kernel detect the USB disk and try to mount the partition.
Test GPIO
---------
Insert a LED, anode in pin 13 (on connector J27) and cathode in GND pin (right next to pin 13).
Then run the script to blink the LED for 10 times:
$ sudo sh /home/ubuntu/gpio.sh
|