Form Linux and Windows CE network

xiaoxiao2021-03-06  49

Background Description Linux is a system similar to UNIX, which originated in Finland's amateur hobby called LinustorValds, but is now the most popular free operating system. Ordinary users on Linux office, browse websites, send emails, and play games, many universities and research institutions are also Linux to complete their daily computing tasks. In the business sector, due to the low price of Linux systems, high security performance and very stable, many companies build their own servers on Linux. According to the statistics of International Commercial Data Company (IDC), about one-third of the website server in the world uses Linux as an operating system. Windowsce, definition in Windowsce and Pocketpc: FAQ, is based on Microsoft, is a series of components for operating system developers to build a proprietary operating system. Original Equipment Manufacturer (OEM) can purchase a integrated development environment called "Windows Ce Development System" and use the system to assemble and compile the Windows CE-based operating system, including a series of Windows CE-based components and The developer develops the application software or the device driver. Since the Windows CE-based operating system has a user interface similar to the Microsoft Windows Series operating system, it is favored by many end users and developers. Currently Windowsce has been widely used on portable devices such as mobile phones, palms, personal digital assistants, expressions, and electronic dictionaries. For a long time, users of WindowsCE devices also need to be equipped with a Windows9x / 2000 / NT host to exchange data with Windows CE devices. The WindowsCE service software provided by Microsoft is running on the host. The software creates a start-to-point connection with the WindowsCE device through a RS-232 data cable. Users can access WindowsCe devices through this service software, but other computers in the local area network cannot access the WindowsCE device. If you need other computers in the LAN, you need to install expensive private network cards and related access devices for the device, it is a very uneconomical solution. This article uses the RedHatlinux 7.2 operating system to establish a TCP / IP connection between the PPP server and the WindowsCE device, and then run a FTP server on the Windows CE device such that the Linux host can access resources on the Windows CE device. Since this method is based on the RS-232 data cable comes with the Windows CE device, there is no need to purchase additional devices, so it is an economical and practical solution. In addition, the solutions described herein are equally applicable to the Windows 9x / 2000 / NT host. Connecting Linux and Windows CE Point Data Transfer Protocol (PPP) is a protocol that transmits an IP packet through a serial line. Using the PPP protocol, a computer can log in to the remote host through communication devices such as serial line, telephone line and utilize the host or the network where the host is located. Two parts of the server and client in point-to-point communication, where the client requests a network connection to the server, and the server receives the client's request to establish a network connection and assigned to the client's corresponding network resources. When the network connection is established, the server and clients are strictly equal. Since the Linux operating system typically has a PPP server and client program, the Windows CE operating system typically has only a PPP client program, so we use the Linux host as a PPP server, the Windows CE device as the PPP client. In order to use the Linux host as a PPP server, we must first confirm if the PPP server program PPPD has been installed.

Usually the program is installed in the / usr / sbin directory, we can use the following command to find this file in this directory: LS / USR / SBIN / PPPD recently issued Linux operating system (for example, redhatlinux6.x / 7. x) The PPP server program is usually installed in advance. If the Linux host has not installed a PPP server, we should first download and install a PPP server program, such as PPPD2.3.4. Installing the package may also require support for other packages. Since the application's installation has exceeded the discussion scope of this article, please refer to other relevant information. After confirming that the PPP server is already installed on the Linux host, we need to make some necessary configurations for the Linux host. We need to have root privileges for these configurations. Establish file / etc / ppp / peers / wince, the content is 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 file /etc/ppp/wince.chat, the content is as follows:

Timeout 3600

"Client" "Client / C"

"" Server / C "

In the above two profiles, using WinCe is merely used to indicate that this configuration file is used for a Windows CE device. Readers can also use other file names, such as Palm or Handheld, but must ensure that the two file names are consistent. Profile / etc / ppp / peers / wince Specifies the use of serial port TTYS0 to establish a connection with the client device at 115,200bps, and the NoAuth parameter illustrates no identity authentication when the client requests the connection. In this peer-to-peer connection, the IP of the server (Linux host) is 90.0.0.1, the IP of the client (WindowsCe device) is 90.0.0.2. Profile /etc/ppp/wince.chat The Timeout parameter specifies the wait time of the server, and if the time still does not receive the client's connection request, the current server program is terminated. If a reader needs further understanding of the relevant configuration, please refer to CHAT and PPPD related documents. The configuration you need to do in the WindowsCE device is relatively simple. Since the default auto connection function of Windows Ce takes up the serial port of the device, we first need to stop using this feature. Select "Set -> Communication -> PC Connection" in the Start menu and set it to not enable connection to the PC to stop this feature. Then we re-establish a connection, select "Programs -> Communication -> Connection Manager" start menu, then click the "New Connection" icon, name the new connection to Linux and specify the connection type "straight connection", under One step specifies that using COM1 is connected and set its communication rate of 115,200, specifying the IP of the device 90.0.0.2 in TCP / IP settings. The connection will appear in the Program -> Communication menu after clicking the OK store. Use the following command to start the PPP server on the Linux host: PPPD CALL WINCE launches a new connection on the Windows CE device (Program -> Communication -> Linux), the network connection icon appears on the taskbar of the Windows CE device, Linux The main unit shows the following information indicates that the connection has been successfully established with the Windows CE device:

