Artila Matrix-522 User manual

Matrix-522
Linux ARM9 Industry Box Computer
User Guide
Version 1.1
Copyright © Artila Electronics Co., Ltd. All Rights Reserved.


Table of Contents
1. Introduction................................................................................................................ 1
1.1 Packing List......................................................................................................................... 1
1.2 Optional Accessory............................................................................................................. 1
2. Layout......................................................................................................................... 2
3. Pin Assignment and Definition.................................................................................. 3
3.1 Reset Button ....................................................................................................................... 3
3.2 Power LED.......................................................................................................................... 3
3.3 Ready LED.......................................................................................................................... 3
3.4 Link / Act LED ..................................................................................................................... 3
3.5 Serial / CAN Port LED......................................................................................................... 3
3.6 Ethernet Port....................................................................................................................... 3
3.7 Serial Ports.......................................................................................................................... 3
3.8 Serial Port (DB9 Male)........................................................................................................ 4
3.9 CAN Port (DB9 Male).......................................................................................................... 4
3.10 Serial Console Port............................................................................................................. 4
3.11 Digital I/O Port (DB25 Female)........................................................................................... 5
3.12 Factory Default Settings...................................................................................................... 5
3.13 Power on and System Boot up ........................................................................................... 6
3.14 Inittab and Run Levels ........................................................................................................ 6
3.15 Default Started Service....................................................................................................... 6
3.16 Network Settings................................................................................................................. 7
3.17 Insert Kernel Module........................................................................................................... 7
3.18 File System ......................................................................................................................... 8
3.19 Devices List......................................................................................................................... 8
3.20 Utility Software.................................................................................................................... 8
3.21 Mounting External Storage Memory................................................................................... 9
3.22 Welcome Message ............................................................................................................. 9
3.23 Web Page Directory.......................................................................................................... 10
3.24 Adjust the System Time.................................................................................................... 10
3.25 SSH Console..................................................................................................................... 10

3.26 Putty Console Software .................................................................................................... 10
3.27 ipkg Package Software Management............................................................................... 11
3.28 SocketCAN........................................................................................................................ 11
3.29 libsocketcan ...................................................................................................................... 11
3.30 Configure CAN.................................................................................................................. 12
3.31 CANOpen.......................................................................................................................... 13
3.32 Install GNU Toolchain....................................................................................................... 13
3.33 Getting Started with the Hello Program ............................................................................ 14
3.34 Auto Start Program on Boot.............................................................................................. 14
4. Artila Utility Software................................................................................................15
4.1 update............................................................................................................................... 15
4.2 setuart............................................................................................................................... 15
4.3 setconsole......................................................................................................................... 15
4.4 version............................................................................................................................... 16
4.5 gpioctl................................................................................................................................ 16
5. Loader Menu..............................................................................................................17
6. Frequently Asked Question......................................................................................18
6.1 Forgot Password............................................................................................................... 18
6.2 Forgot the IP Address....................................................................................................... 18
6.3 System Fail to Boot........................................................................................................... 18
7. System Recovery ......................................................................................................19
7.1 Update Image.................................................................................................................... 19
7.2 Make Filesystem............................................................................................................... 19
7.3 Recovery Env.................................................................................................................... 19
7.4 Show Info.......................................................................................................................... 19
7.5 Reboot............................................................................................................................... 19
7.6 Update Image Starts......................................................................................................... 20
7.7 Update Image Completes ................................................................................................. 20
7.8 Make Files System Starts ................................................................................................. 20
8. Appendix....................................................................................................................21
8.1 Utility Collection................................................................................................................. 21
8.2 ipkg Software Package Management............................................................................... 21

Matrix-522 User Guide
‧1‧
1. Introduction
Matrix-522 is an ARM9-based Linux ready industrial computer. The key features are as follow:
ARM926EJ-S ARM Thumb Processor 400MHz w/MMU
32-KByte Data Cache and 32-KByte Instruction Cache
64MB SDRAM, 256MB NAND Flash on board
Two 10/100 Mbps Ethernet
Two USB 2.0 full speed (12 Mbps) Host Ports, one USB device port
Multimedia Card Interface for Micro SD memory card
Two 3-in-1 RS-232/422/485 ports
Two 2500 Vrms fully isolated CAN 2.0A/2.0B ports
21 programmable Digital I/O port
9 to 40VDC power input
Pre-installed Standard Linux 2.6.29 OS
GNU tool chain available on Artila FTP
Support SocketCAN and CANopen Library
Optional DIN RAIL mounting adaptor
1.1 Packing List
Matrix-522 Box Computer
Wall mount bracket
1.2 Optional Accessory
CBL-F10M9-20 (91-0P9M9-001): Console Cable (10Pin Header to DB9 Male, 20cm)
DK-35A (36-DK35A-000): DIN RAIL Mounting Kit

