Using AT+SDNAME : save to profile feature missing

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

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=?

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

There is a correct case for using AT+SDNAME. (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=?

[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[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,3000[/color]
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.

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 :



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

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.

Hello Daniel,

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

Kind regards
Serge

Hi,

It was incorrectly entered, It means WADNS command.

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

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