Moxa Technologies UC-7420/7410 Connecting Peripherals, USB Mass Storage, CF Mass Storage

Page 52

UC-7420/7410 User’s Manual

Managing Embedded Linux

Connecting Peripherals

USB Mass Storage

This function is only available for firmware version V1.5 (and later versions).

The UC-7420/7410 supports PNP (plug-n-play), and hot pluggability for connecting USB mass storage devices. UC-7420/7410 has a built-in auto mount utility that eases the mount procedure. The first connected USB mass storage device will be mounted automatically by mount to /mnt/sda, and the second device will be mounted automatically to /mnt/sdb. UC-7420/7410 will be un-mounted automatically with umount when the device is disconnected.

ATTENTION

Remember to type the #sync command before you disconnect the USB mass storage device. If you don’t issue the command, you may lose some data.

Remember to exit the /mnt/sda or /mnt/sdb directory when you disconnect the USB mass storage device. If you stay in /mnt/sda or /mnt/sda, the auto un-mount process will fail. If that happens, type #umount /mnt/sda to un-mount the USB device manually.

UC-7420/7410 only supports certain types of flash disk USB Mass Storage device. Some the USB flash disks and hard disks may not be compatible with UC-7420/7410. Check compatibility issues before you purchase a USB device to connect to UC-7420/7410.

CF Mass Storage

The UC-7420/7410 supports PNP and hot pluggability for connecting a CF mass storage device. UC-7420/7410 has a built-in auto mount utility that eases the mount procedure. The CF mass storage device will be mounted automatically by the mount command to /mnt/hda. UC-7420/7410 will be un-mounted automatically by umount when you disconnect it.

3-12

Image 52
Contents UC-7420/7410 User’s Manual Third Edition, JuneTrademarks Copyright NoticeDisclaimer Table of Contents Chapter UC Finder Appendix B Windows Tool Chain Introduction Introduction ‰ Hardware IntroductionPackage Checklist Product FeaturesOverview UC-7410-LXProduct Hardware Specifications Hardware Introduction Appearance and DimensionsAppearance Dimensions LED Indicators Hardware Block DiagramLED Name Color Meaning Reset-type Buttons Reset ButtonReset to default Button Real Time ClockPlacement Options Wall or CabinetHardware Connection Description Wiring RequirementsDIN-Rail Mounting Connecting the Power Connecting to the NetworkPin Signal Grounding UC-7420/7410Connecting to a Serial Device Connecting to the Console PortCompactFlash Pin RS-232 RS-422 RS-485Software Introduction Software ArchitectureJournaling Flash File System JFFS2 Software PackageSoftware Version Comparison Table Protocol stacks and utilities Directory Change‰ Configuring the Ethernet Interface Getting StartedConnecting UC-7420/7410 to a PC Powering on UC-7420/7410Serial Console Default IP Address Netmask Telnet Console192.168.3.127 255.255.255.0 192.168.4.127 255.255.255.0SSH Console Windows UsersConfiguring the Ethernet Interface Modifying Network Settings with the Serial ConsoleLinux Users Static IP addressesDynamic IP addresses Configuring the Wlan via the Pcmcia Interface Modifying Network Settings over the NetworkDefault IP address is 192.168.5.127, netmask IEEE802.11b#vi /etc/wlan/wlancfg-any IEEE802.11g Setting Explanation SettingKey1Str, Key2Str, Key3Str, Key4Str-Sets strings Key1 to Key4 TurboRate-Enables or disables TurboRate Installing the Tool Chain Linux Test Program-Developing Hello.cChecking the Flash Memory Space StepCompiling Hello.c You should receive the following responseDeveloping Your First Application Testing EnvironmentUploading Hello to UC-7420/7410 and Running the Program Compiling tcps2.c #mount -t iso9660 /dev/cdrom /mnt/cdromUploading tcps2-release and Running the Program PuTTY#jobs // use this command to check if the program is running Testing Procedure Summary UC-7420/7410 User’s ManualUC-7420/7410 User’s Manual ‰ System Version Information ‰ System Image Backup Managing Embedded LinuxSystem Image Backup System Version InformationUpgrading the Firmware Upgrading the firmware will erase all data on the Flash ROM#upramdisk #cd /mnt/ramdisk Loading Factory Defaults Firmware versions earlier than V1.5 not including Backing Up the User File SystemFirmware version V1.5 and later versions Enabling and Disabling Daemons UC-7420/7410 User’s Manual Managing Embedded Linux Setting the Run-Level Adjusting the System Time Setting the Time ManuallyNTP Client Example shell script to update the system time periodicallyUpdating the Time Automatically Cron-daemon to Execute Scheduled Commands Change mode of fixtime.shEnable the cron daemon manually Enable cron when the system boots upUSB Mass Storage Connecting PeripheralsCF Mass Storage Managing Communications ‰ Iptables ‰ NATWeb Service-Apache Telnet / FTPEnabling the Telnet/ftp server Disabling the Telnet/ftp serverUsr/www/cgi-bin Saving a Web Page to the CF Card Use the following commands to restart the Apache web server Iptables Local Host Packets Observe and erase chain rules Define policy for chain rulesUsage ExamplesAppend or delete rules IptmacEnabling NAT at Bootup NAT ExampleDial-up Service-PPP Example 2 Connecting to a PPP server over a hard-wired link How to check the connection UP Loopback RunningSetting up UC-7420/7410 as an NFS Server Setting up a Machine for Incoming PPP ConnectionsNFS Network File System #vi /etc/exportsSetting up UC-7420/7410 as an NFS Client Mail Steps 2Open VPN Internet IFS=‘ Create link symbols to enable this script at boot time Destination Gateway Genmsk Flags Metric Use Iface Now ping Host B from Host a by typing Setup 3 Routed IP Destination Gateway Genmsk Flags Metric Use Iface Programmer’s Guide Flash Memory Map Address Size ContentsLinux Tool Chain Introduction Debugging with GDB Obtaining helpCross Compiling Applications and Libraries Tools Available in the Host EnvironmentRTC Real Time Clock Device APIBuzzer WDT Watch Dog Timer Input Int fd File handle from swtdopen return value Output Special Note User application example ExampleSwtddisableswtdfd Int mainint argc, char *argv Pidt sonpid Example to set the baud rate Example to get the baud rateKeyPad Baud rate inaccuracySpecial Note ExamplesMake File Example UC Finder Installing the Software Windows UC FinderUC-7420/7410 User’s Manual UC Finder Broadcast Search Linux ucfinder System Commands Busybox V0.60.4 Linux normal command utility collectionFile manager EditorOther ProcessMoxa special utilities Windows Tool Chain Introduction Introduction Installation Procedure Select the Root DirectoryUC-7420/7410 User’s Manual Windows Tool Chain Introduction UC-7420/7410 User’s Manual Windows Tool Chain Introduction Using the Bash Shell GDB debug tool-Insight UC-7420/7410 User’s Manual Windows Tool Chain IntroductionUC-7420/7410 User’s Manual Windows Tool Chain Introduction Service Information Moxa Internet Services Following services are providedProblem Report Form Moxa Product † UC-7410-LX † UC-7420-LX Serial NumberProduct Return Procedure