Manually Configuring an IPv4 Address (Windows CE 5.0)
Although automatic address assignment by using DHCP is the preference, you can configure the address of a Window CE IPv4 device manually by assigning the appropriate values in the registry for the IP address, subnet mask, default gateway, and DNS servers.
Note Dynamic Host Configuration Protocol (DHCP) and Windows Internet Name Service (WINS) servers are not used.
The following list shows the ways in which you can change the registry settings:
- Typically, to create a run-time image with predefined settings, add registry settings to the projects file before building the run-time image.
- Although you can also use the Remote Registry Editor in Platform Builder for Windows Mobile 5.0 to add the settings to a device, the changes are not persistent to the registry files in Platform Builder. Therefore, the next time that you download the image, you must configure the registry again. For information about how to use the Remote Registry Editor, see Remote Registry Editor.
- If the OEM provides Network user interface (UI), you can manually configure the IPv4 address by using the Network UI.
When you select an IPv4 address for the devices on your network, be sure that each address is unique, and that the addresses are in appropriate subnets. If you do not have an IPv4 address assigned to you, contact your network administrator.
Note If you plan to statically configure your adapter with an IPv4 address, you must also set the EnableDHCP registry key to zero (0). This setting is the default setting for Windows CE.
Also, to enter information into the projects file, you must first convert the addresses to hexadecimal. For example, if the address is 10.0.3.2, you would type "Ipaddr"=hex:0a,00,03,02
The following example shows the information that you would type in the Project.reg file to manually configure an IPv4 address:
;Manually configure an IPv4 Address
[HKEY_LOCAL_MACHINE\Comm\<Adapter Name>\Parms\Tcpip]
"DefaultGateway"=REG_MULTI_SZ:<IP address of the default gateway>
"EnableDhcp"=REG_DWORD:0
"DNS"=REG_MULTI_SZ:<IP address of the DNS name server>.
"Domain"=REG_SZ:<the domain name that is used by the network to which the device is connected>
"IPAddress"=REG_MULTI_SZ:<IP address of the device>
"SubnetMask"=REG_MULTI_SZ:<the subnet masks to be used with the IP interfaces bound to the adapter>.
See Also
Assigning an IPv4 Address to a Device | TCP/IPv4 Configurable Registry Settings | Automatic Client Configuration for IPv4
Send Feedback on this topic to the authors