industrialNETworXnetx

matias

matias

| 24.04.2009 | 16:14 | 2 replies

change ip address

hi at all, i've another question: i want to change the ip address of port0 at startup, reading the last octet of the ip address from a dip-switch.
The problem is that in the source code of netxeth driver i don't found where the ip address of port 0 is readed from registry and setting up to the driver......

Could someone help me??

thanks
Matias

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 27.04.2009 | 07:27

Hi Matias,

The netX Eth driver is an NDIS miniport driver and does not know anything about upper layer protocols. It just send/receives raw ethernet frames.
The IP Address is part of the TCP/IP Stack configuration which is part of Windows CE itself.

The addresses are entered as additional parameters assigned to the netXeth driver, so that the TCP Stack knows which configuration to use for a specific physical interface.

Take a look at [HKEY_LOCAL_MACHINE\Comm\NETXETH0\Parms\TcpIp]. This is the place where the Windows CE TCP Stack searches for the IPAddress used for physical interface NETXETH0. The ethernet driver should NOT access these keys.

If you need it the way you describe you can either try one of the following (I don't know which of these do work. They are meant as proposals for trying):

  • Changes in NetXEthRegisterAdapter to write a new TCP configuration on NIC startup[/*:m]
  • Remove the NETXETH0 from registry and try to add this device manually after modifying the TCP settings in registry. (Maybe the sample in "PUBLIC\COMMON\OAK\DRIVERS\NETSAMP\NDISCONFIG\" will help you here)[/*:m]
  • Reconfigure the IP address with an application using IPHelper functions[/*:m]

Regards

MT

[/]

matias

matias

| 27.04.2009 | 11:33

Thank you very much for your reply, i have implemented the first method you have suggest me and all work well. Thanks!!!

Matias

Login