SERIAL Connection Establish.

Using interface PPP0

Connect: PPP0 <-> TTYS0

Found Interface Eth0 for Proxy ARP

Local IP Address 90.0.0.1

Remote IP Address 90.0.0.2

We can also use the ping command provided by the Linux host to verify whether it has been successfully established with the Windows CE device: ping 90.0.0.2 If the Linux host has successfully established a connection with the WindowsCE device, then we should be able to see the following information:

PING 90.0.0.2 (90.0.0.2) from 90.0.0.1: 56 (84) BYTES OF DATA.

64 bytes from 90.0.0.0.2: ICMP_SEQ = 0 TTL = 32 TIME = 26.587 MSEC

64 bytes from 90.0.0.2: ICMP_SEQ = 1 TTL = 32 TIME = 19.928 MSEC

64 bytes from 90.0.0.2: ICMP_SEQ = 2 TTL = 32 TIME = 19.939 MSEC

64 bytes from 90.0.0.2: ICMP_SEQ = 3 TTL = 32 TIME = 19.947 MSEC

Windows CE-based FTP software When we successfully establish a PPP connection between Linux hosts and WindowsCE devices, what should the next step? Of course, we need some suitable programs to exchange files between Linux hosts and WindowsCE devices. We can now use TCP / IP protocol to transfer data between Linux hosts and Windows CE devices, it is clear that the FTP program is a suitable option. FTP (FileTransportProtocol, File Transfer Protocol) is a protocol that is widely used on the network. Due to data transmission reliability, FTP is a TCP / IP-based transmission protocol. In an FTP session including a server side and a client, the client actively connects to the server side and sending a file transfer request to the server, the server side waits for the client's access and handles the client's file transfer request. PE FTP Explorer is a very popular WindowsCE-based FTP client software, and is also a fully fully equipped file browser. Similar to the FTP clients such as CUTEFTP and WSFTP, which are commonly used on the PC, users can use the mouse (pointer) to store the directory tree, upload or download files and directories, or the file or directory can be renamed. And delete. This software can be obtained from the Cearchive website (http://www.cearchives.com/ftp.html). At the site reader, you can find another popular FTP client VxFTP. Although the FTP client software has been very complete and easy to operate, it is still inevitable to receive a smaller display of a smaller display of portable devices. If an FTP server can be created on a portable device, the file transfer operation can use the commonly used FTP client on the Linux host. Ftpsrv.exe is such a Windows CE-based FTP server software. This only 28.5 KB of applets, in addition to providing the identity authentication function and the Passive Transfer mode, can handle most common FTP requests. Using Microsoft's WindowsCE service software to upload ftpsrv.exe to any directory of portable devices, start the program, there is a small icon similar to a computer to connect two portable devices on the task bar. A small control window will appear after clicking the icon in the icon, where we can change the port number of the FTP server or terminate the program. Ftpsrv.exe can be obtained from http://pda.tucows.com/ or http://www.oohito.com/. Readers in these two sites can also find more useful applets. Other If readers use Windows 9x / 2000 / NT host, you can also use the lineless cable connection function provided by Windows to establish a PPP connection with the Windows CE device. For example: On the Windows2000 host, select Settings from the Start menu -> Network and Dial-up Connections -> New Connections. Select directly to another computer in the subsequent network connection wizard and configure the machine as a host. After selecting a suitable communication port and configuring the communication rate, the host is waiting for the client to wait for the client access. Similarly, create a connection on the WindowsCE device, specify the appropriate communication port and configure the communication parameters, you can establish a start-point connection with the Windows host. Since the Windows host is already equipped with a Dynamic Network Address Assignment (DHCP) server, the WindowsCE device can use both the specified static IP address, or the dynamic IP address allocated by the server in real time. However, since the highest transmission rate allowed by the linear cable connection is 19,200 bps, the use of Windows9x / 2000 / NT host as a PPP server seems to be more practical than Linux hosts. If you set the PPP server to the gateway, all machines in the LAN can access WindowsCE devices that have been connected to the network by changing the gateway.

转载请注明原文地址:https://www.9cbs.com/read-60155.html

New Post(0)