User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Powering on the W406-LX
- Connecting the W406-LX to a PC
- Configuring the Ethernet Interface
- USB Port for Expansion
- SD Socket for Storage Expansion
- Setting Up the Wireless Module
- Configuring the SIM Card
- Entering the PIN Code
- Verifying the SIM Card Status
- Enabling or Disabling the PIN Code Authentication
- Changing the PIN Code
- Unlocking the SIM Card
- Connecting to the Internet
- Reconnecting to the Internet
- Disconnecting from the Internet
- Detecting an Internet Connection Error
- Sending and Reading an SMS Message
- Deleting an SMS Message
- Test Program—Developing Hello.c
- 3. Managing Embedded Linux
- 4. Managing Communications
- 5. Development Tool Chains
- 6. Programmer’s Guide
- 7. Software Lock
- A. System Commands

W406-LX Linux User’s Manual Programmer’s Guide
6-2
Flash Memory Map
Partition sizes are hard coded into the kernel binary. To change the partition sizes, you will need to
rebuild the kernel. The flash memory map is shown in the following table.
Address Size Contents
0x00000000 – 0x00060000 384 KB Boot Loader—Read ONLY
0x00060000 – 0x00260000 2 MB Kernel object code—Read ONLY
0x00260000 – 0x00b00000 8.6 MB Root file system (JFFS2) —Read ONLY
0x00b00000 – 0x01000000 5 MB User directory (JFFS2) —Read/Write
If the user file system is incorrect, the kernel will change the root file system to the kernel and use
the default Moxa file system. To finish the boot process, run the init program.
NOTE 1. The user file system is a complete file system. Users can create and delete directories and
files (including source code and executable files) as needed.
2. Users can create the user file system on the PC host or target platform, and then copy it to
the W406-LX.
Device API
The W406-LX supports control devices with the ioctl system API. You will need to
include
<moxadevice.h>
, and use the following ioctl function.
int ioctl(int d, int request,…);
Input: int d - open device node return file handle
int request – argument in or out
Use the desktop Linux’s man page for detailed documentation:
#man ioctl
RTC (Real Time Clock)
The device node is located at /dev/rtc. The W406-LX supports Linux standard simple RTC
control. You must
include <linux/rtc.h>
.
1. Function: RTC_RD_TIME
int ioctl(fd, RTC_RD_TIME, struct rtc_time *time);
Description: read time information from RTC. It will return the value on argument 3.
2. Function: RTC_SET_TIME
int ioctl(fd, RTC_SET_TIME, struct rtc_time *time);
Description: set RTC time. Argument 3 will be passed to RTC.