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.

CC3100: Wrong IP after router internet configuration changes

Part Number: CC3100
Other Parts Discussed in Thread: CC3135, CC3200, CC3120

i am using cc3100 for long time and found one strange issue.

my device connected to AP and send data to MQTT broker.
one day router have no internet and the device disconnected from AP and tiring to reconnect again. it help in cases when the routers IP is same 192.168.2.x 

But i found that the IP mask changed to 192.168.1.x and the  the IP that the device get is same as before. 192.168.2.x so until i not restart HW the device or the router it can't connect to the network.

Any suggestions?

Thanks

  • Hi,

    I am sorry, but can you describe your issue better? Do you reporting issue with DHCP client at CC3100? From your description I don't understand what you want to say.

    • Do you use static IP or DHCP for CC3100?
    • How your network configuration look like (gateway IP, subnet mask, etc.)
    • In case of DHCP server is used how looks DHCP leases at your DHCP server? How is configured DHCP lease time? Did you capture DHCP comunciation via shiffer (Wireshark or tcpdump)?
    • Do you use manual WLAN connection or connection profiles at CC3100.
    • What CC3100 SDK do you use? What ServicePack do you have uploaded inside CC3100?
    • Why ISP connection outage cause WLAN disconnect? It is part of your WLAN recovery procedure? Do you restart NWP (sl_Stop/sl_Start) during this reconnect procedure?
    • Do you have separate router (firewall) or you are using AP+router at one box?
    • etc.

    Jan

  • Hi

    • I use DHCP
    • DHCP server lease time is 5 days
    • I use connection profiles
    • SDK 1.3.0, servicepack_1.0.1.14-2.12.2.8
    • I get cc3100_simple_link_sock_event_handler  and also I use mqtt library and it call mqtt disconnect, 
    • i have AP + Router 

    Thanks 

  • Hi,

    Was your device disconnected from your AP or not? If not, CC3100 device do not know that DHCP settings of your router was changed. It will stay to use old IP assigned by DHCP server till lease time expire.

    Do you have log from your application to be clear what are you doing inside your code.

    Jan

  • It was disconnected from AP and connected again.  but The IP is same. and it fails to connect to broker.


  • Hi,

    For detail expatiation what is going on at your case it will be needed more debug information.

    • captured DHCP communication between device and DHCP server (you can capture this at your router if it support this feature)
    • log from your application
    • how do you have set connection policy

    Jan

  • "how do you have set connection policy"

    retVal = sl_WlanPolicySet(SL_POLICY_CONNECTION, SL_CONNECTION_POLICY(1, 0, 1, 0, 0), NULL, 0);
    It is possible to  ask for new IP every new connection to AP?
  • Hi,

    I am not able say how CC3100/CC3200 acts in therm of DHCP client (you can check this via wireshark or tcpdump). But what I can say, there is no API for changing this default behaviour. Behaviour of DHCP client can be changed at 2nd (CC3120) and 3rd (CC3135) generation of devices. But you have 1rst generation device.

    btw ... if you restart NWP (sl_Stop / sl_Start) I am pretty sure that DHCP request after WLAN connection will be send. But this is not a best approach...

    Jan

  • Hi,

    So you mean create timeout and restart the device after x retries? 

  • Hi,

    Yes, this can be one of option, but it is not ideal...

    I think at first step you should investigate using network sniffer what is going on at your case.

    Jan