Artila Matrix 504 User manual

Overview
Matrix504 isaLinux ready, ARM9-basedembeddedcomputer.
Itslowerpowerandrobustdesign conceptmakesitanideal
industrialcomputerplatformforharshenvironment.TheLinux
OS andfilesystemarepre-installedintheon-boardFlash
memoryand theGNUtoolchainCDcomingwithMatrix504is
readyforyourapplicationdevelopment.
Features
1. ARM926EJ-SARMThumbProcessor400MHzw/MMU
2. 32-KByteData Cacheand 32-KByteInstructionCache
3. 128MBSDRAM, 128MBNAND Flashonboard
4. One10/100MbpsEthernet
5. TwoUSB2.0fullspeed(12Mbps)HostPorts
6. OnesoftwareconfigurableRS-232/422/485portandthree
RS-232/485 ports
7. Oneserialconsoleport
8. 5programmableGPIO
9. 9to48VDCpowerinput
10. Pre-installedLinux2.6.29kernel andfilesystem
11. GNUtoolchainavailableinArtilaCD
12. OptionalDINRAILmountingadaptor
PackingList
Matrix504 isshippedwithfollowingitems
1. Matrix504
2. ArtilaCDincludesToolChain,Installationguideand
Utilitysoftwareand device driverandexampleprograms
OptionalAccessory
1. CB-RJ45F9-150:RJ45 toDB9FemaleCable
2. CB-RJ2CON-100:SerialConsoleCable
3. DK-35A:DINRAILMounting Kit
4. PWR-12V-1A:110~240VACto12VDC1APower
Adaptor
Matrix504Layout
Matrix504 QuickInstallationGuide USBPort
TheUSBportisanUSB2.0highspeedhostport.Itcanbe
usedtoexpandthehardwarefunctionof Matrix504and
exchangefileanddatabetweenPCandMatrix504usingan
USBflashdisk.CurrentlythehardwaresupportbyMatrix504
USBisshownasfollow:
1. USBStorageDevice
2. USBtoWireless LAN Adaptor(Ralink RT73)
3. USBtoSerialAdaptor(fdtiusbtoUART)
4. USBtoModem(CDCcompliant)
5. USBCamera
TheUSBclientportisreservedforproductionpurposeonly.
Contact Artilaifyoufindyourhardwareisnotshownonthe
list.
ResetButton
Press the Reset”buttontoactivatethehardwarereset.Please
alwaysuse reboot”commandtoresetMatrix504. Youshould
onlyusethisfunctionifthesoftwarerebootdoesnotfunction
properly.
PowerLED
ThePowerLEDwill showsolidgreenifpowerisproperly
applied
10/100MbpsEthernet
USB2.0Hostx2
Reset
9-48VDCPower
Serial Console
P1/P2/P3/P4
SerialPorts
PowerLED
SystemReadyLED
EthernetLED
SerialPort LED

ReadyLED
AfterPowerON,Matrix504startsbooting.Once systemisbootup,
theReadyLEDwill showsolidgreen. TheReadyLEDwill be
turnedoff afterMatrix504received halt”command.
Link/ActLED
WhenEthernet portareconnectedtothenetwork,Link/Actwill show
solidgreenandifthereistrafficintheEthernet,thisLEDwill flash
SerialPortLED
ThesefourdualcolorLEDsindicatethedatatrafficattheserialports.
WhenRXD lineishighthenGreenlightisON andwhenTXDlineis
high, YellowlightisON.
SerialPort
ThefourserialportscanbeconfiguredasRS-232,RS-422 orRS-
485 bysoftware.TheyuseRJ45 connectorand thepin
assignmentareshownasfollowingtable.
Port1:RS-232/422/485
RS-232:RXD,TXD,RTS,CTS,DSR,DTR,DCD,GND
RS-422:TXD+,TXD-,RXD+,RXD-,GND
RS-485:DATA+,DATA-,GND
Port2/3/4:
RS-232:RXD,TXD,RTS,CTS,DSR,DTR,DCD,GND
RS-485:DATA+,DATA-, GND
SerialConsolePort:
SerialconsoleportisusedforlocallyaccessingMatrix504
systemusing RS-232 port.TheconsoleportusesRJ45 connector
andisnexttoEthernet port.Thereforepleasebecarefultoplug
intherightconnector
Port0:RS-232:RXD,TXD,GND
Thereforeyouneedtoprepareorpurchasetheserialconsole
cable(CB-RJ2CON-100) inordertousetheserialconsoleport.
In additiontotheserialconsolesignal,theconsoleRJ45 portalso
providesGPIO(programmableI/Osignal)function.TheGPIO
portisCMOSI/Oandcanbeprogrammedasdigitalinputor
output.Powerup settingisdigitalinputmodewith75Kohmpull
up resistor.
Console
PowerConnector
Connectthe9to48VDCpowerlinetoMatrix504. Ifthe
powerisproperlysupply, thepowerLEDwill showasolid
greencolor.
Ethernet Port
TheEthernetPortuseRJ45 connector
+
-

