---
title: "Using AT+SDNAME : save to profile feature missing"
url: "https://maker.wiznet.io/forum/11271"
markdown_url: "https://maker.wiznet.io/forum/11271/md"
type: "Forum topic"
category: "Wireless"
author: "serdesk"
created: "2015-09-06T11:37:55+09:00"
last_activity: "2017-05-04T08:37:00+09:00"
language: "en"
views: 766
replies: 7
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Using AT+SDNAME : save to profile feature missing

## Question

Asked by serdesk on 2015-09-06 in Wireless.

Hello,

I am using WizFi250 modules to exchange udp packets with a server, known by its domain name.
I am using the latest beta 1.0.4.2, which supports the new AT+SDNAME command.
I could get it working by entering commands, but could not save all necessary settings in the profile
to allow correct setup at bootup.
I think the following is missing in the beta 1.0.4.2

- AT+SDNAME is not saved to the profile ?

- AT+WADNS is not saved to the profile ?

Is there a way to save these necessary settings in the profile,
so it can bootup and make the connection automatically ?

So this is what I could do by entering commands :
Setting up the profile : I set up the link with my access point, set up dns, set the target
and make udp client connection service :
I had entered such commands :

`AT+MECHO=0 AT+WSET=0,mywifi AT+WSEC=0,WPA2AE,mypassword AT+WNET=1 AT+WJOIN AT+WADNS=192.168.0.1 AT+SDNAME=myserver.mydomain AT+SCON=SO,UCN,0.0.0.0,8666,8666,0 AT+MPROF=S `

