IP Address stuck at default

Hello,

My ethernet interface is stuck at the default, 10.10.6.100, even after using ifconfig to set it. I am using DynamicC 9.50 on a board type 0x1409, 44MHZ RCM3315. I’ve been using Rabbit since last summer, and have not had this problem before, but this is my first project with the 3315. Before posting here, I searched forums and the Internet with no luck.

Here’s my code:

#define USE_ETHERNET 1
#define USE_RABBITWEB 1
#define SSPEC_MAX_OPEN 4
#define TCP_BUF_SIZE 1024
#define UDP_BUF_SIZE 1024
#define TCPCONFIG 1
#define IP_MAXOFFSET 512
#define FTP_MAXLINE 1024
#define USE_HTTP_BASIC_AUTHENTICATION 1
#use “dcrtcp.lib”
#use “net.lib”

in main():

i = ifconfig (IF_ETH0, IFS_DOWN, IFS_END) ;
while (ifpending(IF_ETH0))
	;
i = ifconfig (IF_ETH0,
          IFS_IPADDR, aton("10.10.6.95"), //(IPAd),
          IFS_NETMASK, aton(NetMask),
          IFS_UP,
          IFS_END);
sock_init () ;
while(1)
	tcp_tick (NULL) ;

That’s pretty minimal. When this runs, I can PING 10.10.6.100 (the default) but not 10.10.6.95 (what I set). Variable i is always 0.

If anyone has an idea about this problem, I’d appreciate it.

Thanks,
Larry Martin
Larry@GlueLogix.com

Rabbit Tech Support came through with the answer on this one:

1: #define TCPCONFIG 0

2: Call sock_init() before ifconfig().

3: Change the syntax of ifpending AND call tcp_tick to keep the stack going:
while (ifpending(IF_DEFAULT) == IF_COMING_DOWN)
tcp_tick (NULL) ; ;

Larry