Application:
PPP/slip dialing to form a virtual network through which the server can communicate over the network
Related links:
Csdn post connection: http://bbs.csdn.net/topics/390314110? Page = 1
This article records a wince5.0 device based on serial port and PC dialing, but currently our wince6.0 device is also based on serial port and PC dialing but fails to be recorded first, so as to solve the problem in the future.
1. wince5.0 device dialing
The wince5.0 device uses Samsung's S3C2440 and uart0 for dialing. the following details:
1.1 serial port Circuit Design
Figure 1
See the description. Therefore, you only need to connect the external direct connection string to the DB9 interfaces of j15 and PC respectively from wince5.0.
Sp3222e/3232e series is a 2 driver/2 receiver device, the main role is to achieve TTL/CMOS and RS-232 level conversion, because the S3C2410 is a CMOS level, DB9 in PC is RS232 level, so level conversion is required.
1.2
Create a PC
Figure 2
Create a new connection:
Figure 3
Select "Next ":
Figure 4
Select "Next ":
Figure 5
Select "Next ":
Figure 6
Set the serial port attribute to ensure that the settings on both sides of the PC and wince are consistent. Select "Next ":
Figure 7
Select "Next ":
Figure 8
Select "Next ":
Figure 9
Select "Next ":
Figure 10
Select "finish ":
Figure 11
If "my connections" have been created for wince before this operation, click "my connections" on the wince device to start dialing, the "connecting devices"-> "connected devices"-> "Authenticated Users" are displayed on the wince device side. Then, a dialog box is displayed, prompting: "It is disconnected from your remote computer. Verify the "baud rate" setting and try again ":
Figure 12
In addition, the PC side has no response. Here, some settings need to be made on the PC end. Right-click "incoming connection" and choose "properties"> "general". The settings are as follows:
Figure 13
Select "user ":
Figure 14
Select "network"> "properties ":
Figure 15
In this way, after the dial-up connection is successful, the IP address is allocated to the two nodes of the connection from the IP address pool (19.16.1.2 to 19.16.1.3), and then click "OK, the settings created on this PC end are complete.
1.3
Create "my connections" for wince5.0 Devices"
Create "my connections ":
Figure 16
Select "Direct Connection" and then "Next ":
Figure 17
Select OK and click OK. Double-click "my connections" and dial. After successful dialing, the following information is displayed:
Figure 18
At this time, it indicates that the wince device and PC have been successfully dialing through the serial port. This is done from the CMD command serial port of the PC:
(1) ipconfig
Figure 19
It can be seen that the PC and wince adopt the PPP protocol. PPP is a point-to-point communication protocol, which is improved by slip. Here I connect to terminal through serial dialing.
Server, you can obtain an IP address through PPP or slip
Address makes the PC a node on the network. The IP address of this node is 19.16.1.2, And the wince side also drives an IP address. Try to use the wince device to become another node on the network. The IP address of this node is 19.16.1.3, from registry:
[HKEY_LOCAL_MACHINE \ comm \ local serial com4 \ parms \ Tcpip]
"DefaultGateway" = hex (7 ):\
, 00, 00, 00
"IPaddress" = hex (7 ):\
, 00, 39,00, 2e, 36, 00, 2e, 00, 2e, 00, 00, 00, 00
"Subnetmask" = hex (7 ):\
32, 00, 35, 00, 35, 00, 2e, 00, 2e, 00, 2e, 00, 00
"Dontadddefagateway Gateway" = DWORD: 00000000
"Usezerobroadcast" = DWORD: 00000000
"Enabledhcp" = DWORD: 00000000
After successful dialing, the connection and network of the XP computer and the wince device are as follows:
Figure 20
The two IP addresses 19.16.1.2 and 19.16.1.3 are XP as the dial-in server. The IP address pool is set in advance, and XP will allocate an IP address from the pool for each connection. Because there is only one connection, that is, there are only two ends, so the pool has enough IP addresses, and XP is enough to allocate. The IP address pool is specified, this is to allow our developers to determine the IP addresses of the two ends of the connection for further testing.
Here, the IP addresses of the XP Computer: 19.16.1.3 and IP: 192.168.100.183 belong to two different connection node IP addresses. The DefaultGateway IP address of the wince device is 19.16.1.2.
1.4
Wince5.0 device test records
(1) only t1out (TX), r1in (RX), and V-(Gnd)
(2) disconnect t2in (connect nrts0) and r2out (connect ncts0) of sp3232e in the lower half of figure 1.
The tests in the above two cases still allow successful dialing, indicating whether the successful dialing is irrelevant to the 3-line or 5-line dialing, but why is the dial-up of the wince6.0 device disconnected immediately after the dial-up is successful? Detailed description
1.5
2. wince6.0 device dialing
Wince6.0 is the same as wince5.0 when a device is created, but we fail to make a dial. The specific phenomenon is described as follows:
After the first connection, there was no response on the PC end. The Windows Server quickly popped up: "It has been disconnected from the remote computer you called. Verify the "baud rate" setting and try again "dialog box.
For the second connection, "connecting devices"-> "connected devices"-> "Authenticated Users" are displayed in sequence. A connection is added to the PC, the content is "<unverified user>, connected information". In this case, you need to disconnect the connection. Otherwise, the content displayed for the first time will continue dialing.
The third dial, and the first start.
The fourth dialing is the same as the second dialing.
... Appears repeatedly
In addition, I tried wince6.0 + cloud6410, and a friend tried their wince5.0 + Marvell pxa300, wince6.0 + Freescale imx27 systems, in this way, we should be able to eliminate the problem that is not a serial port driver, which may be related to components, registry settings, or at commands, and components should also be able to be excluded, because basically all related components can be added.
Solution:
(1) modify the serial port
Virtual ulong getmodemstatus (){
// Return (cpdd2450uart: getmodemstatus () | ms_cts_on); // Kandi mark
Return (cpdd2450uart: getmodemstatus () | ms_rlsd_on); // Kandi add in 2012.12.27
}
(2) modify registry information
[HKEY_LOCAL_MACHINE \ extmodems \ hayescompat]
"Port" = "COM1 :"
"Devicetype" = DWORD: 1
; Loc_friendlyhayescompat
"Friendlyname" = mui_sz: "unimodem. dll, #9001"
Modify COM1 to the serial port driver com3 of the dialing uart3.