
SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
17 DNS
Page 178 of 307
17 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
AT command.
17.1 Resolve name / IP number through DNS +UDNSRN
+UDNSRN
SARA-R410M-52B
Modules
SARA-N4
Syntax
PIN required
Settings saved Can be aborted
Response time Error reference
Attributes
full
No
No
No
17.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 resolutor will use
first the primary DNS, otherwise if there is no answer, the second DNS will be involved.
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).
17.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
17.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
<async>
Number
Asynchronous DNS resolution flag. Allowed values:
•
0 (default value): the final result code is returned only once the DNS response is
available, locking the AT interface until the DNS activity is running
•
1: a final result code (OK or an error result code) is returned immediately unlocking
the AT interface and making it available for the execution of other AT commands.