rcm4310 ethernet fail

I am using an RCM4310 in a customer’s application and use the web interface for setting the IP address. I save the value in user flash in the CGI method as below:

case CGI_DATA:

    if ( !strcmp(FieldName,"IPadd") ) {
      strncpy(NewIP, http_getData(s), 15);
      NewIP[http_getDataLength(s)] = '\0'; //

      if ( !inet_addr( NewIP ) ) // bad address
        strcpy(NewIP,szIPadd); // reset NewIP for CGI_EOF
    } // FiledName = IPAdd


This is the CGI_EOF section…

  case CGI_EOF:
     // Since we use switchCGI, there is no need to return CGI_DONE.
     if ( strcmp(szIPadd,NewIP) ) {   // changed
       http_abortCGI(s);              // will cause broswer to dump out
       lwIPadd = inet_addr( NewIP );
       ifconfig(IF_ETH0, IFS_DOWN,
         		  IFS_IPADDR, lwIPadd,
       writeUserBlock( IPBase, NewIP, 16 );
       strcpy(szIPadd, NewIP);
 		http_switchCGI(s, "/fw/config.shtml");

I have tested it with all 4 private LAN ranges and it works fine. The customer has tried to change the address and the unit stops working. I have one of the ‘bad’ units and reloaded the firmware. I can run it in debug mode and the application is running but cannot access the web page. I can’t even ping the default address that I load in the program.

Here are my default eth settings:

#define ETH_MTU 1000
#define BUFF_SIZE (ETH_MTU-40)
#define TCP_BUF_SIZE ((ETH_MTU-40)*4)

#define TCPCONFIG 1
#define MY_NETMASK “”

Is there a way to reset to factory defaults?
What would cause the ethernet port to stop working?

Thank you,
Sam Virgillo

I was able to determine what address the customer entered and in fact if I set my laptop to that subnet and go to the IP address and it works.

I think we have a customer issue. Operator error I suspect.

Thank you.

I wonder if you somehow corrupted the IDblock of your board. You should run thew sample idblock_report.c to check