Skip to main content
Nandy K
Associate III
Dec 14, 2016 8:50 AM UTC
Solved

Static IP Address

Posted on December 14, 2016 at 09:50

Hi Everyone !

I am using  SPWF01S wifi module.

I would like to assign static IP for my module, so that my module will have same IP address even when connected with different networks.

I used the following AT Commands

at+s.scfg 

= ip_use_dhcp,0

at+s.scfg = ip_ipaddr,172.10.10.50

at+s.scfg = ip_netmask,255.255.255.240

at+s.scfg = ip_gw,172.10.10.1

at+s.scfg = ip_dns,172.10.10.1

when I use the above commands the module is allotted with static IP but SOCKET connection is not happening but when I use 'ip_use_dhcp,1' then everything works fine.

Help me to solve this issue.

    This topic has been closed for replies.
    daniil
    daniilBest answer
    Associate II
    Dec 15, 2016 7:27 AM UTC
    Posted on December 15, 2016 at 07:27

    Hello!

    I think You try to use wrong tcp/ip settings.

    If you have configured netmask as

    255.255.255.240

    you may

    use ip-adresses in range

    172.10.10.1

    - 16 only. But you try to use 172.10.10.50.

    It's not in range.

    3 replies

    Gerardo GALLUCCI
    ST Employee
    Dec 14, 2016 7:49 PM UTC
    Posted on December 14, 2016 at 20:49

    Hi,

    please share your use case. Socket server or client? Which FW version (update to the latest one, if not)?

    Regards

    jerry

    daniil
    daniilBest answer
    Associate II
    Dec 15, 2016 7:27 AM UTC
    Posted on December 15, 2016 at 07:27

    Hello!

    I think You try to use wrong tcp/ip settings.

    If you have configured netmask as

    255.255.255.240

    you may

    use ip-adresses in range

    172.10.10.1

    - 16 only. But you try to use 172.10.10.50.

    It's not in range.

    Nandy K
    Nandy KAuthor
    Associate III
    Dec 15, 2016 3:12 PM UTC
    Posted on December 15, 2016 at 16:12

    Hi Jerry and Daniel,

    Jerry : The FW version is 3.5 and I am using my module as socket client.

    Daniel : You are right the IP address should be in the range of 1 to 16. I have used 172.10.10.8 and now it is working fine.

    Thank you guys for the suggestion.