Ethernet IP

Hi,

I am using an ethernet expansion card on a Fastrack Xtend FX003 modem my problem is that not matter what IP address I configure with wip_bearerSetOpts my modem always ends up with a different IP address provided by DHP. Due the nature of my application I really need to configure an static IP address to my modem.

Here is my code:

/* Open then Start Ethernet bearer */
ret = wip_bearerOpen( &Bearer_Handle, “ETHER”, evh_bearer, NULL);
if( ret != OK) {
wip_debug( “cannot open bearer: %d\n”, ret);
}
else {
if(wip_inet_aton(“192.168.1.77”, &myIp) == FALSE)
{
wip_debug( “Fail trying to format IP address” );
if(wip_inet_aton(“255.255.255.0”, &mask) == FALSE)
{
wip_debug( 1, “Fail trying to format mask address”);
}
}
ret = wip_bearerSetOpts( Bearer_Handle,
WIP_BOPT_ETH_ADDR, &mac_addr,
WIP_BOPT_IP_ADDR, myIp,
WIP_BOPT_IP_DHCP, TRUE,
WIP_BOPT_IP_NETMASK, &mask,
WIP_BOPT_END);

Somebody could tell me what am I doing wrong?

Thanks in advance

WIP_BOPT_IP_DHCP, FALSE

ljweko thanks for your reply.

I already tried setting WIP_BOPT_IP_DHCP to false but is still is not taking the IP I configured. Also documentation established that:

WIP_BOPT_IP_ADDR = Suggested local address when DHCP is enabled.

That is why I set WIP_BOPT_IP_DHCP to true.

Either way is not working, any other suggestion?

Thanks in advance

In open Ethernet bearer, I also initialize default gateway and DNS (if needed) and all works correctly.

Maybe you can connect some spy utility on Ethernet to check DHCP traffic.

Or you can cross connect Ethernet cable only between modem and PC, disable DHCP and check again.