Home/Support/Support Forum/DHCP Issue. Interface DHCP Info not initialized?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

DHCP Issue. Interface DHCP Info not initialized?

0 votes
Working with an RCM6600W.

What am I not calling or configuring wrong such that the interfaces have not been populated with their respective DHCPInfos?

I'm attempting to run the following:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

#define TCPCONFIG 9
#define _PRIMARY_STATIC_IP "192.168.126.254"
#define _PRIMARY_NETMASK "255.255.255.0"
#define MY_GATEWAY "0.0.0.0"
#define MY_NAMESERVER "8.8.8.8"
#define IFC_WIFI_SSID "SomeSSID"
#define IFC_WIFI_ROAM_ENABLE 1
#define IFC_WIFI_ROAM_BEACON_MISS 20
#define IFC_WIFI_MODE IFPARAM_WIFI_INFRASTRUCTURE
#define IFC_WIFI_REGION IFPARAM_WIFI_REGION_AMERICAS
#define WIFI_USE_WPA 1
#define WIFI_AES_ENABLED 1
#define IFC_WIFI_WPA_PROTOCOL IFPARAM_WIFI_WPA_PROTOCOL_WPA2 | IFPARAM_WIFI_WPA_PROTOCOL_WPA
#define IFC_WIFI_ENCRYPTION IFPARAM_WIFI_ENCR_CCMP
#define WPA_USE_EAP WPA_USE_EAP_TLS | WPA_USE_EAP_PEAP

#use "tcp_config.lib"
#use "dcrtcp.lib"

//Called elsewhere:
extern int net_config_applySettings(int justBooted){

if(justBooted){
sock_init();
init = true;
}

//Just in case any interfaces are still up, bring them all down.
ifconfig(
IF_ANY,
IFS_DOWN,
IFS_END
);

//Kill DHCP on WiFi
ifconfig(
IF_WIFI0,
IFS_DHCP, 0,
IFS_END
);

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

And am seeing: 'fails with "bad or inappropriate IFS/IFG parameter ID: 332"'

I've confirmed that this is occurring because

net.lib||3899: di = ifte->dhcp;

is setting di to NULL/0.

as the error comes from

net.lib||4291:
case IFS_DHCP:
if (!di)
goto _ifc_error;
onflags = IFF_DHCP;

So my question is, "What am I not calling or configuring wrong such that the interfaces have not been populated with their respective DHCPInfos?"
asked Jun 17, 2016 in Rabbit by casey New to the Community (18 points)
edited Jun 17, 2016 by casey

Please log in or register to answer this question.

2 Answers

+1 vote
 
Best answer
"#define TCPCONFIG 9" enables the loopback interface. Because of this there are 3 registered interfaces. I'm guessing this throws off the code at tcp_config.lib::1772 which in turn throws off net.lib::7700. The Ethernet and loopback interfaces both end up with their DHCPInfo initialized, but the wifi interface, which is now the third interface is left uninitialized.

Since I don't think I need the loopback, replacing TCPCONFIG 9 with the following solves the issue for the moment:

#define TCPCONFIG 0
#define USE_DHCP
//#define USE_LOOPBACK 1
//#define IFCONFIG_LOOPBACK IFS_UP
#define USE_ETHERNET 1
#define IFCONFIG_ETH0 IFS_DOWN

#define USE_WIFI 1
#define IFCONFIG_WIFI0 IFS_DOWN
answered Jun 17, 2016 by casey New to the Community (18 points)
selected Jun 17, 2016 by casey
0 votes
Casey, what product are you working with?
answered Jun 17, 2016 by mvut Veteran of the Digi Community (13,333 points)
I've edited to state I'm working with an RCM6600W. Continuing to try different things with the board over here. Might be close to figuring out what I'm doing wrong.
...