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