Download M501 user guide V2

Transcript
M501 Software Specifications
OS: Linux 2.6.14
Boot Loader: U-Boot 1.1.2
File System: JFFS2, EXT2/EXT3, VFAT/FAT, NFS
Protocol Stacks:
IPV4, ICMP, ARP, DHCP, NTP, TCP, UDP, FTP,
Telnet, HTTP, PPP, PPPoE, CHAP, PAP, SMTP, SNMP
V1/V3, SSL, SSH 1/2
Utilities:
Bash: Shell Command
Tinylogin: Login and user manager utility
Telnet: Telnet client program
Busybox: Linux utility collection
FTP: FTP client program
Daemon
pppd: Dial In/out over serial port and PPPoE
snmpd: SNMP agent program
telnetd: Telnet server program
inetd: TCP server program
ftpd: FTP server program
boa: Web server program
sshd: secured shell server
iptables: Firewall service manager
armd: Artila manager daemon
Tool Chain for Windows/Linux
GCC: C/C++ PC cross compiler
GLIBC: POSIX Library
Standard Device Drivers:
ttyS0: serial console port (AT91RM9200 debug port)
ttyS1~ttyS4: serial ports (AT91RM9200
UART0~UART3)
gpio: General Purpose I/O
mmc: SD/MMC:
rtc: Real Time Clock
sda: USB flash memory disk
ttyACM: USB Modem
ttyUSB: USB RS-232 adaptor
spi: spi bus
Default Setting
Default IP Address:192.168.2.127
Netmask: 255.255.255.0
ssh Login: root
Password: root
Telnet Login: guest
Password: guest
Terminal type: VT100
Network Configuration
To configure the IP address, Netmask and Gateway setting, please modify
/disk/etc/rc as following:
#Static IP
ifconfig eth0 192.168.2.127 netmask 255.255.255.0
For DHCP setting:
#DHCP
dhcpcd eth0 &
Wireless LAN Configuration
M-501 supports wireless LAN by using USB WLAN adaptor which uses
Ralink RT2571 controller. Please refer to the website
http://ralink.rapla.net for the supporting list of the USB WLAN adaptor. To
configure the wireless LAN setting, please use command:
ifconfig wlan0 up
iwconfig wlan0 essid XXXX key YYYYYYYY mode MMMM
For infrastructure mode XXXX is the access point name and YYYYYYYY
is the encryption key and MMMM should be managed
For Ad-Hoc mode mode XXXX is the M-501 device name and
YYYYYYYY is the encryption key MMMM should be ad-hoc. To
configure the IP address use command
dhcpcd wlan0 & or ifconfig wlan0 192.168.2.127 netmask 255.255.255.0
Install GNU Tool Chain
Find a PC with Linux 2.6.X Kernel installed and login as a root user then
copy the arm-linux-3.3.2.tar.gz to root directory \ of PC. Under \ directory
type following command to install the M-501 Tool Chain
#tar zxvf arm-linux-3.3.2.tar.gz
I/O Devices Control
M-501 uses standard I/O device control to access following devices:
1.
Ethernet: eth0
2.
Serial Ports: ttyS1, ttyS2, ttyS3,ttyS4
3.
Serial Console Port: ttyS0
4.
Real time clock: rtc
5.
USB Flash Disk: sda, sda1, sdb, sdb1
6.
SD memory Card: mmc0
7.
USB WLAN dongle: wlan0
8.
USB Serial Cable: ttyUSB0, ttyUSB1
9.
SPI bus: spi0, spi1
Remark: Remember to include the “matrix500.h” header file in your
program. Please refer to the example program included in the M-501 SDK
CD to demo the RS-232/422/485 mode configuration of serial port 1
configuration.
File System
Matrix 500 uses jffs2 file system for the built-in flash memory
disk. The directory are:
/disk
/home
/etc
Write data to these directories are saved to flash memory and will
not be erased after power off.
Mount External Disk
To mount the USB Flash Disk and SD memory card, use
following commands after the disk are installed properly. To
mount USB disk
mount /mnt/sda or mount /mnt/sda1 or mount /mnt/sdb or
mount /mnt/sdb1
To find out the device name of the USB disk, you can use
dmesg | grep sd
And to mount SD memory card
mount /mnt/mmc
Web Page Directory
The web pages are placed at /home/httpd and the boa.conf
contains the boa web server settings. The home page name
should be index.html
Welcome Message
The welcome message “Artila” can be modified by editing the /
etc/motd file.
Manager Utility Software
The Manager Utility software, manager.jar is a java program
and is used to discovered the Matrix 500 in the network if the IP
address is forgotten. It can be run at any OS where java run time
is available. To install the java run time platform at your
computer, please visit http://java.sun.com and download the
Java 2 Standard Edition (J2SE). Once the Matrix 500 is found,
you can click the Telnet Console to configure the Matrix 500
Upload file to M-501
To upload the file to M-501, you can use FTP command in
command line or Web Browser such as Microsoft Internet
Explorer. Type ftp://192.168.2.127 and under the file menu,
click log on option to login M-501. After login, you can see the
files system of M-501.
Compile and upload the C program
Use following command of the GNU cross compiler to compile
the C program
#arm-linux-gcc –o hello hello.c
Then upload the hello to M-501. Remember to change the mode
of the file
After upload to M-501 by
chmod +x hello