<?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>Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60408/device-connects-then-disconnects-immediately</link><description>This behavior only occurs when connecting to the phone using the native connection procedure, it does not disconnect when using the nRF Connect app on the phone (Android Pixel 3a). Wireshark and the packet sniffer didn&amp;#39;t shed much light, I&amp;#39;ve played with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 May 2020 15:23:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60408/device-connects-then-disconnects-immediately" /><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/248782?ContentTypeID=1</link><pubDate>Thu, 07 May 2020 15:23:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8e1a751-57ca-4540-8bc5-2f43b1d2ba83</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;You can close this ticket I got it working with a little help from Taiyo Yuden, they sent me the files I asked for and I got my code ported in an hour or so.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/248386?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 09:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02c2c7da-3054-4a11-bd77-b8f8e58afccb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;How do you find your firmware image size ? Please be aware that in our SES project we included the softdevice, so the flash size you see at the build screen is the total flash size, not just the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can find the actual application flash size using arm-none-eabi-size.exe tool.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Have a look at this screenshot:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://imgshare.io/image/zfWhF"&gt;https://imgshare.io/image/zfWhF&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://imgshare.io/images/2020/05/06/a33.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/248063?ContentTypeID=1</link><pubDate>Tue, 05 May 2020 07:15:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced56fad-62fe-4e6a-bf13-a966c23440e7</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;I have disabled the nrf_log capability, sensor simulator, battery timer, and am still at 134k for the app itself. What else should I disable/remove that won&amp;#39;t impact the bluetooth stack?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/248028?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 22:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db1c237f-eef3-457e-93c1-b7794856c17d</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;I am using SES. Optimizing for size doesn&amp;#39;t significantly change the flash requirement at all. You say &amp;quot;you need to choose to remove the logging, some functionalities...&amp;quot; , my gosh, this is &lt;strong&gt;exactly&lt;/strong&gt; what I&amp;#39;m referring to. Please specify in detail what those elements are that I need to remove to make it fit into the 192k but without breaking the bluetooth functionality. Aside from that all I need is the keyboard functionality.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/247896?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 13:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21802364-6e19-4bee-a0b0-9fc216690b5d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Sorry for the late response, we had the 1st May as a holiday in Norway.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know which compiler are you using ? Do you use any optimization when compiling ? When using optimization level 3 on KEIL I can see the size of the application is about 70kB plus the softdevice size of 100kB it&amp;#39;s 170kB total.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Of course when you compile with debug on and no optimization you will exceed the 192kB of flash. Then you need to choose to remove the logging, some functionalities or run on a nRF52840 emulation.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/247778?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 08:02:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b24a245-1604-4a31-9b58-8db4a8e3a846</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Hello, can you run this down? seems a simple request, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/247651?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 20:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8cb27f1-f748-47ae-9a6f-519c44ea386a</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Perhaps but in it&amp;#39;s native form it doesn&amp;#39;t fit into the 192k of flash on the nrf52811, and I had to disable and exclude from the build certain elements such as the sensor simulator. As I mentioned above, the pca10056e example that i modified to fit does exactly the same thing as my code. I&amp;#39;m willing to concede that the issue I&amp;#39;m having is related to the Taiyo Yuden hardware specifically (EYSNSNZWW) but I kind of doubt that&amp;#39;s the case. It sure would be nice to know I&amp;#39;m starting with source that&amp;#39;s been verified by the manufacturer of the SOC, in this case, Nordic. I followed all the guidelines in the transferring emulated project guide. So to answer your question, no, that&amp;#39;s not &amp;quot;exactly&amp;quot; what the pca10056e example is for because that code doesn&amp;#39;t fit into 192k of flash without modification. Does my request make more sense now? Let me rephrase - please send me a project that is known to work on the nrf52811 itself, not on an emulated nrf52811. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/247542?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 12:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6b4ad3-5f74-4199-985a-dd75f4779931</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Isn&amp;#39;t it what exactly the example in&amp;nbsp;\examples\ble_peripheral\ble_app_hids_keyboard\pca10056e for&amp;nbsp; ? Please have a look here:\examples\ble_peripheral\ble_app_hids_keyboard\pca10056e&lt;/p&gt;
&lt;p&gt;Please follow the guide at &amp;quot;Transferring emulated project&amp;quot; section.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/247195?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 04:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:572eb83b-c70a-4f83-ba1f-98987418294a</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Look, what would be easier is if you just sent me the HID keyboard example project that works on the nRF52811 device. I presume you have such a thing. This would enable me to port my custom code to that framework which will be vastly easier than trying to debug the issue remotely with the existing example. Please send the main.c, sdk_config.h, project file and memory map file for the example that implements the HIDS keyboard example on the nRF52811 and can successfully connect and send keyboard keys to the phone. Can you do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246994?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 08:12:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:391e5a8b-5c24-4bb7-ac76-86da6b451b41</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;So you only modify the sdk_config.h ? I would assume you also modify the project setting. Please send the whole project source code so we can test here. Which SDK version are you testing with ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may want to debug and check where the device crashed. Please follow the guide &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/#60126"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246922?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 16:09:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be4eb828-27ec-48ac-bf82-3e1973f832be</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Yes, the same issue with the HIDS keyboard example that has been modified to fit in the nrf52811 device with 192K of flash and the s112 SD. check out the sdk_config.h to see what&amp;#39;s been disabled.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5543.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../5543.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246786?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 11:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adde4bee-9ac9-4fe6-9108-e70ed16cffe3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;What I can see from the trace is that the device crashed after the phone starting the bonding process. Especially when it start exchanging the Identity Address Information.&amp;nbsp;&lt;br /&gt;I suspect that the application wasn&amp;#39;t prepared for storing the identity information. It crashed, either in the stack or in the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The reason it didn&amp;#39;t crash when using nRF Connect app is that the app doesn&amp;#39;t do bonding automatically when the Bluetooth native connection would do bonding automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We would need more debug information. Do you see the same issue when testing with the bluetooth example in NCS ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246601?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 16:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d7fd3d8-199f-4627-b044-f7712f8bb091</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Here&amp;#39;s another one taken with nRF Connect that connects but then disconnects when reading the characteristics.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Wireshark_5F00_gestr2.pcapng"&gt;devzone.nordicsemi.com/.../Wireshark_5F00_gestr2.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246590?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 16:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0bbbbde-a331-4adb-951b-c14417b42457</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;Defining DEBUG in the preprocessor doesn&amp;#39;t do anything, are there other flags I need to set? Here is the sniffer trace, device is &amp;quot;gestr2&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Wireshark_5F00_gestr2.txt"&gt;devzone.nordicsemi.com/.../Wireshark_5F00_gestr2.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246504?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2020 12:05:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb249de6-0bf3-4677-a8eb-00b8151c8634</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;There must be something wrong that crashed the code make it not reached the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED.&amp;nbsp;&lt;br /&gt;Please follow this debugging tip:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/#60126"&gt;https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/#60126&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And please capture a sniffer trace.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/246365?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 21:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52f3435f-a32c-4322-8799-2e5b805df481</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;the code never reaches that case in the ble_evt_handler&lt;pre class="ui-code" data-mode="text"&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t err_code;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            NRF_LOG_INFO(&amp;quot;Connected&amp;quot;);
            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(err_code);
            m_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
            err_code = nrf_ble_qwr_conn_handle_assign(&amp;amp;m_qwr, m_conn_handle);
            APP_ERROR_CHECK(err_code);
            break;

        case BLE_GAP_EVT_DISCONNECTED:
            NRF_LOG_INFO(&amp;quot;Disconnected&amp;quot;);
            
            // Dequeue all keys without transmission.
            (void) buffer_dequeue(false);

            m_conn_handle = BLE_CONN_HANDLE_INVALID;
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/245570?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 13:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d69128b-d87d-4431-bfc2-3e09260397d5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please capture and send us a&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer"&gt; sniffer trace.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also please check the disconnect reason when you receive the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device connects then disconnects immediately</title><link>https://devzone.nordicsemi.com/thread/245408?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 03:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a64087c1-5189-4db9-a3fc-221d30564231</guid><dc:creator>apdobaj</dc:creator><description>&lt;p&gt;I can cause the connection to drop within nRF Connect just by reading the characteristics.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>