Moxa Technologies EM-1240-LX Loading Factory Defaults, Autostarting User Applications on Bootup

Page 46

EM-1240-LX User’s Manual

Configuring EM-1240-LX

+bin

Loading Factory Defaults

The easiest way to “Load Factory Defaults” is with the “Upgrade User directory” operation. Refer to the previous section “How to Upgrade User Directory” for an introduction.

You may also press the RESET button for more than 5 seconds to load the factory default configuration or input the command “ldfactory” in telnet console to restore the factory defaults.

Mirroring the Application Program and Configuration

For some applications, you may need to “Mirror” (or sometimes “Ghost”) one EM-1240-LX’s user directory, and duplicate it to other EM-1240-LXs.

To do this, use the following recommended procedure:

1.Backup the user directory to a PC.

(Refer to the previous topic User Directory BackupEM-1240-LX to a PC.)

Hint:

/ramdisk>backupfs /ramdisk/<user defined file name>

2.Download the backed up user directory to the other EM-1240-LX. (Refer to the previous topic Upgrading the User Directory)

Hint:

/ramdisk>bf /ramdisk/<User directory file name>

Autostarting User Applications on Bootup

Edit the /etc/rc file by adding your application program. E.g.,

/ap-directory/ap-program &

Checking the Kernel and Root File System Versions

Use the following commands to check the version of the kernel and root file system:

To check the kernel version:

/>kversion

4-13

Image 46
Contents EM-1240-LX User’s Manual First Edition, NovemberCopyright Notice Table of Contents Chapter EM-1240-LX Device API Introduction Overview Package ChecklistProduct Features EM-1240-LXProduct Specifications Hardware SpecificationsSoftware Specifications Hardware Block Diagram Appearance EM-1240 Development Kit Embedded ModuleEM-1240 Embedded Module EM-1240 Development Kit Dimensions LED Indicators Installing the EM-1240-LXWiring Requirements Connecting the Power Connecting Data Transmission CablesGrounding the EM-1240-LX Connecting to the Network Connecting to a Serial DeviceAdditional Functions Reset ButtonInternal SD Socket Serial Console PortReal-time Clock Getting Started Connecting the EM-1240-LX to a PC Powering on the EM-1240-LXConsole Port 192.168.3.127 255.255.255.0 Default IP Address Default NetmaskTelnet 192.168.4.127 255.255.255.0Configuring the Ethernet Interface Ifconfig eth0 Dhcpcd -p -a eth0 & dhcpcd -p -a eth1Installing a Secure Digital SD Memory Card Step Installing the EM-1240-LX Tool ChainDeveloping Your Applications #mount -t iso9660 /dev/cdrom /mnt/cdromEM-1240-LX User’s Manual Compiling Hello.c PATH=/usr/local/arm-elf/bin$PATHUploading Hello to the EM-1240-LX #makeRunning Hello on the EM-1240-LX # chmod 755 hello #./helloMake File Example Code Cflags =Software Package EM-1240-LX Software Architecture Journaling Flash File System JFFS2 Flash Context Flash Address Size Access controlAdditional information about JFFS2 is available at EM-1240-LX Software Package Bin DevPtyp0 Ppp Pio Rtc Ram1 Ram0 Null Kmem Mem Cua0 Console Tty Configuring the EM-1240-LX ‰ Iptables ‰ NATExample default enable Enabling and Disabling DaemonsDefault Home Page address Adding a WebLocal Host Packets Usage Define policy rules, and Append or delete rulesExamples Define policy for chain rules Enabling NAT at Bootup NAT ExampleDial-out Service Configuring Dial-in/Dial-out ServiceConfiguring PPPoE Dial-in ServiceHow to Mount a Remote NFS Server Dynamic Driver Module Load/UnloadUpramdisk Ramdiskupkernel em1240-1.x.bin /ramdiskrebootUpgrading the Kernel Cd ramdiskUpgrading the Root File System & User Directory Upramdisk Cd ramdiskUser Directory Backup-EM-1240-LX to PC Ramdiskbackupfs /ramdisk/usrdisk-backupAutostarting User Applications on Bootup Loading Factory DefaultsMirroring the Application Program and Configuration Checking the Kernel and Root File System VersionsFsversion Cat /etc/versionEM-1240-LX Device API Buzzer RTC Real-time ClockUart Interface UC Finder Windows UC Finder EM-1240-LX User’s Manual UC Finder EM-1240-LX User’s Manual UC Finder Linux UC Finder File manager System CommandsBusybox µClinux normal command utility collection EditorOther NetworkProcess Moxa Special UtilitiesSnmp Agent with MIB II & RS-232 Like Group Snmp Agent with MIB II & RS-232 Like Group Ip MIB Tcp MIB Udp MIBSnmp MIB RFC1317 RS-232 like group supported variables Rs232 MIBEM-1240-LX FAQ Service Information Moxa Internet Services Following services are providedProblem Report Form Moxa Product † EM-1240-LX Serial NumberProduct Return Procedure