Matrix-522 User Guide
‧2‧
2. Layout
25
12.5
4
167.5
5.9
104
Reset
Button
40
1
10

Matrix-522 User Guide
‧3‧
3. Pin Assignment and Definition
3.1 Reset Button
Press the “Reset” button to activate the hardware reset. You should only use this function if the
software does not function properly.
3.2 Power LED
The Power LED will show solid green if power is properly applied.
3.3 Ready LED
The Ready LED will show solid green if Matrix-522 complete system boot up. If Ready LED is off
during system boot up, please check if power input is correct. Turn off the power and restart
Matrix-522 again. If Ready LED is still off, please contact the manufacture for technical support.
3.4 Link / Act LED
When Ethernet port are connected to the network, Link/Act will show solid green and if there is traffic is
the Ethernet port, this LED will flash.
3.5 Serial / CAN Port LED
The dual color LEDs indicate the data traffic at the serial bus and CAN bus. When RXD line is high
then Green light is ON and when TXD line is high, Yellow light is ON.
3.6 Ethernet Port
Pin No.
Signal
1
ETx+
2
ETx-
3
ERx+
6
ERx-
3.7 Serial Ports
Port 1~2: 3-in-1 Software Configurable
RS-232/422/485
Note
Only Port 2 has full modem signals DSR, DTR, DCD.

Matrix-522 User Guide
‧4‧
3.8 Serial Port (DB9 Male)
Pin No.
RS-232
RS-422
RS-485
1
DCD*
TXD-
-
2
RXD
TXD+
-
3
TXD
RXD+
DATA+
4
DTR*
RXD-
DATA-
5
GND
GND
GND
6
DSR*
-
-
7
RTS
-
-
8
CTS
-
-
9
-
-
-
3.9 CAN Port (DB9 Male)
Matrix-522 features two 2500 Vrms fully isolated CAN ports. A 120 Ohm terminator is applied
between CAN_H and CAN_ L that can be disabled by removing jumper J7 and J8. A shielding ground
is available at Pin 3 of the DB9 connector.
3.10 Serial Console Port
Serial console port is located inside the box at CON1. You need to use console cable (91-0P9M9-001)
to access it.
Serial Console RS-232
1
N/C
2
N/C
3
RXD
4
N/C
5
TXD
6
N/C
7
N/C
8
N/C
9
GND
10
N/C
To use the serial console port, you need to open the metal case of Matrix-522 and the CON1 connector
is near the reset button and LEDs. User can also redirect the serial console port to any one of the
serial port by command /setconsole. Please use setconsole —help for the usage.
1
9
2
10
Port 1~2
Note: * Port 2 only

Matrix-522 User Guide
‧5‧
3.11 Digital I/O Port (DB25 Female)
Pin No.
Function
Pin No.
Function
1
DIO0
14
DIO13
2
DIO1
15
DIO14
3
DIO2
16
DIO15
4
DIO3
17
DIO16
5
DIO4
18
DIO17
6
DIO5
19
DIO18
7
DIO6
20
DIO19
8
DIO7
21
DIO20
9
DIO8
22
GND
10
DIO9
23
GND
11
DIO10
24
VCC3
12
DIO11
25
VCC5
13
DIO12
Note
1. VCC3: 3.3 VDC output
2. VCC5: 5 VDC output
3. GND: Digital Ground
3.12 Factory Default Settings
LAN 1 IP Address: 192.168.2.127
LAN 2 IP Address: 192.168.3.127
Login: root or guest (telnet guest only)
Password: root or guest (telnet guest only)
Serial Console Port:
Baud rate: 115200
Data format: 8 Bits, No Parity, 1 Stop bit (N,8,1)
Flow Control: None
Terminal type: VT100
1
2
3
4
5

