How to stop U-Boot IP settings from being applied to WinCE

I am using WinCE7 image built by a third party on a CC-WMX53-CE platform. I apply network settings that are saved in the registry (such as the IP address, or whether DHCP is enabled). These settings work correctly and are maintained between device suspend/resume cycles.

If the i.MX53 WinCE JSK board is power cycled, at some point during the WinCE boot-up, the registry settings for the network configuration are overwritten by the settings saved in U-Boot.

// Example U-Boot environment variables:
ipaddr=192.168.42.30
netmask=255.255.255.0
dhcp=off

// Example WinCE boot log:
[FlashInfo]: System Hive restored successfully.
Starting [ShowIP /d] after [6000]ms delay
Starting [iDigiCopy] after [6000]ms delay
Windows IP configuration

Ethernet adapter [FEC1]:
IPv4 Address … : 192.168.42.30
Subnet Mask … : 255.255.255.0
IPv6 Address … : fe80::f877:78ac:5c80:17d%5
Default Gateway … : 0.0.0.0

I am assuming that the settings are overwritten by a Digi application after the registry hive is restored.
I can confirm that the rest of the registry settings appear to be saved and restored correctly.
This is supported by the fact that in the registry viewer for the remote device as the RegPersisted key for each of the hives (in the root of HKEY_CURRENT_USER & HKEY_LOCAL_MACHINE) is set to 1, indicating that the values stored in the registry have been loaded from persistent storage.

Is there some U-Boot or application setting I can change to disable this functionality?
If not, can anyone point me in the right direction with what settings need to be changed in the BSP to disable this behavior?

Thank you.

Hello Andrew,

Did you check this issue with the default image that comes with the Digi BSP on Digi’s development board?
If you test with custom image, what are the modifications have you done in the catalog items?

Can you provide your boot log information here?

Also go through the below description about the registry.

While working with the target, interface settings and OS parameters can be modified, for example, network settings and memory configuration. These changes are saved to the target’s Windows Registry, a database that stores settings and options for your target’s operating system. Because the target’s Registry resides in RAM memory, these settings are lost when the target is powered off.

The regtool application stores the Registry into NVRAM so the settings are not lost.

To see the application’s syntax, execute it with the –h option:

Hive based registry :

> regtool –h
Application to save or erase the Registry. Revision 1.1
Copyright(c) 2007 by Digi International Inc.
Usage: regtool

Where options are:

-s    Save registry to flash

-h    Show this helps

>

Options include:

–> -s: Saves the Registry to a file in the flash file system.

When the system boots, if it finds a correct Registry in the nand flash, it loads these settings for the running system. Otherwise, the system generates a Registry in RAM with default values.

So once the system booted properly try to use the below command
>regtool -s

It may resolve your issue.

1 Like

Unfortunately I am using a bespoke image supplied by my customer. They had another engineer build it (but not supply any documentation), so I don’t have access to the catalog items they included.

The U-Boot version is as follows:
U-Boot 2009.08 - DUB-1.4.0.3 - (Jul 12 2012 - 13:40:22) - GCC 4.4.6
for ConnectCore Wi-i.MX53 on a JumpStart Kit Development Board

However, thank you! - The regtool application (with the -s option) resolved the registry issue.

Summary of important information:

It is important to note that the rest of the registry settings are persisted in NAND between power cycles. For example, setting the wallpaper color, or creating a custom registry key. It appears that the network settings are a special case as they there is a sharing mechanism between WinCE and U-Boot.

What I mean by this is that on my platform, the U-Boot network setting appear to overwrite the WinCE network settings in the registry on system boot regardless. These settings replace what was saved (and flushed using RegFlushKey) to the WinCE registry.

In order for updated network settings to persist between reboots, they must be updated and flushed in the WinCE registry, then regtool.exe should be invoked with the “-s” option. This flushes the updated network-specific registry keys back to some shared U-Boot NAND partition. These updates settings are then re-applied to the system on start-up.

Sample output following changing some network settings in the registry, flushing them and executing “regtool -s”:

[SaveRegistry]: Saving Registry in \Documents and Settings folder.
[NvRAM_Update]: NVRAM Library V1.3.
[NvRAM_Update]: Checking Registry values for: Comm\FEC1\Parms\TCPIP
[NvRAM_Update]: IP0 has changed.
[NvRAM_Update]: Subnetmask0 has changed.
[NvRAM_Update]: DHCP0 has changed.
[NvRAM_Update]: Checking Registry values for: Comm\SMSC91181\Parms\TCPIP
[NvRAM_Update]: Checking Registry values for: Comm\CCWMXWIFI1\Parms\TCPIP
[SaveRegistry]: required 28ms

Sample output following changing settings in the registry that don’t relate to the network, flushing them and executing “regtool -s”:

[SaveRegistry]: Saving Registry in \Documents and Settings folder.
[NvRAM_Update]: NVRAM Library V1.3.
[NvRAM_Update]: Checking Registry values for: Comm\FEC1\Parms\TCPIP
[NvRAM_Update]: Checking Registry values for: Comm\SMSC91181\Parms\TCPIP
[NvRAM_Update]: Checking Registry values for: Comm\CCWMXWIFI1\Parms\TCPIP
[SaveRegistry]: required 32ms

In this second example, the registry setting was still maintained between a power-cycle, but as it wasn’t one of these special U-Boot shared settings relating to the network adapters, regtool didn’t identify any keys to specifically copy.

Thank you again.
Regards
-AndyH

Hello Andy,
It seems like , the registration tool (regtool) only checks the network settings and save the data into the registry.

Thanks.