# AT command for setting IP address

**URL:** <https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75>\
**Category:** Open AT\
**Created:** [October 18, 2005, 2:54am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75 "2005-10-18T02:54:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wookee\_tsu](https://avatars.discourse-cdn.com/v4/letter/w/a9adbd/32.png) [@wookee\_tsu](https://forum.sierrawireless.com/u/wookee_tsu)\
**Post date:** [October 18, 2005, 2:54am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/1 "2005-10-18T02:54:00Z")

</div>

In my TCP app,i use “AT+SETDNS=DNSIP1,DNSIP2” set DNS1 and DNS2.But i can’t get the value of paras-\>NbPara,which always is Zero in debug mode(TMT).Can you tell me the reason?Very thanks  
sample: AT+SETDNS=192.168.1.1,192.168.1.3  
but paras-\>NbPara =0 not 2,why?

---

<div class="post-metadata">

**Author:** ![snoooze](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@snoooze](https://forum.sierrawireless.com/u/snoooze)\
**Post date:** [October 20, 2005, 8:19am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/2 "2005-10-20T08:19:00Z")

</div>

> [@wookee\_tsu](#):
>
> In my TCP app,i use “AT+SETDNS=DNSIP1,DNSIP2” set DNS1 and DNS2.But i can’t get the value of paras-\>NbPara,which always is Zero in debug mode(TMT).Can you tell me the reason?Very thanks  
> sample: AT+SETDNS=192.168.1.1,192.168.1.3  
> but paras-\>NbPara =0 not 2,why?

How do you subscribe to the “+SETDNS” command?

Could you give sample code of the subscription and the command handler routines?

/Snoooze

---

<div class="post-metadata">

**Author:** ![rar](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rar](https://forum.sierrawireless.com/u/rar)\
**Post date:** [October 20, 2005, 8:35am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/3 "2005-10-20T08:35:58Z")

</div>

Hi Snooze  
The AT+SETDNS doens’t exist as a standart, Wookee-Tsu has created it with Open AT.  
We have only AT#DNS1 for exemple

Wokee-Tsu, can you confirm us that you have created this command with open AT and this is not a standart command ?

---

<div class="post-metadata">

**Author:** ![snoooze](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@snoooze](https://forum.sierrawireless.com/u/snoooze)\
**Post date:** [October 20, 2005, 9:05am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/4 "2005-10-20T09:05:12Z")

</div>

> [@rar](#):
>
> Hi Snooze  
> The AT+SETDNS doens’t exist as a standart, Wookee-Tsu has created it with Open AT.  
> We have only AT#DNS1 for exemple

Sorry, I used the wrong word, I ment of course “create” as in adl\_atCmdCreate routine.

---

<div class="post-metadata">

**Author:** ![MikeBean](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@MikeBean](https://forum.sierrawireless.com/u/MikeBean)\
**Post date:** [October 20, 2005, 4:21pm UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/5 "2005-10-20T16:21:56Z")

</div>

Hi All,

I could be wrong, but in my understanding AT commands may only have parameters that are numbers or strings… hence the command at the Serial Interface should be AT+SETDNS=“192.168.1.1”,“192.168.1.3” instead of AT+SETDNS=192.168.1.1,192.168.1.3.

If this does not work we will need to see the Subscibe Call and the Handler Routine Code to comment.

Mike

---

<div class="post-metadata">

**Author:** ![snoooze](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@snoooze](https://forum.sierrawireless.com/u/snoooze)\
**Post date:** [October 21, 2005, 7:27am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/6 "2005-10-21T07:27:12Z")

</div>

> [@MikeBean](#):
>
> Hi All,  
> I could be wrong, but in my understanding AT commands may only have parameters that are numbers or strings… hence the command at the Serial Interface should be AT+SETDNS=“192.168.1.1”,“192.168.1.3” instead of AT+SETDNS=192.168.1.1,192.168.1.3.

The parameter will be accepted and included in the data structure (if everything is correct) even though it is without the “”.

Some more questions for you [color=green]wookee\_tsu:  
You say that paras-\>NPara is 0 but can you see if the parameters are in paras-\>StrData?

What command type do you use when you create your command?  
ADL\_CMD\_TYPE\_PARA or ADL\_CMD\_TYPE\_ROOT?

---

<div class="post-metadata">

**Author:** ![cesarlizarazoa](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@cesarlizarazoa](https://forum.sierrawireless.com/u/cesarlizarazoa)\
**Post date:** [July 29, 2021, 12:44am UTC](https://forum.sierrawireless.com/t/at-command-for-setting-ip-address/75/7 "2021-07-29T00:44:07Z")

</div>

Hi. Is it possible to ask the IP adress using sms?. I need to know the IP because we are using a public sim card. Any thoughts?
