When performing ifconfig() for IF_WIFI0 using DHCP, the RCM6650W often times brings the interface up and connects, but fetches the wrong gateway/router in the process… in which case it fails to gets onto the network.
Sometimes the gateway will resolve correctly, and the RCM will join the WiFi network, while other times it will revert to a default gateway and fail.
There doesn’t seem to be any rhyme or reason as to when it fails or succeeds, it seems quite random while taking down and bring up the WIFI0 interface.
Is this a known issue, or is there a way to troubleshoot/fix this behavior?
You could try enabling the DHCP_VERBOSE macro to see if there’s any useful information coming through. There could be some issues if the Ethernet interface is also configured for the same subnet (see my previous post/answer about configuring routers).
I’d recommend setting the macro MY_GATEWAY to “0.0.0.0” to avoid having the stack use some incompatible value.
If you can provide some output and/or details on how to reproduce the issue, I can investigate further.
is it DHCP_VERBOSE? I couldn’t find any references to that… are you referring to NET_VERBOSE?
It would seem that I am now only experiencing this issue using a static configuration with the WiFi interface. DHCP works fine.
In addition, the Ethernet interface also works fine in both DHCP and static mode.
So here’s the scenario:
Upon initially bringing up the WiFi interface will at first successfully read a default gateway upon calling IFG_ROUTER_DEFAULT via ifconfig()
However, after bringing the interface down, then bringing it back up again, IFG_ROUTER_DEFAULT results in an address of 0.0.0.0
This cycle repeats at exactly a 1:1 ratio while repeatedly bringing up/taking down the WiFi interface… quite odd!
Please find the following git repository containing a sample program I made which reproduces the problem… you’ll also find a screenshot of my Stdio window which shows exactly what I’m talking about
Thanks for any help with this
Thanks for the detailed bug report and sample program. I was able to quickly reproduce the issue and determine the root cause. I’ve pushed the fix out to GitHub in commit https://github.com/digidotcom/DCRabbit_10/commit/d487cad17848c2fcdb5e92b2618126d5246bfece?ts=3
And please note that Digi released an installer for Dynamic C 10.72C that fixes bugs and adds support for SDHC media. See DC 10 project page for the link: https://www.digi.com/support/productdetail?pid=4978
Thanks for your extremely prompt responses and efforts to fix this issue; the time you spend with this community and on the product line is greatly appreciated!