This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3000 DNS / DHCP issue SP 1.24

Hi all,

I am running SP 1.24 and configing the CC3000 to use DHCP.  I connected to an AP on network A and I receive an IP address, Gateway, Netmask, and DNS Server address. All ok.

Now I move to network B. Connect again. This time netapp_ipconfig returns my details but the DNS server is THE SAME as on the previous network (even though it is not really, in fact the network portion of the address are different on these two networks.

It is as if the DNS server address was remembered from the previous network. Also DNS didn't work (which it shouldn't of course if the DNS address which the device is using is wrong)/

Any ideas about this mystery.

Thanks

Ciarán

  • Hi Ciaran,

    how do you connect to AP A and AP B? Two times with wlan_connect? Or something else?

    Some reset of module or wlan_stop between or just two calls of wlan_connect?

    Best regards,

    Martin

  • Hi James,

    Always connectig using wlan_connect and wlan_stop between them yes. Will a full wlan_start again to restart.

    Thanks,

    Ciarán

  • Hi Ciaran,

    After the first successful connect, just perform a wlan_disconnect. And then reset wlan as below and then proceed with the second connect.

    wlan_stop();
    delay
    wlan_start(0);

    Thanks & Regards,

    Raghavendra

  • Hi Raghavendra,

    In fact I tried even powering down and back up. I was originally on a 192.168.0.X/24 network. Now I power back up and do:


    wlan_start(0)

    wlan_connect ( ) // new network. (192.168.43.X/24 network )


    Now I do :

    netapp_ipconfig(& ip_cfg );

     

    IP Address  :192.168.43.81
    Subnet Mask :255.255.255.0
    Default GW  :192.168.43.1
    DHCP Server :192.168.43.1
    DNS Server  :192.168.0.110  <------- look here. wrong
    Mac Addr    :08-00-28-56-D3-CE
    SSID        :hotski

     

    Thanks again.

    Ciarán

  • Hi Ciaran,

    I did try the scenario, as I mentioned above. I seems to display the correct DNS server!

    The second AP in your case, is it a Wiifi Hotspot? Can you please try to swap the APs? That is, connect to the "hotski" first and then to the other AP? 

    May be the hot spot does not have a DNS server listed in its settings, and the ip_cfg.aucDNSServer is not overwritten. That could be the reason it shows the previous address. You can also try to 'memset' ip_cfg to 0x00 before starting 'netapp_ipconfig' the second time around.

    Thanks & Regards,

    Raghavendra

  • Hi Raghavendra,

    Thanks for your help. Indeed there was an error in my code : I was memsetting only the SSID and not the full ipconfig struct.

    Nevertheless, with the memset fix, I still see the issue - but ONLY if I connect to AP 1, the disc, then connect to AP 2.

    I do not see it if I do a shutdown in between. Or at least in the few experiments I've done just now it seems to pick up the DNS correctly if there is a shutdown.


    For now I can live with this and I will consider this matter closed unless I observe an instance where it remembered the DNS even after a shutdown (which is what I believe I have seen in the past, but perhaps my observations were wrong.) I will keep a close eye on this in the coming days as I do  more testing on various APs

    Thanks again,

    Ciarán

  • Hi All

    I have to bump this again - I'm now on 1.26. This problem persists, but worse. In my latest experiments here is what I see:

    I attach to NW A and connect successfully and do a DNS translation - OK

    Now disconnect, and connect to NW B (which has a different DNS server address) - FAIL. The IP config after connection shows the PREVIOUS nw's DNS address and I cannot do a gethostbyname (obviously).

    If I do a POR with the new settings it works. But here is what bothers me : a shutdown and restart of the module (wlan_stop / start) does not make it recover. Only a hard reset - POR.

    Thanks for replies,

    Ciarán