nrf9160

Set command

The set command returns a list of Packet Data Protocol (PDP) addresses for the specified context identifiers. This command issues a valid response only when the modem is activated.

Syntax:

+CGPADDR[=<cid>]

If <cid> is not present, all activated contexts are listed.

Response syntax:

[+CGPADDR: <cid>[,<PDP_addr_1>[,<PDP_addr_2>]]]

The set command parameters and their defined values are the following:

<cid>
Integer, 0–10.
<PDP_addr_1>
String. For IPv4 given as a dot-separated numeric (0–255) parameter. For IPv6 given as a colon-separated hexadecimal (0x0000–0xFFFF) parameter.
<PDP_addr_2>
String. Given as a colon-separated hexadecimal (0x0000–0xFFFF) parameter. Included when both IPv4 and IPv6 addresses are assigned.

The following command example returns the IP address for context 1:

AT+CGPADDR=1
+CGPADDR: 1,"10.0.0.130","1050:0000:0000:0000:0005:0600:300c:326b"
OK