User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
18DNS
Page 204 of 401
18DNS
DNS service requires the user to define and activate a connection profile, either PSD or CSD.
When these command report an error which is not a +CME ERROR, the error class and code is provided through
+USOER AT command.
18.1Resolve name / IP number through DNS +UDNSRN
+UDNSRN
SARA-R410M-02B SARA-R410M-52B SARA-R410M-63B SARA-R410M-73B SARA-R410M-83B
SARA-R412M
Modules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No < 70 s TCP/UDP/IP
Error
18.1.1Description
Translates a domain name to an IP address or an IP address to a domain name by using an available DNS. There
are two available DNSs, primary and secondary. The network usually provides them after a GPRS activation or
a CSD establishment. They are automatically used in the resolution process if available. The resolver will use
first the primary DNS, otherwise if there is no answer, the second DNS will be involved.
The DNS resolution timeout depends on the number of DNS servers available to the DNS resolution
system. The response time for the DNS resolution is estimated in case 8 servers are used to perform this
task.
Pay attention to the DNS setting for the different profiles since the user DNS can be put into action if the
corresponding profile is activated (if the user sets a DNS for a profile, and a different profile is activated,
the user DNS has no action and the network DNS is used if available).
18.1.2Syntax
Type Syntax Response Example
AT+UDNSRN=0,"www.google.com"
+UDNSRN: "216.239.59.147"
OK
AT+UDNSRN=0,"www.google.com",1
OK
+UUDNSRN: "216.239.59.147"
Set AT+UDNSRN=<resolution_type>,
<domain_ip_string>[,<async>]
+UDNSRN: <resolved_ip_address>
OK
or
+UDNSRN: <resolved_domain_
name>
OK
AT+UDNSRN=0,"www.google.com",
0
+UDNSRN: "216.239.59.147"
OK
+UUDNSRN: <result_code>[,
<resolved_ip_address>]
+UUDNSRN: 0,"216.239.59.147"
+UUDNSRN: <result_code>[,
<resolved_domain_name>]
+UUDNSRN: 0,"somedomain.com"
URC
+UUDNSRN: -1 +UUDNSRN: -1
18.1.3Defined values
Parameter Type Description
<resolution_type> Number Type of resolution operation:
0: domain name to IP address
1: IP address to domain name (host by name)
<domain_ip_string> String Domain name (<resolution_type>=0) or the IP address in (<resolution_type>=1) to be
resolved