<?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>stack overflow</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91496/stack-overflow</link><description>Hello, 
 I&amp;#39;m just trying to run the LTE_BLE_GATEWAY sample program and I&amp;#39;ve flash all the nessesary firmware onto the nrf9160dk baord. However, when I turn on the nrf52, it gets connected to the nrf8160 for a split second and it reset itself. Therefore</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Aug 2022 04:41:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91496/stack-overflow" /><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384020?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 04:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b50459cb-98cb-4d28-b7d9-72f058301131</guid><dc:creator>Ben Li</dc:creator><description>&lt;p&gt;Thank you so much it works!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384019?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 11:35:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d68cad4-0f75-4aae-86e8-9521d4a4a37d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Actually I don&amp;#39;t think you need to program the Thingy:52. By default it should be shipped with the hex file under&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-52/Download?lang=en#infotabs"&gt;https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-52/Download?lang=en#infotabs&lt;/a&gt;. Looking at your logs, you&amp;#39;re able to connect to the Thingy:52, so it seems like the correct firmware is running (Thingy:52 should advertise with the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.2/samples/nrf9160/lte_ble_gateway/src/ble.c#L26"&gt;following UUID&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;In my case I had reprogrammed the Thingy:52 and used it for different stuff, so I had to program the correct firmware onto it. I used a 10-pin cable and the programmer on the nRF52 DK (Thingy:52 does not have a programmer itself), but I think it should be possible through &lt;a href="https://infocenter.nordicsemi.com/topic/ug_thingy52/UG/thingy52/managing_thingy_devices/apps_ios_dfu.html?cp=14_3_5_2"&gt;OTA-DFU as well&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Try programming the 52840 and 9160 on the nRF91 DK, with the hex files I uploaded, and see if you encounter the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384018?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 04:24:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40a47f8f-6f6d-436f-8dad-b7d8a83f86dc</guid><dc:creator>Ben Li</dc:creator><description>&lt;p&gt;Sorry, I didn&amp;#39;t know that I need to flash nrf52 with the&amp;nbsp;&lt;span&gt;thingyv210HW10.hex&amp;nbsp;firmware. It was running on DFU mode the whole time. I&amp;#39;ve tried to flash the firmware onto thingy52 but it seems like thingy52 doesn&amp;#39;t have a programmer. I also tried to use&amp;nbsp;nrfstudio to flash thingy52 but it&amp;#39;s using 64bit operating system so I can&amp;#39;t get it installed. Is there a recommended way to flash thingy52? The only avaliable baords I have are nrf9160dk and thingy52.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ben Li&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384017?ContentTypeID=1</link><pubDate>Sun, 21 Aug 2022 21:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29936760-dfbc-4a7a-be08-e7190ce9c621</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I still think it&amp;#39;s strange that increasing&amp;nbsp;&lt;span&gt;CONFIG_BT_RX_STACK_SIZE did not resolve the issue. What value did you set it to? Would it be possible to try increasing it more?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384016?ContentTypeID=1</link><pubDate>Sun, 21 Aug 2022 21:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f0cd0d6-fe9f-4a53-8ef0-3e3964f9de02</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I just tested with a Thingy:52 v1.0.0 and an nRF9160 DK v1.0.0 and was not able to reproduce the issue, I got the following log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.0.99-ncs1  ***