InittabandRun levels:
Inittabcontainsinformationof systeminitialization.The
systeminitializationscript /etc/rcS.d runsfirstthentherun
level5 /etc/rc5.dMatrix-504usesrunlevelforsystemsetup
andthedefaultrunlevelisnumber5.Pleasereferto
introductiontolinux(http://tille.garrels.be/training/tldp/) for
informationaboutrunlevel. Followingistherunlevels
setting:
Runlevel0:halt
Runlevel1issingleuser(loginandservice aredisabled)
Runlevel2~5aremultipleusers
Runlevel6isreboot.
Pleaserefertoloadermenusectionforselectionof runlevel
PoweronandSystembootup
Once Matrix-504iscorrectlypoweron,itwillstartbootLinux
kernelandmountfilesystem. YoucanuseEthernetandtelnet
andloginMatrix-504.Once kernel loaded,itwillfind /sbin/
init and executeit.Theinitializationconfigurationisat /etc/
inittab.Once bootup,youcanusetelnet tologinMatrix-504.
FactoryDefaultSettings
LAN 1IPAddress:192.168.2.127
Login:rootorguest(telnetguestonly)
Password:rootorguest(telnet guestonly)
SerialConsolePort:
Baud rate:115200
Dataformat:8Bits,NoParity, 1Stopbit (N,8,1)
FlowControl:None
Terminaltype:VT100
NetworkSettings
Use vi editing tooltoedit the /etc/network/interfaces fornetwork
setting. Thedefaultsetting isstaticIP192.168.2.127. Matrix-504
alsosupportsWireless LAN.Use
wireless_essidXXX
wireless_keyYYY
ToaddSSIDandWEPkeyifnecessary. XXX isSSIDand YYY
isWEPKey
Matrix-504supportsUSBWLAN adaptor(RalinkRT2571).
Youcanenablethedrivermodule(rt73usb)byadding rt73usb in
/etc/modules
File System
The128MBNAND FlashmemoryofMatrix-504containsBoot
loader(uBoot), LinuxKernel,RootFileSystemanduserdisk
(\home).Thefilesystemanddiskspace areshownasfollow
Defaultstartedservice
1. amgrd (Artilabroadcastsearchdaemon)
2. ssh(securedshell)withsftp
3. syslog/klogd (systemandkernel log)
4. telnetserver(disablerootwith /etc/securetty)
5. ftpserver(vsftp)
6. webserver(apache2)
7. ReadyLED(debug LEDforinternaluse)
Insertkernelmodule
Toinsertkernel modulewhilesystembootup,pleaseuse vi to
edit /etc/modules toaddmoduletoloade.g.
rt73usb
ToloadtheUSBWLANadaptor.

UtilitySoftware:
Matrix504 includesbusyboxutilitycollectionand Artila
utilitysoftwareandthereareplacedat:
/sbin
/bin
/usr/bin
PleaserefertoAppendixfortheutilitycollectionlist
Deviceslist
Thesupporteddevicesareshownat/devdirectory. Following
listaremostpopularones:
1. ttyS0:serialconsoleport
2. ttyS1tottyS4:serialport1toport4
3. sdatosdb:USBflashdisk
4. ttyUSB0tottyUSB1:USBRS-232 adaptor(fdti_sio.ko)
5. rtc:Real TimeClock
6. gpio:GeneralPurposedigitalI/O
7. ttyACM0andttyACM1:USBModem(CDCcompliant)
MountingExternalStorageMemory
Tofindoutthedevice nameof theexternalmemorydevice
whichplug intoMatrix504,youcanusethecommand
/dmesg|grepsd
Tofindoutthedevice type(sdaorsdb)
Anduse
mount/dev/sda1
tomounttheUSBdiskand folderislocalat
/media/sda1 or /mnt/sda1
WelcomeMessage
Tomodifythewelcomemessage, usercanusetexteditto
modifythe/etc/motd.
WebPageDirectory
Thewebpagesareplacedat /usr/share/apache2 and the
/etc/apache2/httpd.conf containstheapachewebserversettings.
Thehomepagenameshouldbe index.html
Adjustthesystemtime
ToadjusttheRTCtime,youcanfollowthecommand
/dateMMDDhhmmYYYY
where
MM=Month(01~12)
DD=Date (01~31)
hh=Hour
mm=minutes
YYYY= Year
/hwclock w
TowritethedateinformationtoRTC
UsercanalsouseNTPclientutilityinArtilaCDtoadjustthe
RTCtime.
/ntpclient[timeserverip]
SSHConsole
Matrix504 supportsSSH. IfyouuseLinuxcomputer,youcan
useSSHcommandtologinMatrix504.Theconfigurationof
SSHandkeyarelocatedat
/etc/ssh
Thekeygenerationprogramisavailableat /usr/bin
PuttyConsoleSoftware
ForWindowsuser, youcandownloadtheputtysoftwareat
http://www.chiark.greenend.org.uk/~sgtatham/putty/
download.htmltouseSSHtologinMatrix-504
ipkgpackagesoftwaremanagement
ipkgisalightsoftwarepackageutility. Itcanbeusedto
install,upgradeand removethesoftwarepackageforMatrix-
504.Currentlyusercanuseipkg toinstallthesoftwarepackge
fromArtilaFTP.Youcanfindtheconfigurationat ipkg.conf
WhenMatrix-504isconnectedtonetworkand issuecommand
ipkgupdate
Toupdatethepackagelistanduse
ipkginstall
toinstallsoftwarepackageand
ipkgremove
toremovesoftware
ipkglist
tolistavailablesoftware
ipkglist_installed
tolistsoftwareinstalled
PleaserefertoAppendixformoreabout ipkg

Install GNUToolChain
Find aPCwithLinux 2.6.XKernel installedandloginasaroot
userthencopythearm-linux-3.3.2.tar.gztorootdirectoryof
PC. Underrootdirectory, typefollowingcommandtoinstallthe
Matrix504 ToolChain
#tarzxvfarm-linux-3.3.2.tar.gz
GettingstartedwiththeHelloprogram
TherearemanyexampleprogramsinArtila CD.Tocompilethe
sampleyoucanusetheMakefiletoandtype
make
Tocompileand linkthelibrary. Once done, useftpcommand
ftp192.168.2.127
Andbincommandtosettransfermodetobinary
ftp>bin
totransfertheexecutionfiletoMatrix504 userdisk(/home/
guest)and use
chmod+xfile.o
Tochangeittoexecutionmodeand
./file.o
toruntheprogram
Autostartprogramonboot:
Tostartaprogramonboot, youcanuse /etc/rc.local
Forexampletouse vi toedit rc.local
/guest/hello&
exit0
Hellowill beexecutedaftersystembootup.rc.local hasthe
similarfunctionas /etc/rc inMatrix-500
ArtilaUtilitySoftware:
Theintroductionof Artilautilitysoftwareasfollow:
1. update :updateloader,environmentfileand kernel image.
Type update—help tofindthecommandusage
Updatecanonlyoperatedundersupervisormode(password:
root)
3. version: findouttheversionof OS.
2. setuart: configureserialportsetting.Anexampleshowas
followedtoconfigureport1asRS-485 interface withbaudrate
921600.
4. gpioctl: Thegpiocanbeconfiguredby gpioctl and theusage
isasshownfollowed. Thedefaultsetting isdigitalinputwith
75Kohmpullupresistor.

FrequentlyAskedQuestion
1. Forgotpassword:
Ifyouforgotthepasswordforlogin, pleaseuseserialconsoleand
userunlevel1tobootsystem. Usepasswdtochangethepassword
setting.
2. ForgottheIPaddress
IfyouforgottheMatrix504IPaddress, youcanusetheJava
ManageravailableinArtilaCDtosearchtheIPaddress of Matrix
504
OruseserialconsoleporttofindouttheIPaddress by
#ifconfig
LoaderMenu
Loadermenuhelpsusertoselecttherunlevelofsystemboot
up.Userneedtouseserialconsoletoenterloadermenu.
Pleaseconfiguretheserialportof terminalasfollow:
Baud Rate:115200
Databits:8
Parity:N
Stopbit: 1
FlowControl:None
Terminaltype:VT100
Once powerupMatrix-504,pleaserepeatedlykeying @”
andyouwill see theloadermenuappearasfollow:
Ifyoumiss thetiming, pleasepoweronagaintheMatrix-504
anddoitagain.SelectUwill prompttherunlevelselection
message.Run level0ishalt, runlevel1issingleuser
(disableloginandservice ).Runlevel2~5aremultiple
usersand runlevel6isreboot. Toviewtherunlevel
configuration,pleasecheck
/etc/inittab 3. Systemfailtoboot
Ifyoumess up therootfilesystemandmakethesystemfailtoboot,
Matrix-504willautomaticallyswitchtobootfromDataflashfile
system. TheDataflashfilesystemisreadonlyandusesfactory
default setting. AfterDataflashboot, usercanorganizetheNAND
filesystemforsystemboot.
Ifsystemislockedbyuserprogram e.g.forgetting toadd &atauto
startprogram,usercanuseDataflashboottoeditthe /etc/rc.local
file.
Usercanalsouseloadermenutoforce Dataflashboot

UtilityCollection
1. busyboxv1.14.2-tinyutilitycollection
2. sysvinitv2.86-standard Linux initialization
3. util-linux-mount/umountv2.12r-supportlongfilename
4. sshv4.6p1–supportsftpserver
5. usbutilsv0.7–USBidprogram
6. Apache2v2.23-webserver
7. wgetv1.9.1–usedinipkgsoftware
8. iptablesv1.3.8–IProuting
9. ipkgv.0.99.163–softwarepackagemanagement
10. procpsv3.2.7–supportwebminprocess management
11. vsftpd v2.0.5–ftpserver
12. bashv3.2-GNUshell
13. wireless_toolsv29–wireless LAN utility
14. ppp v2.4.3-pppdialuputility
15. psmicsv22.2–procpssupplement
16. artilautilityv.1.1–handyutilityaddedbyArtila
Youcanfind moreutilityatArtilaMatrix-504CDanduse
ipkgtoinstalltheutility.
Appendix
ipkgsoftwarepackagemanagement
Matrix-504uses ipkg tomanagethesoftwareinstallation, upgradeand
removal.Artilawill continuouslyadd thekernelmoduleandutilityat
ourftpserver,usercaninstallthesesoftwarefrominternet.Inaddition
usercanalsosetup yourftpservertoupdatethesoftwareyouwant.To
installtheutilityfromArtila ftp,pleaseuse vi toeditthe /etc/ipkg.conf
src/gzarm ftp://ftp:ftp@ftp.artila.com/Matrix5xx/tmp/armv5te
src/gzkernel ftp://ftp:ftp@ftp.artila.com/Matrix5xx/tmp/matrix504
YoucanalsocopytheUtilityandmodulefoldertoArtilaCDtoaUSB
disk,thenuseUSBdisktoinstallthesoftwarebychangingthe ipkg.conf
src/gzusb_arm ftp://root:root@127.0.0.1/media/sda1/Utility
src/gzusb_kernel ftp://root:root@127.0.0.1/media/sda1/modules
Makesuretheinternet isconnectedorUSBdiskiscorrectlymount, now
usecommand
ipkgupdate
toupdatethepackagelistanduse
ipkginstallwebmin
Toinstallwebmin. Webminisaweb-basedinterface tosystem
administration.Tostartwebmin, goto /etc/webmin and type
startwebmin
Thenyoucanusebrowsertovisit Matrix-504port10000
http://192.168.2.127:10000
Remembertousecommand
depmod a/lib/modules/2.6.29.4/modules.dep
Toupdatethedependencylistifnewkernel module
wereadded.
ThewebminforMatrix-504providesfollowingmodules:
1. Webmin:webminconfiguration
2. System: systemboot, processandlogmanagement
3. Server:ApacheandSSHserverconfiguration
4. Network:networkconfiguration
5. Hardware: RTCsetting
6. Others:Filemanager,uploadand download
Other Artila Desktop manuals