Need help to connect RCM4400W to Router using DHCP

I finish buying a RCM4400W and i want connect it to router 2wire using DHCP, only i want that this connecting to my home network, i tried with this code:

#class auto
#define TCPCONFIG 5
#define _WIFI_KEY0 0x57, 0x57, 0x16, 0x22, 0x87
#define _WIFI_KEY1 0x57, 0x57, 0x16, 0x22, 0x87
#define _WIFI_KEY2 0x57, 0x57, 0x16, 0x22, 0x87
#define _WIFI_KEY3 0x57, 0x57, 0x16, 0x22, 0x87

#memmap xmem
#use "dcrtcp.lib"

   unsigned char c;


   printf( "My IP address is %s

", inet_ntoa(buffer, gethostid()) );

   while (1) {

      if (kbhit()) {
       	c = getchar();
         if (tolower(c) == 'q') {


Hi, I had the same problem, and I solved it, I don’t know if this is the best way, but anyway, hope this be useful I think that in Rabbit they made a MACRO where they defined that the default lenght of a WEP key is 13 hexadecimals, so, if you define as you did:

#define _WIFI_KEY3 0x57, 0x57, 0x16, 0x22, 0x87

or directly in the tcp_config.lib:

#ifndef _WIFI_KEY0
#define _WIFI_KEY0 0x57, 0x57, 0x16, 0x22, 0x87

The Dynamic C won`t know that is 5 hexadecimals

So, What I did as a proof was to define the WEP Key as a constant:

const char CLAVE[5]={0x57,0x57,0x16,0x22,0x87};

and then in the program I redifined the WEP key using the wifi_ioctl function:


this way, in the fourth parameter you specify that it’s 5 hexadecimal instead of 13, And … It worked, my DHCP router gave me an IP address.