<?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>Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88085/asset_tracker-v2-run-time-buffer-overflow-in-lte</link><description>I run the Asstet_tracker V2. The part of LTE log is as below: 
 ..... 2022-05-19T07:58:34.234Z DEBUG modem &amp;lt;&amp;lt; [00:00:33.314,788] [0m&amp;lt;dbg&amp;gt; azure_iot_hub_integration: azure_iot_hub_event_handler: AZURE_IOT_HUB_EVT_CONNECTED[0m 2022-05-19T07:58:34.425Z DEBUG</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Jun 2022 08:46:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88085/asset_tracker-v2-run-time-buffer-overflow-in-lte" /><item><title>RE: Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/thread/374076?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 08:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5bbf6da-bf5f-4e60-971b-3e0ea6ea07bd</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Håkon is on vacation. Are you still having issues with this?&lt;/p&gt;
[quote user="mexco"]If custom data request s added to data_list[],[/quote]
&lt;p&gt;&lt;span&gt;&amp;nbsp;Can you show the&amp;nbsp;&lt;/span&gt;&lt;span&gt;modifications&amp;nbsp;&lt;/span&gt;&lt;span&gt;you have made? Did you add a new new type toapp_module_data_type ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/thread/371116?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2022 11:25:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99660781-c580-47f8-b60e-f5e2e5adf278</guid><dc:creator>mexco</dc:creator><description>&lt;p&gt;I observed that in Main.c file, there is get_data() fn. If custom data request s added to data_list[], then buffer overflow occurs. I commented the request for environmental and added request for custom data in data_list[] then no buffer overflow occurred and custom data was visible and encoded in LTE. So, need to find that is there any limit to max requests to be passed through data_list[] ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/thread/371114?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2022 11:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8cf6095-43f7-41f8-8d4e-a6d1c6593994</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;And what is the MFW version and NCS version?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/thread/369658?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 10:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:542ce49b-80f2-4099-ade8-d543274a9b12</guid><dc:creator>mexco</dc:creator><description>&lt;p&gt;HI, I added some DBG measages to data_get() function in main.c of asset_tracker_v2. I added bms_module to default code and made changes in every file where required. The get_data() function prepares the list of requested data.&amp;nbsp; I observed that when&lt;/p&gt;
&lt;p&gt;app_module_event-&amp;gt;data_list[count++] = APP_DATA_BMS;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is added to get_data() functon, the buffer_overflow mesasge appears in LTE a shown in attached log file. When,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;app_module_event-&amp;gt;data_list[count++] = APP_DATA_BMS;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is not there in get_data() function, then there is no buffer_overflow and works well.&lt;/p&gt;
&lt;p&gt;The code pf get_data() also is shown here below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
static void data_get(void)
{
	static bool first = true;
	struct app_module_event *app_module_event = new_app_module_event();
	size_t count = 0;

        LOG_DBG(&amp;quot; Main: Entered data_get()&amp;quot;);

	/* Set a low sample timeout. If GNSS is requested, the sample timeout will be increased to
	 * accommodate the GNSS timeout.
	 */
	app_module_event-&amp;gt;timeout = 1;

	/* Specify which data that is to be included in the transmission. */
	app_module_event-&amp;gt;data_list[count++] = APP_DATA_MODEM_DYNAMIC;
        LOG_DBG(&amp;quot; Modem_dyn requested through data_list[]&amp;quot;);
	app_module_event-&amp;gt;data_list[count++] = APP_DATA_BATTERY;
        LOG_DBG(&amp;quot; APP_BATT requested through data_list[]&amp;quot;);
	app_module_event-&amp;gt;data_list[count++] = APP_DATA_ENVIRONMENTAL;
        LOG_DBG(&amp;quot; APP_ENV requested through data_list[]&amp;quot;);

	if (IS_ENABLED(CONFIG_APP_REQUEST_NEIGHBOR_CELLS_DATA) &amp;amp;&amp;amp; !app_cfg.no_data.neighbor_cell) {
		app_module_event-&amp;gt;data_list[count++] = APP_DATA_NEIGHBOR_CELLS;
	}

        LOG_DBG(&amp;quot; APP_NBR_CELLS requested through data_list[]&amp;quot;);
	/* The reason for having at least 75 seconds sample timeout when
	 * requesting GNSS data is that the GNSS module on the nRF9160 modem will always
	 * search for at least 60 seconds for the first position fix after a reboot. This limit
	 * is enforced in order to give the modem time to perform scheduled downloads of
	 * A-GPS data from the GNSS satellites.
	 *
	 * However, if A-GPS data has been downloaded via the cloud connection and processed
	 * before the initial GNSS search, the actual GNSS timeout set by the application is used.
	 *
	 * Processing A-GPS before requesting GNSS data is enabled by default,
	 * and the time that the application will wait for A-GPS data before including GNSS
	 * in sample requests can be adjusted via the
	 * CONFIG_APP_REQUEST_GNSS_WAIT_FOR_AGPS_THRESHOLD_SEC Kconfig option. If this option is
	 * set to -1, the application module will not request GNSS unless A-GPS data has been
	 * processed.
	 *
	 * If A-GPS data has been processed the sample timeout can be ignored as the
	 * GNSS will most likely time out before the sample timeout expires.
	 *
	 * When GNSS is requested, set the sample timeout to (GNSS timeout + 15 seconds)
	 * to let the GNSS module finish ongoing searches before data is sent to cloud.
	 */

	if (first) {
		if (IS_ENABLED(CONFIG_APP_REQUEST_GNSS_ON_INITIAL_SAMPLING) &amp;amp;&amp;amp; request_gnss() &amp;amp;&amp;amp;
		    !app_cfg.no_data.gnss) {
			app_module_event-&amp;gt;data_list[count++] = APP_DATA_GNSS;
			app_module_event-&amp;gt;timeout = MAX(app_cfg.gnss_timeout + 15, 75);
                        LOG_DBG(&amp;quot; GNSS requested through data_list[]&amp;quot;);
		}

		app_module_event-&amp;gt;data_list[count++] = APP_DATA_MODEM_STATIC;
		first = false;
	} else {
		if (request_gnss() &amp;amp;&amp;amp; !app_cfg.no_data.gnss) {
			app_module_event-&amp;gt;data_list[count++] = APP_DATA_GNSS;
			app_module_event-&amp;gt;timeout = MAX(app_cfg.gnss_timeout + 15, 75);
                        LOG_DBG(&amp;quot; GNSS requested through data_list[]&amp;quot;);
		}
	}

        app_module_event-&amp;gt;data_list[count++] = APP_DATA_BMS;
        LOG_DBG(&amp;quot; BMS requested through data_list[]&amp;quot;);

	/* Set list count to number of data types passed in app_module_event. */
	app_module_event-&amp;gt;count = count;
	app_module_event-&amp;gt;type = APP_EVT_DATA_GET;

        LOG_DBG(&amp;quot;Ready to launch APP_EVT_DATA_GET Event&amp;quot;);
	APP_EVENT_SUBMIT(app_module_event);
        LOG_DBG(&amp;quot;Launched APP_EVT_DATA_GET Event&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where overflow occurs, I could not understand ?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4428.log.txt"&gt;devzone.nordicsemi.com/.../4428.log.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset_tracker V2 run time buffer overflow in LTE</title><link>https://devzone.nordicsemi.com/thread/368851?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 13:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81b1d822-db99-4a91-9a6e-23ac963ac33f</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]If required, I can send complete Log file.[/quote]
&lt;p&gt;Yes, please. Also, you can provide as much information as possible, such as MFW version and NCS version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>