Linux and Windows CE network based on PPP protocol

Source: Internet
Author: User
Tags ftp connect require

This paper introduces the method of working together Linux host and Windows CE device through network. This article first uses the PPP protocol to establish a connection between a Linux host and a Windows CE device, and then runs an FTP server on a Windows CE device that enables Linux hosts to access resources on Windows CE devices. The solution described in this article also applies to Windows 9x/2000/nt hosts.

Background information

Linux is a UNIX-like operating system that originated in Finland, a hobby called Linus Torvalds, but is now one of the most popular free operating systems. With ordinary users working on Linux, browsing the web, sending mail and playing games, many universities and research institutes are also linux to perform daily computing tasks. In the business world, because of the low price, high security and stability of Linux systems, many companies build their servers on a Linux basis. According to the International Business Data Corporation (IDC), about One-third of the world's Web servers use Linux as the operating system.

Windows CE, as defined by Microsoft in Windows CE and Pocket Pc:faq, is a series of components used by operating system developers to build proprietary operating systems. The original equipment manufacturer (OEM) can buy a Microsoft integrated development environment called the Windows CE Platform development system and use the system to assemble and compile a Windows CE based operating system that includes a series of Windows CE based Components and the developer's own application software or device drivers. Because the Windows CE based operating system has a similar user interface to Microsoft's Windows family of operating systems, it is favored by many end users and developers. At present, Windows CE has been widely used in mobile phones, handheld computers, personal digital assistants, fast translation and electronic dictionaries and other portable devices.

For a long time, users of Windows CE devices also need to be equipped with a Windows 9x/2000/nt host to Exchange data with Windows CE devices. Running Microsoft's Windows CE Service software on this host, the software uses a RS-232 data line to establish a point-to-point connection with Windows CE devices, and users can access Windows CE devices through the service software, but other computers on the local area network cannot Enough to access the Windows CE device. If you need to make the device accessible to other computers in your local area network, it is a very inexpensive solution to install expensive dedicated network adapters and associated access devices for the device.

This article uses the Red Hat Linux 7.2 operating system's own PPP server to establish a TCP/IP connection between Windows CE devices and then runs an FTP server on a Windows CE device that enables Linux hosts to access resources on Windows CE devices. This method is an economical and practical solution because it is based on the RS-232 data cable brought by the Windows CE device and does not need to purchase any additional equipment. In addition, the solution described in this article also applies to Windows 9x/2000/nt hosts.

Connecting Linux with Windows CE

Point-to-Point data Transfer Protocol (point to Point Protocol, PPP) is a protocol that transmits IP packets over a serial line. Using the PPP protocol, a computer can log on to a remote host through a communication device such as a serial port line or telephone line, and take advantage of the host or the resources of the host network. In point-to-point communication, there are two parts of the server and client, where the client requests a network connection from the server, and the server receives the client's request to establish a network connection and assign it to the corresponding network resources of the client. When a network connection is established, the server and the client are strictly peers. Since Linux operating systems typically have PPP servers and client programs, and Windows CE operating systems typically only have PPP client programs, we use Linux hosts as PPP servers and Windows CE devices as PPP clients.

To use a Linux host as a PPP server, we first have to verify that the PPP server program PPPD is installed on the host. Typically, the program is installed in the/usr/sbin directory, and we can use the following command to find out if this file exists under the directory:

ls /usr/sbin/pppd

The recently released Linux operating system (for example, Red Hat Linux 6.x/7.x) is usually pre-installed with a PPP server program. If the Linux host does not have a PPP server installed, then we should first download and install a PPP server program, such as pppd2.3.4. Installing the package may also require additional package support, as the application installation is beyond the scope of this article, please refer to other relevant information for interested readers.

After confirming that the PPP server has been installed on the Linux host, we need to make some necessary configuration for the Linux host, and we need to have root permissions for these configurations.

Establish the document/etc/ppp/peers/wince, which reads as follows:

/dev/ttyS0 115200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/wince.chat'
noauth
local
90.0.0.1:90.0.0.2

Establish the document/etc/ppp/wince.chat, which reads as follows:

TIMEOUT 3600
"CLIENT" "CLIENT\c"
"" "SERVER\c"

In the two configuration files above, using wince as the filename is only used to indicate that the profile is used for a Windows CE device. Readers can also choose other file names, such as palm or handheld, and so on, but must ensure that two filenames are consistent.

The profile/etc/ppp/peers/wince specifies that a serial ttyS0 is used to establish a connection with a client device at the 115,200 bps rate, noauth parameter description does not require authentication when the client requests a connection. In this peer-to-peer connection, the IP of the server (Linux host) is 90.0.0.1, and the IP of the client (Windows CE device) is 90.0.0.2. The timeout parameter in the profile/etc/ppp/wince.chat specifies the wait time for the server, and terminates the current server program if the connection request is not received by the client at this time. If a reader needs to learn more about the configuration, refer to the documentation for chat and PPPD.

The configuration you need to do on the Windows CE device is relatively simple. Because the Windows CE Default automatic connection feature consumes the device's serial port, we first need to stop using that feature. In the Start menu, select Set-> communication->pc and set it to stop connecting to your PC without enabling it. Then we re-establish a connection, select "Program-> communication-> Connection Manager" in the Start menu, then click the "New Connection" icon, name the new connection Linux and specify the connection type as "straight connection", and the next STEP Specifies to connect using COM1 and set its communication rate to 115,200, which is specified in the TCP/IP settings for IP 90.0.0.2. Click OK to save the connection will appear in the "Program-> Communication" menu.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.