<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AT+CGDCONT? read command is not providing APN configuration details in response.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120736/at-cgdcont-read-command-is-not-providing-apn-configuration-details-in-response</link><description>Hi Team, 
 
 We are using nRF9160 modem and SDK 1.7 version with Segger Embedded Studio. 
 
 Using at_client sample code, observations as below. 
 1. Tried to read APN configuration using AT+CGDCONT command with below flow. 
 - Issued AT+CFUN=1 and checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Apr 2025 21:49:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120736/at-cgdcont-read-command-is-not-providing-apn-configuration-details-in-response" /><item><title>RE: AT+CGDCONT? read command is not providing APN configuration details in response.</title><link>https://devzone.nordicsemi.com/thread/532919?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 21:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b15ff68a-6a74-403c-b20f-428502cd5c61</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;I have found the issue I think.&lt;/p&gt;
&lt;p&gt;In your #defines you have the command written as AT+C&lt;strong&gt;DG&lt;/strong&gt;CONT&lt;/p&gt;
&lt;p&gt;The correct way is AT+C&lt;strong&gt;GD&lt;/strong&gt;CONT (as you have yourself written other places).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AT+CGDCONT? read command is not providing APN configuration details in response.</title><link>https://devzone.nordicsemi.com/thread/532165?ContentTypeID=1</link><pubDate>Fri, 18 Apr 2025 12:31:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9022f02-ddf5-406c-b775-d1cc6527124b</guid><dc:creator>sravan.rikka</dc:creator><description>&lt;p&gt;Tried to configure APN in azure sample code but getting err = 0Xfffffff8 as below. I hope no need to use \r\n at end of the command for &amp;ldquo;at_cmd_write()&amp;rdquo; function, even by keeping \r\n also getting same error.&lt;/p&gt;
&lt;p&gt;Getting proper response for AT+CFUN?, AT+CFUN=4, AT+CEREG? So &amp;ldquo;at_cmd_write()&amp;rdquo; function is working but why giving error response for AT+CGDCONT write and read command?&lt;/p&gt;
&lt;p&gt;Am I missing anything please advice.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Code snippet.&lt;/p&gt;
&lt;p&gt;#define AT_CGDCONT_WRITE_CMD&amp;nbsp; &amp;quot;AT+CDGCONT=1,\&amp;quot;IPV4V6\&amp;quot;,\&amp;quot;internet.m2mportal.de\&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;#define AT_CGDCONT_READ_CMD&amp;nbsp;&amp;nbsp; &amp;quot;AT+CDGCONT?&amp;quot;&lt;/p&gt;
&lt;p&gt;#define AT_CFUN_OFF_CMD&amp;nbsp; &amp;nbsp;&amp;quot;AT+CFUN=4&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;err = at_cmd_write(AT_CFUN_OFF_CMD, NULL, 0, NULL);&lt;br /&gt; sprintf(testbuf, &amp;quot;AT_CFUN_OFF_CMD:%s&amp;quot;, buf);&lt;br /&gt; k_sleep(K_MSEC(20u));&lt;br /&gt; //printk(&amp;quot;AT_CFUN_OFF_CMD:%s&amp;quot;, buf);&lt;br /&gt; printk(testbuf);&lt;br /&gt; if(err &amp;lt; 0)&lt;br /&gt; printk(&amp;quot;Failed AT_CFUN_OFF_CMD\r\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;err = at_cmd_write(AT_CGDCONT_WRITE_CMD, buf, sizeof(buf), NULL);&lt;br /&gt; k_sleep(K_MSEC(20u));&lt;br /&gt; printk(&amp;quot;AT_CGDCONT_WRITE_CMD:%s\n&amp;quot;, buf);&lt;br /&gt; if (err &amp;lt; 0) {&lt;br /&gt; printk(&amp;quot;Failed to set APN using AT_CGDCONT_WRITE_CMD\r\n&amp;quot;);&lt;br /&gt; } else {&lt;br /&gt; printk(&amp;quot;APN set to &amp;#39;sravan&amp;#39; successfully.\n&amp;quot;);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;k_sleep(K_MSEC(200u));&lt;br /&gt; err = at_cmd_write(AT_CGDCONT_READ_CMD, buf, sizeof(buf), NULL);&lt;br /&gt; printk(&amp;quot;APN: %s&amp;quot;, buf);&lt;br /&gt; if(err &amp;lt; 0)&lt;br /&gt; printk(&amp;quot;Failed AT_CGDCONT_READ_CMD\r\n&amp;quot;);&lt;br /&gt; else&lt;br /&gt; printk(&amp;quot;Success AT_CGDCONT_READ_CMD\r\n&amp;quot;);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AT+CGDCONT? read command is not providing APN configuration details in response.</title><link>https://devzone.nordicsemi.com/thread/532143?ContentTypeID=1</link><pubDate>Thu, 17 Apr 2025 21:49:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aed8299e-e1ec-4a1f-80e5-c03d3a73315f</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello Sravan,&lt;/p&gt;
&lt;p&gt;We now have Easter holiday here in Norway.&lt;/p&gt;
&lt;p&gt;I will get back to you in the middle of the next week.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AT+CGDCONT? read command is not providing APN configuration details in response.</title><link>https://devzone.nordicsemi.com/thread/532133?ContentTypeID=1</link><pubDate>Thu, 17 Apr 2025 16:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1315c645-4aba-4b49-814b-5b133ef58c29</guid><dc:creator>sravan.rikka</dc:creator><description>&lt;p&gt;Hello Team,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you please respond.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sravan Rikka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>