+CEREG: 90
[00:00:00.493,041] &amp;lt;inf&amp;gt; lte_ble_gw: LTE Sensor Gateway sample started
[00:00:00.493,255] &amp;lt;inf&amp;gt; lte_ble_gw: Initializing Bluetooth..
[00:00:00.510,803] &amp;lt;inf&amp;gt; lte_ble_gw: Establishing LTE link (this may take some time) ...
[00:00:01.204,040] &amp;lt;wrn&amp;gt; bt_hci_core: opcode 0x0000 pool id 3 pool 0x20015304 != &amp;amp;hci_cmd_pool 0x2001536c
[00:00:01.255,310] &amp;lt;inf&amp;gt; lte_ble_gw: Bluetooth ready
[00:00:01.262,390] &amp;lt;inf&amp;gt; lte_ble_gw: Scanning...
[00:00:05.030,029] &amp;lt;inf&amp;gt; lte_ble_gw: Device found: CA:99:4C:95:7E:69 (random)
[00:00:05.416,290] &amp;lt;inf&amp;gt; lte_ble_gw: Connected: CA:99:4C:95:7E:69 (random)
[00:00:12.578,857] &amp;lt;inf&amp;gt; lte_ble_gw: Orientation: 0
[00:00:18.459,045] &amp;lt;inf&amp;gt; lte_ble_gw: Orientation: 1
[00:00:25.359,252] &amp;lt;inf&amp;gt; lte_ble_gw: Orientation: 2
[00:00:32.649,444] &amp;lt;inf&amp;gt; lte_ble_gw: Orientation: 0
[00:00:35.139,526] &amp;lt;inf&amp;gt; lte_ble_gw: Orientation: 3&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll upload the exact hex files I used. Try to program them to the appropriate chips and see if you are able to reproduce the issue then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nRF9160DK nRF9160:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lte_5F00_ble_5F00_gateway.hex"&gt;devzone.nordicsemi.com/.../lte_5F00_ble_5F00_gateway.hex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;nRF9160DK nRF52840:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7367.hci_5F00_lpuart.hex"&gt;devzone.nordicsemi.com/.../7367.hci_5F00_lpuart.hex&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Thingy52:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/thingyv210hw10.hex"&gt;devzone.nordicsemi.com/.../thingyv210hw10.hex&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384015?ContentTypeID=1</link><pubDate>Sun, 21 Aug 2022 08:17:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b01369a3-01fa-4dd5-9276-28fe7f36d6f3</guid><dc:creator>Ben Li</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Yes I&amp;#39;m using&amp;nbsp;NCS v2.0.0. I&amp;#39;m just trying to test it out with the LTE sensor gateway sample with the exact nrf9160dk and thingy:52.&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/lte_ble_gateway/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/lte_ble_gateway/README.html&lt;/a&gt;&amp;nbsp; I tried to run it out of the box without making anychanges, but I&amp;#39;m expericing these problems above. Then, I&amp;#39;ve tried changing the code. The only thing I&amp;#39;ve changed is the config stack size.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ben Li&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384014?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2022 09:13:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bd33de-af86-4092-baa3-0e568b11c2e5</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Hmm.. I&amp;#39;ll try to reproduce this myself. Based of the logs, it seems like you&amp;#39;re using NCS v2.0.0, correct? Have you made any changes to the lte_ble_gateway sample, or did you run it out of the box?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384013?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2022 07:26:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df346289-6ce3-4e3a-b013-0cb761d0678e</guid><dc:creator>Ben Li</dc:creator><description>&lt;p&gt;Hey Simon,&lt;/p&gt;
&lt;p&gt;Thank you for your input. However, I&amp;#39;m still experiencing the same issue dispite I have increase the CONFIG_BT_RX_STACK_SIZE. Is there any debugging method you would recommend? Or is there anything else I should change here?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Ben Li&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack overflow</title><link>https://devzone.nordicsemi.com/thread/384012?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 13:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81b337d8-615d-4386-bf7a-034924b3cc2c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Solution:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Try increasing&amp;nbsp;&lt;span&gt;CONFIG_BT_RX_STACK_SIZE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Check the file &amp;lt;sample&amp;gt;/build/zephyr/.config what&amp;nbsp;CONFIG_BT_RX_STACK_SIZE is currently set to and set it to a higher value in the prj.conf file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Explanation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I can see from your log that the overflow happened in the thread &amp;quot;bt_rx_thread&amp;quot;.&amp;nbsp;After searching for&amp;nbsp;&lt;span&gt;bt_rx_thread in the whole NCS, I figured out that this thread was created in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.0.99-ncs1/drivers/bluetooth/hci/h4.c#L522-L527"&gt;zephyr/drivers/bluetooth/hci/h4.c&lt;/a&gt;, and if you look at &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.0.99-ncs1/drivers/bluetooth/hci/h4.c#L38"&gt;line 38&lt;/a&gt; in this file you see that the stack size is determined by&amp;nbsp;CONFIG_BT_RX_STACK_SIZE&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>