This seems to work :
AT+SMGMT=?
[color=#00FF00]Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/192.168.0.156:8666/8666/0
[OK][/color]

I can send data to my server :

AT+SSEND=0,5
random
[color=#00FF00][OK][/color]

and receive data back :
[color=#00FF00]{0,192.168.0.156,8666,8}somedata[/color]

That is good alright,but saving the settings to the profile and rebooting,
it does not resolve the DNS anymore :
AT+SMGMT=?
[color=#00FF00]Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/0.0.0.0:8666/8666/0
[/color]

Could this be included in a new beta ?
Thanks!
Serge

## Replies

### Reply 1 by wizdaniel, 2015-09-07

Hi Serge

AT+SDNAME command can be saved to profile.
There are the commands for setting.

`at+wset=0,DIR-815_Wiznet at+wsec=0,,password at+wnet=1 at+wjoin at+sdname=www.google.com at+scon=so,ucn,0.0.0.0,80,,0 at+mprof=s at+mreset `

After reset the module.

[code]at+smgmt=?
Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/216.58.220.196:80/30002/0
[OK]
at+mprof=s
[OK]
at+mreset
[OK]

[DISCONNECT 0]

[Link-Down Event]
WizFi250 Version 1.0.4.2 (WIZnet Co.Ltd)
Joining : DIR-815_Wiznet
Successfully joined : DIR-815_Wiznet

[Link-Up Event]
IP Addr : 192.168.18.111
Gateway : 192.168.18.1

[CONNECT 0]
at+sdname=?

[google.com](https://www.google.com)

### [Google](https://www.google.com)

Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

[OK]
at+smgmt=?
Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/216.58.220.164:80/30001/0
[OK][/code]

### Reply 2 by wizdaniel, 2015-09-07

There is a correct case for using AT+SDNAME. ([wiznet.co.kr](http://www.wiznet.co.kr))

[code]at+smgmt=?
Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/216.58.220.196:80/30002/0
[OK]
at+mprof=s
[OK]
at+mreset
[OK]

[DISCONNECT 0]

[Link-Down Event]
WizFi250 Version 1.0.4.2 (WIZnet Co.Ltd)
Joining : DIR-815_Wiznet
Successfully joined : DIR-815_Wiznet

[Link-Up Event]
IP Addr : 192.168.18.111
Gateway : 192.168.18.1

[CONNECT 0]
at+sdname=?

[google.com](https://www.google.com)

### [Google](https://www.google.com)

Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

[OK]
at+smgmt=?
Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/216.58.220.164:80/30001/0
[OK][/code]

But, When I typed wrong Domain name like below. ([wiznet.co.kr](http://www.wiznet.co.kr)[color=#FF0000]s[/color])

[code]at+sdname=www.wiznet.co.krs
[OK]
at+mprof=s
[OK]
at+mreset
[OK]

[DISCONNECT 0]

[Link-Down Event]
WizFi250 Version 1.0.4.2 (WIZnet Co.Ltd)
Joining : DIR-815_Wiznet
Successfully joined : DIR-815_Wiznet

[Link-Up Event]
IP Addr : 192.168.18.111
Gateway : 192.168.18.1

[CONNECT 0]
at+smgmt=?
Number of Sockets : 1 (SCID/Mode/Remote/Local/DataMode)
0/UCN/0.0.0.0:80/30001/0
[OK][/code]

So I prefer you to check the Domain name using [color=#4000FF]AT+FDNS[/color] command
you have to enter the AT+FDNS command before AT+SDNAME.

…
at+wjoin
[color=#4040BF][at+fdns=www.google.com](http://at+fdns=www.google.com),3000[/color]
[at+sdname=www.google.com](http://at+sdname=www.google.com)
at+scon=so,ucn,0.0.0.0,80,0
at+mprof=s
at+mreset

if you don’t get the IP address after AT+FDNS, It means that domain name is wrong or network status is unstable.

### Reply 3 by serdesk, 2015-09-07

Hello Daniel,
thank you for your kind reply.
It was helpful and you are right, SDNAME and WADNS are stored.
They are not listed when you run AT+MPROF=VG, that is why I thought they were lost.
But indeed I can see the correct value when I run AT+SDNAME=? and AT+WADNS=? after reboot.
Yet still I have a problem, the remote IP is not correctly resolved after reboot, (it gives 0.0.0.0)
and so connection does not work. I investigated further :

I think the difference between your test and my test, is that I use a custom DNS server.
This was set with AT+WADNS=192.168.0.156 and saved in the profile.
But after reboot it seems to remember this value but NOT use it.

Please consider the screenshot with log below :
At first after reboot, the DNS queries have no effect, they do not come in on my DNS server.
It is only after I set AT+WADNS=192.168.0.156 again that the DNS request is really executed.
I can see in the log of my DNS server that all attempts before setting AT+WADNS=192.168.0.156 again
do not request to my dns server. Immediately after setting AT+WADNS=192.168.0.156, the following DNS requests all reach my dns server.
For some reason the first gives an error on wizfi and the second succeeds.
After that I can make the connection correctly and communicate as intended.

Please have a look at this log, it shows the problem :

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/427c4d7e45b7be599607e1533f22e3abd151dfa4.png) 629×747 34.6 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/427c4d7e45b7be599607e1533f22e3abd151dfa4.png)

I tested this flow 5 times, even waiting 10 minutes after bootup. Always the same behavior, I need to set AT+WADNS=192.168.0.156
again to make it work.

Kind regards
Serge

### Reply 4 by wizdaniel, 2015-09-11

Hi

We tested WizFi250 at Well known DNS Server.
A 1.0.4.2 Firmware is Beta version as you know…
We hope to fix it.

Please type the AT+WDNS command.

### Reply 5 by serdesk, 2015-09-12

Hello Daniel,

is AT+WDNS supported ?
What does it do, I could not find any information online ?

Kind regards
Serge

### Reply 6 by wizdaniel, 2015-09-13

Hi,

It was incorrectly entered, It means WADNS command.

Please type the AT+WADNS command when you try to join your AP using MCU

### Reply 7 by serdesk, 2015-10-03

Hi Daniel,
is there a new beta available ?
Best regards
Serge

---

Source: https://maker.wiznet.io/forum/11271
