<?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>NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem</link><description>Hi. 
 NRF52832 is used as central for connecting with phones as peripheral. NUS service is used. Lesc is used too. 
 SDK 17 SoftDevice S132 V7.0.1 
 I have sometimes crash of application. I suppose it is crash of softdevice. there aren&amp;#39;t any logs in that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Sep 2020 12:49:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem" /><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/270597?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 12:49:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5be710e2-5b50-4af7-b4fd-982842886320</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem/270062"]&amp;nbsp;I am no HW expert. I suggest you create a new ticket for this. That way, you don&amp;#39;t have to listen to me trying to explain something to you that a colleague told me, which I don&amp;#39;t understand myself.&amp;nbsp;[/quote]
&lt;p&gt;ok&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem/270062"]So if you see disconnected reason 0x13 on the nRF, it means that the phone decided to disconnect. Perhaps you can try to connect to it with nRF Connect for Android/iOS, and see if it disconnects, and if so, what the reason (should be printed in the log in nRF Connect for iOS/android).[/quote]
&lt;p&gt;&lt;span&gt;0x13&amp;nbsp; is used in app code too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The issue can be closed now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;we&amp;#39;ll try to debug phone application later.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/270062?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 11:40:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50885f76-053f-4561-99f1-7c9de19e39c8</guid><dc:creator>Edvin</dc:creator><description>[quote user="DmitrySol"]Could you advice a variant of self testing for factory testing.&lt;br /&gt;I mean testing RF part, accuracy of quartz. Perhaps do you have application note for that?[/quote]
&lt;p&gt;&amp;nbsp;I am no HW expert. I suggest you create a new ticket for this. That way, you don&amp;#39;t have to listen to me trying to explain something to you that a colleague told me, which I don&amp;#39;t understand myself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does that mean that the disconnect issue still remains? If so, we are back to the disconnect reason 13. I just checked, and actually, if you disconnect from the nRF yourself, you will receive a disconnect reason 0x16 (BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION), and not 0x13 (BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if you see disconnected reason 0x13 on the nRF, it means that the phone decided to disconnect. Perhaps you can try to connect to it with nRF Connect for Android/iOS, and see if it disconnects, and if so, what the reason (should be printed in the log in nRF Connect for iOS/android).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/270013?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 09:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a5b2fed-33c8-4002-a4e0-4cc4f7770567</guid><dc:creator>DmitrySol</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem/270001"]My advice to you is to try to debug the application.&amp;nbsp;[/quote]
&lt;p&gt;Ok. I see.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem/270001"] have sometimes crash of application.[/quote]
&lt;p&gt;It is solved. I wrote above. External reset signal on the reset pin was the cause.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Disconnections on old phone is another problem.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/65820/nrf52832-sdk-17-nus-lesc-problem/270001"]Do you see any disconnect reason on the nRF?[/quote]
&lt;p&gt;&lt;span&gt;app: BLE_GAP_EVT_DISCONNECTED: 1 , reason=0x13&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And the next question:&lt;br /&gt;Could you advice a variant of self testing for factory testing.&lt;br /&gt;I mean testing RF part, accuracy of quartz. Perhaps do you have application note for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/270001?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 08:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1ac7c5d-33a1-4ffa-b4ea-cff82c382ab5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It is not possible to filter on a central device, unfortunately.&lt;/p&gt;
&lt;p&gt;I assume you want to use the sniffer trace to figure out what&amp;#39;s wrong. Please be aware that when the link is encrypted using LESC, the sniffer will not be able to sniff the connection anyway, since sniffer devices can&amp;#39;t keep up with LESC, because of it&amp;#39;s nature. It could keep up for some time (with undecrypted packages), but eventually it can&amp;#39;t keep up with the channel switching, so it will loose the connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My advice to you is to try to debug the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]I have sometimes crash of application.&lt;br /&gt;I suppose it is crash of softdevice.&lt;br /&gt;there aren&amp;#39;t any logs in that time.[/quote]
&lt;p&gt;&amp;nbsp;Do you have logging enabled in your application at all? Are you sure it doesn&amp;#39;t say something like &amp;quot;fatal error&amp;quot;?&lt;/p&gt;
&lt;p&gt;Is there some way for me to replicate this on a DK?&lt;/p&gt;
&lt;p&gt;Is it the nRF that crashes? What do you see on the phone? Does it just disconnect? Have you tried connecting via nRF Connect for Android/iOS? Does it give a disconnect reason?&lt;/p&gt;
&lt;p&gt;Do you see any disconnect reason on the nRF? Does the disconnect event occur at all?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269870?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2020 12:38:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5b1eec9-8915-4658-bcf5-58c266f25bf2</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;Good day! Edvin.&lt;/p&gt;
&lt;p&gt;Thanks for your helping.&lt;/p&gt;
&lt;p&gt;The matter is - when disconnections appears, that is cycling every few seconds.&lt;br /&gt;So I can&amp;#39;t catch address in list of wireshark.&lt;/p&gt;
&lt;p&gt;Could I set address of central device as not private random (for debugging). and use it for filtering in wireshark?&lt;br /&gt;If is it possible, how can i set that?&lt;/p&gt;
&lt;p&gt;And the next question:&lt;br /&gt;Could you advice a variant of self testing for factory testing.&lt;br /&gt;I mean testing RF part, accuracy of quartz. Perhaps do you have application note for that?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269686?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 13:55:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84a227c9-486e-4a16-b793-8118d10f18b4</guid><dc:creator>Edvin</dc:creator><description>[quote user="DmitrySol"]I try to sniff rf logs by wireshark.&lt;br /&gt;But i don&amp;#39;t understand how to setup filter to catch interesting devices.&lt;br /&gt;I enter passkey &lt;br /&gt;But addresses are changing on every connect (they are random)[/quote]
&lt;p&gt;&amp;nbsp;You need to select the advertising device from this dropdown menu:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-60e463a9dfe646e29e23baec3f3755a9/pastedimage1600174289449v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In IAR you disable optimization here:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-60e463a9dfe646e29e23baec3f3755a9/pastedimage1600177970819v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269645?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 12:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0741b5e1-664a-41d6-8532-b42b507c2dbf</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;I use IAR 8&lt;/p&gt;
&lt;p&gt;Optimisation is switched off now.&lt;/p&gt;
&lt;p&gt;Disconnections are observed periodically.&lt;br /&gt;Connection is set up. Data exchange is processed some seconds. And after that disconnect is following:&lt;br /&gt;&amp;lt;info&amp;gt; app: ble_nus_c_evt_handler(): conn_handle=0x2000, evt_type=0x2 &lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_GAP_EVT_DISCONNECTED: 1 , reason=0x13&lt;/p&gt;
&lt;p&gt;break points on sd_ble_gap_disconnect doesn&amp;#39;t catch.&lt;/p&gt;
&lt;p&gt;Is it means that phone makes disconnect?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I try to sniff rf logs by wireshark.&lt;br /&gt;But i don&amp;#39;t understand how to setup filter to catch interesting devices.&lt;br /&gt;I enter passkey &lt;br /&gt;But addresses are changing on every connect (they are random)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269577?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 08:48:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3572bd92-2b43-48d3-a0e4-a6ec59639850</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Breakpoints should catch, but the order of things may behave weird if optimization is enabled. Try to disable it. Let me knoe what IDE you are using if you are not sure how to do this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another thing with breakpoints: If you have hit a breakpoint, you may try to step a few steps, but the softdevice will after a while realize that it missed some time critical events, and assert. So basically, this means that you need to reset the application after a breakpoint is hit.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269507?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 05:47:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07578ef6-daf0-4b70-8c29-2f9c93463bb0</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;Breakpoint at this place is catched sometimes.&lt;/p&gt;
&lt;p&gt;case BLE_GATTC_EVT_TIMEOUT:&lt;br /&gt; // Disconnect on GATT Client timeout event.&lt;br /&gt; NRF_LOG_INFO(&amp;quot;BLE_GATTC_EVT_TIMEOUT: %d &amp;quot;, conn_handle);&lt;br /&gt; err_code = sd_ble_gap_disconnect(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle,&lt;br /&gt; BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;but it is rarely.&lt;br /&gt;So i hesitate that it is cause.&lt;/p&gt;
&lt;p&gt;Breakpoints work strange sometimes.&lt;br /&gt;May be so that breakpoints catch not all times?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269411?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 13:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78fe22b2-de20-4126-bf6d-e15b54e73030</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You still don&amp;#39;t know who initiated the disconnect, but either the nRF or the phone decided to disconnect. Check all the places in your application that can call sd_ble_gap_disconnect, and try to set breakpoints. Alternatively, you can try to capture a sniffer trace and see which device that sends the disconnect packet.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269375?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 12:42:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcc38735-2d83-41ea-8052-a80e2e39bc1e</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;DEBUG was present in preprocessor directives.&lt;br /&gt;Reset problem is solved now. (It is described above)&lt;/p&gt;
&lt;p&gt;I have another question.&lt;br /&gt;When chip as central is connected with phone ( as peripheral)&lt;br /&gt;disconnection appears sometimes:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: ble_nus_c_evt_handler(): conn_handle=0x0, evt_type=0x2&lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_NUS_C_EVT_DISCONNECTED: 0x0&lt;br /&gt;&amp;lt;info&amp;gt; app: BLE_GAP_EVT_DISCONNECTED: 1 , reason=0x13&lt;/p&gt;
&lt;p&gt;0x13 means:&lt;br /&gt;#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**&amp;lt; Remote User Terminated Connection. */&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;It happens on old phone (BQ-5001L ble 4.0).&lt;br /&gt;I seem that another phone (more modern) doesn&amp;#39;t has this issue.&lt;/p&gt;
&lt;p&gt;What may be caused of that disconnection?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269200?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 14:11:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:291c0147-07c0-4b5c-92d0-4ff436585cde</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try to add DEBUG to your preprocessor definitions, and monitor the log.&lt;/p&gt;
&lt;p&gt;If you aren&amp;#39;t sure how to add preprocessor definitions, please let me know what IDE you are using. Segger Embedded Studio? Keil?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are not sure how to monitor or enable the log, let me know.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SDK 17 NUS LESC problem</title><link>https://devzone.nordicsemi.com/thread/269157?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 12:10:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e77642ef-aedd-4cf2-b0e6-b58d43446931</guid><dc:creator>DmitrySol</dc:creator><description>&lt;p&gt;I am sorry.&lt;/p&gt;
&lt;p&gt;It was reset from watchdog by host CPU.&lt;/p&gt;
&lt;p&gt;I try now without lesc.&lt;/p&gt;
&lt;p&gt;if It will be all right, than I will be testing lesc again.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>