AT command for setting IP address

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

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 ?

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

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

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?

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?