Matrix-522 User Guide
‧6‧
3.13 Power on and System Boot up
Once Matrix-522 is correctly power on, it will start boot Linux kernel and mount file system. You can
use Ethernet and telnet and login Matrix-522. Once kernel loaded, it will find /sbin/init and execute it.
The initialization configuration is at /etc/inittab. Once boot up, you can use telnet to login Matrix-522.
3.14 Inittab and Run Levels
Inittab contains information of system initialization. The system initialization script /etc/rcS.d runs first
then the run level 5 /etc/rc5.d.Matrix-522 uses run level for system setup and the default run level is
number 5. Please refer to introduction to linux (http://tille.garrels.be/training/tldp/) for information
about run level.
Following is the run levels setting:
Run level 0: halt
Run level 1 is single user (login and service are disabled)
Run level 2~5 are multiple users
Run level 6 is reboot
Please refer to loader menu section for selection of run level.
3.15 Default Started Service
1. amgrd (Artila broadcast search daemon)
2. ssh (secured shell) with sftp
3. syslog/klogd (system and kernel log)
4. telnet server (disable root with /etc/securetty)
5. ftp server (vsftp)
6. web server (lighttpd)
7. Ready LED (debug LED for internal use)

Matrix-522 User Guide
‧7‧
3.16 Network Settings
3.17 Insert Kernel Module
To insert kernel module while system boot up, please use vi to edit /etc/modules to add module to
load e.g.
rt73usb
To load the USB WLAN adaptor.
Use vi editing tool to edit the /etc/network/interfaces for network setting. The default setting is static
IP 192.168.2.127. Matrix-522 also supports Wireless LAN. Use
wireless_essid XXX
wireless_key YYY
To add SSID and WEP key if necessary. XXX is SSID and YYY is WEP Key.
Matrix-522 supports popular USB WLAN adaptor. Please contact Artila for the most update driver
support.

Matrix-522 User Guide
‧8‧
3.18 File System
The 256MB NAND Flash memory of Matrix-522 contains Boot loader (uBoot), Linux Kernel, Root File
System and user disk (\home). The file system and disk space are shown as follow:
3.19 Devices List
The supported devices are shown at /dev directory. Following list are most popular ones:
1. ttyS0: serial console port
2. ttyS1 to ttyS2: serial port 1 to port 2
3. sda to sdb: USB flash disk
4. ttyUSB0 to ttyUSB1: USB RS-232 adaptor (fdti_sio.ko)
5. rtc: Real Time Clock
6. gpio: General Purpose digital I/O
7. ttyACM0 and ttyACM1: USB Modem (CDC compliant)
8. mmc: SD driver
Note
can0 and can1 are network devices under SocketCAN.
3.20 Utility Software
Matrix-522 includes busybox utility collection and Artila utility software and there are placed at:
/sbin
/bin
/usr/bin
/use/sbin

Matrix-522 User Guide
‧9‧
Please refer to Appendix for the utility collection list.
3.21 Mounting External Storage Memory
To find out the device name of the external memory device which plug into Matrix-522, you can use the
command:
dmesg | grep sd
dmesg | grep mmc
To find out the device type (sda, sdb or mmc).
And use
mount/dev/sda1
mount/dev/mmc
to mount the USB disk or SD card and folder is local at
media/sda1 or /mnt/sda1
3.22 Welcome Message
To modify the welcome message, user can use text edit to modify the /etc/motd.

Matrix-522 User Guide
‧10‧
3.23 Web Page Directory
The web pages are placed at /usr/www and the /etc/lighttpd.conf contains the lighttpd web server
settings. The home page name should be index.html.
3.24 Adjust the System Time
To adjust the RTC time, you can follow the command:
date MMDDhhmmYYYY
where
MM=Month (01~12)
DD=Date (01~31)
hh=Hour
mm=minutes
YYYY=Year
hwclock –w
To write the date information to RTC.
User can also use NTP client utility on Artila FTP to adjust the RTC time.
ntpclient [time server ip]
3.25 SSH Console
Matrix-522 supports SSH. If you use Linux computer, you can use SSH command to login Matrix-522.
The configuration of SSH and key are located at /etc/ssh.
The key generation program is available at /usr/bin.
3.26 Putty Console Software
For Windows user, you can download the putty software at
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to use SSH to login Matrix-522.

Matrix-522 User Guide
‧11‧
3.27 ipkg Package Software Management
ipkg is a light software package utility. It can be used to install, upgrade and remove the software
package for Matrix-522.Currently user can use ipkg to install the software package from Artila FTP.
You can find the configuration at ipkg.conf.
When Matrix-522 is connected to network and issue command:
ipkg update
To update the package list and use
ipkg install
To install software package and
ipkg remove
To remove software
ipkg list
To list available software
ipkg list_installed
To list software installed
Please refer to Appendix for more about ipkg.
3.28 SocketCAN
Matrix-522 supports SocketCAN which implements a standard network interface for CAN protocols for
Linux. Unlike other CAN implementation for Linux based on character devices, SocketCAN uses
Berkeley socket API, the Linux network stack and implements CAN device drivers as network
interfaces.
The CAN socket API has been designed as similar as possible to the TCP/IP protocols to allow
programmers, familiar with network programming, to easily learn how to use CAN sockets.
Please refer to the document:
\Example\CanBus\socketcan\socketCAN.txt on Artila FTP for the SocketCAN API.
3.29 libsocketcan
The libsocketcan library allows you to control some basic functions in socketcan from userspace.
Please refer to:
\Example\CanBus\libsocketcan for the examples program for libsocketcan.

Matrix-522 User Guide
‧12‧
3.30 Configure CAN
To configure CAN device, you can use utility programs:
/canconfig
/candump
/canecho
/cansend
/cansequnce
User can also use ip command to configure CAN e.g.
/ip link set can0 down
/ip link set can0 type can bitrate 250000
/ip link set can0 up
/ip –details link show can0
The boot up CAN bit rate setting is at /etc/can_config
Format: [can port]: [bit rate]
0:250000
1:250000
Bit rate: 10K~ 1M

Matrix-522 User Guide
‧13‧
3.31 CANOpen
The Artila FTP also includes CanFestival 3 open source for CANOpen.
Please refer to:
\example\CanBus\canfestival
and http://www.canfestival.org for Canfestival.
3.32 Install GNU Toolchain
Find a PC with Linux OS installed as followed:
Fedore 7, ubuntu 7.04, OpenSUSE 10.2, Mandriva 2008, Debian 5.0, Centos (RedHat) 5 and above.
Login as a root user then copy the arm-linux-4.3.2.tar.gz to root directory of PC. Under root directory,
type following command to install the Matrix-522 Toolchain:
#tar -xvfj arm-linux-4.3.3.tar.bz2
The toolchain file name are:
arm-linux-gnueabi-gcc
arm-linux-gnueabi-g++
arm-linux-gnueabi-strip
Version: gcc 4.3.3, glibc 2.9, binutils 2.18
For Windows user, please download the toolchain from CodeSourcery at
http://www.codesourcery.com/sgpp/lite/arm/portal/package4547/public/arm-none-linux-gnueabi/arm-2
009q1-203-arm-none-linux-gnueabi.exe
The toolchain file name are:
arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-g++
arm-none-linux-gnueabi-strip
Version: gcc 4.3.3, glibc 2.8, binutils 2.19

Matrix-522 User Guide
‧14‧
3.33 Getting Started with the Hello Program
There are many example programs on Artila FTP. To compile the sample you can use the Make file
and type:
make
To compile and link the library. Once done, use ftp command
ftp 192.168.2.127
Then login with password. Use bin command to set transfer mode to binary
ftp>bin
To transfer the execution file to Matrix-522 user disk (/home/guest) and use
chmod +x file.o
To change it to execution mode and
./file.o
to run the program.
3.34 Auto Start Program on Boot
To start a program on boot, you can use /etc/rc.local.
For example to use vi to edit rc.local
hello &
exit 0
Hello will be executed after system boot up. rc.local has the similar function as /etc/rc in Matrix-522.

Matrix-522 User Guide
‧15‧
4. Artila Utility Software
The introduction of Artila utility software as follow:
4.1 update
Update loader, environment file and kernel image. Type update--help to find the command usage.
Update can only operate under supervisor mode (password: root). Please use command su and login
as root.
4.2 setuart
Configure serial port setting. An example show as followed to configure port 1 as RS-485 interface
with baud rate 921600.
4.3 setconsole
Unlike Matrix-510 which shares the serial console port with the serial port 3, Matrix-522 uses dedicated
pins for serial console (debug port). setconsole command allows user to redirect the serial console
port to any one of the four serial port of Matrix-522. Therefore user can avoid opening the metal case
to access the serial console.

Matrix-522 User Guide
‧16‧
4.4 version
Find out the version of OS.
4.5 gpioctl
The gpio can be configured by gpioctl and the usage is as shown followed.
Table of contents
Other Artila Industrial PC manuals

Artila
Artila Matrix-516 User manual

Artila
Artila Matrix-513 User manual

Artila
Artila Matrix 522 User manual

Artila
Artila Matrix-518 User manual

Artila
Artila Matrix-512 User manual

Artila
Artila Matrix-500 User manual

Artila
Artila Matrix-605 User manual

Artila
Artila Matrix-505 User manual

Artila
Artila Matrix-700 Installation instructions