Home/Support/Support Forum/Need help to connect RCM4400W to Router using DHCP
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Need help to connect RCM4400W to Router using DHCP

0 votes
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:
Code:
#class auto #define TCPCONFIG 5 #define _WIFI_MODE WIFICONF_INFRASTRUCT #define _WIFI_SSID "HOME_LAN" #define _WIFI_WEP_FLAG WIFICONF_WEP_ENABLE #define _WIFI_AUTH_MODE WIFICONF_AUTH_OPEN_SYS #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" main() { unsigned char c; sock_init(); printf( "My IP address is %s\n\n", inet_ntoa(buffer, gethostid()) ); while (1) { tcp_tick(NULL); if (kbhit()) { c = getchar(); if (tolower(c) == 'q') { printf("Exit\n"); break; } } } printf("\n\n<Exiting...."); exit(0); }

Any help please!

Thank you in advance
asked Jul 4, 2007 in Rabbit by jcos New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
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
#endif

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:

wifi_ioctl(IF_WIFI0,WIFI_WEP_KEY0,&CLAVE,5);

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.
answered Feb 7, 2008 by MEGAHELL New to the Community (4 points)
...