<?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>SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64623/sdk17-0-behaving-uneven-in-different-pc</link><description>HI, 
 
 we created an application on SDK &amp;quot;nRF5_SDK_17.0.0_9d13099&amp;quot; .The example code used to develop the application is &amp;quot;ble_app_hids_mouse&amp;quot;. 
 we developed the application code successfully and its working fine with our device. 
 I developed the application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Aug 2020 12:45:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64623/sdk17-0-behaving-uneven-in-different-pc" /><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263826?ContentTypeID=1</link><pubDate>Mon, 10 Aug 2020 12:45:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7eb31b4-7bf4-473a-a810-eba2a8140dd1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Nandhu,&lt;/p&gt;
&lt;p&gt;Jared left for vacation, so I took over this case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Jared made some good points in his last reply. Something is probably different in the environment when your colleague is testing. It may be the computer&amp;#39;s BLE behaving differently from yours, it may be some differences in the build environment. However, you need to check what function that returned 0x02. If it was indeed&amp;nbsp;ble_bas_battery_level_update() you need to check which function inside there that returned this value. Also, if it was one of the softdevice calls, which indicates that you are trying to send a notification, but the softdevice is not enabled yet, you need to find out why the&amp;nbsp;battery_level_update() was called when the softdevice is not enabled. Is this an app_timer callback?&lt;/p&gt;
&lt;p&gt;If yes, perhaps the timer is started before you are connected, for some reason. I can&amp;#39;t check this, because we don&amp;#39;t have your source code.&amp;nbsp;&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: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263721?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 18:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7f165c2-79ec-467b-bd54-f93fd78272da</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Jared,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I can&amp;#39;t able to do the test now ,i already told you that system which showing the issue was not with me .&lt;/p&gt;
&lt;p&gt;System is with my&amp;nbsp;&lt;span&gt;colleague and he is working from home due to corona and the Jlink debug tool is with me .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So if there is any delay issue i will close this case and open a new case when he is available.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263720?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 11:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddbe21d7-7756-4922-be1c-53b0f0e86af6</guid><dc:creator>Jared</dc:creator><description>[quote user="NANDHU NAKULAN"]Why this error_code is not showing in my system with exactly the same SDK&amp;nbsp; and application code?[/quote]
&lt;p&gt;The short answer is that everything is probably not the same with his environment. Something has probably changed such as the SDK, application code, IDE related settings, his computer settings etc..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If everything was constant then you would probably not get a different result as it&amp;#39;s a deterministic system ;)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now, please do what we suggested earlier. It would give us more information regarding the root cause of the issue. It would also save both you and us valuable time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263719?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 03:19:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:604deb78-74f1-418e-8d1c-186785a13865</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Edvin ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Before the test i need a clarification from you.&lt;/p&gt;
&lt;p&gt;Why this error_code is not showing in my system with exactly the same SDK&amp;nbsp; and application code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263718?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 16:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fc6bd0b-1ced-47c0-aced-eee47e6b482f</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I will get back to you as soon as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263717?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 11:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fefee9d8-f5bd-450c-a2db-4b6afea5f43d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user="Jared"][/quote]&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Set a breakpoint at line 265 in ble_bas.c. What is returned from sd_ble_gatts_value_set() ?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Set a breakpoint at line 306 in ble_bas.c. What is returned from battery_notification_send()?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Nandhu,&lt;/p&gt;
&lt;p&gt;Please let us know when you or your colleague working from home has checked the test. We can&amp;#39;t say what causes the return value if we don&amp;#39;t know what function returned it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263716?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 09:12:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71b480ca-8ad7-4488-aae8-7c06966c584e</guid><dc:creator>NANDHU</dc:creator><description>[quote user="Jared"]I can&amp;#39;t see where this would be set in&amp;nbsp;battery_level_update().[/quote]
&lt;p&gt;&amp;nbsp;&lt;span&gt;battery_level_update() will call every 1sec after the &amp;quot;BLE_GAP_EVT_CONNECTED&amp;quot; event occured.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared, i can&amp;#39;t check your test now because the system with new segger ide is not with me.Actually he is working from home . so there is some issue in testing .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;1) why the application developed in SDK behaving uneven is different version of segger ide?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please give me a proper answer if you can?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263715?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 07:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d8180f5-a5f7-4e54-bab3-9deeefd29f8c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if the error code is actually&amp;nbsp;&lt;span&gt;NRF_ERROR_SOFTDEVICE_NOT_ENABLED as I can&amp;#39;t see where this would be set in&amp;nbsp;battery_level_update(). &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Set a breakpoint at line 265 in ble_bas.c. What is returned from sd_ble_gatts_value_set() ?&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Set a breakpoint at line 306 in ble_bas.c. What is returned from battery_notification_send()?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Do the steps separately, the Softdevice will assert if you resume the application after you&amp;#39;ve halted it. It needs to be reset after it has been halted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263714?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 09:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f3f8f6-555b-4c6e-b27c-e70559f7709a</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;okka i got your point.&lt;/p&gt;
&lt;p&gt;Lets leave all of it .&lt;/p&gt;
&lt;p&gt;you said that ,&lt;span&gt;NRF_ERROR_SOFTDEVICE_NOT_ENABLED error generates only when the&amp;nbsp;&amp;nbsp;SD is not enabled.right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So&amp;nbsp; if SD not enabled the application code will not work (our device is bluetooth mouse so there is many sd event are happening) even we ignore one error_code .Is it right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But in our case even after we ignore that error&amp;nbsp; code our device is working. How?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263713?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 08:23:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386feca3-b077-46d2-a36e-18a825da7dba</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Adding those conditions won&amp;#39;t solve anything except if you handle the exceptions elsewhere in your code. The APP_ERROR_CHECK() calls the error handler if&amp;nbsp;if err_code is non-zero. If the application did assert before you included those checks in the If statement then it&amp;#39;s probably because you ignore one of the errors in your code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263712?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 08:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aefc5b02-821e-4af4-ac8b-c92546984fea</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;if the SD is not enabled then how the application code works after we put that condition before&amp;nbsp;APP_ERROR_HANDLER(err_code);.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What are the configuration needed to enable SD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263711?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 08:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cd81ffe-41ad-4b85-8b43-e816d9a8c684</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;A&amp;nbsp;&lt;span&gt;NRF_ERROR_SOFTDEVICE_NOT_ENABLED means that you haven&amp;#39;t&amp;nbsp;enabled the Softdevice and is probably trying to do a SD dependent operation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263710?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 07:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4fc59c4-4b10-402e-ba0e-da9b8cdf48d4</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;&lt;span&gt;(err_code != NRF_ERROR_SOFTDEVICE_NOT_ENABLED ) also included in the checking condition .&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263709?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 06:59:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0661c3ef-72ad-4c30-a749-1677699760cd</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Jared"]What is err_code() and what function returns the code?[/quote]
&lt;p&gt;&amp;nbsp;error code() is returning &amp;quot;2&amp;quot;&amp;nbsp; ie&amp;nbsp;&amp;nbsp;NRF_ERROR_SOFTDEVICE_NOT_ENABLED&lt;/p&gt;
&lt;p&gt;please look the screen shot.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-bf463ee2f1da4857a089f57345957549/assert-1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why this error happening in his system and not in my system? what is the reason for this ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;please look the below code which causes this error . After we&amp;nbsp; put some&amp;nbsp; condition before APP_ERROR _CHECK the issue was solved&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*__________________________________________________
// @brief: Function for the battery level update.
* @param[in] battery_level     battery level in percentage.
__________________________________________________*/
void battery_level_update(uint16_t battery_level)
{
    ret_code_t err_code;

    err_code = ble_bas_battery_level_update(&amp;amp;m_bas, battery_level,BLE_CONN_HANDLE_ALL);
    if ((err_code != NRF_SUCCESS) &amp;amp;&amp;amp;
    (err_code != NRF_ERROR_BUSY) &amp;amp;&amp;amp;
    (err_code != NRF_ERROR_RESOURCES) &amp;amp;&amp;amp;
    (err_code != NRF_ERROR_FORBIDDEN) &amp;amp;&amp;amp;
    (err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp;
    (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
    )
    {
       APP_ERROR_HANDLER(err_code);
    } 
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But we need a solid reason why this issue was happening in other system.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263708?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:57:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da4111a1-db28-43da-85f3-8ac104a6ab4e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The APP_ERROR_CHECK() function call will make the application assert by calling the error handler if the err_code is anything else than 0x00.&amp;nbsp; What is err_code() and what function returns the code?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263707?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93c534b1-8040-49db-b058-d49a1f8325cd</guid><dc:creator>NANDHU</dc:creator><description>&lt;p&gt;Please reply as soon as you can possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263706?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 17:09:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddfd0799-ddf2-420d-987d-2109635dd0fb</guid><dc:creator>NANDHU</dc:creator><description>[quote user="Jared"]Exactly what do you mean by not working? [/quote]
&lt;p&gt;&amp;nbsp;Our device is a bluetooth 2d- 3d mouse . when we flash the code to our device the device will start advertising exactly like nordic ble_app_hid_mouse but now its not advertisng when i flashed the code from his system .&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Jared"]Have you checked that the application isn&amp;#39;t asserting somewhere?[/quote]
&lt;p&gt;What you mean by asserting?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;We debugged&amp;nbsp; the code in his system and find out the reason for the device not working .Actually its due to &amp;quot;APP_ERROR_CHECK(err_code)&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We&amp;nbsp; avoid the&amp;nbsp;&lt;span&gt;APP_ERROR_CHECK(err_code) from the function which return err_code but the issue is showing with the next function which using&amp;nbsp; APP_ERROR_CHECK(err_code)&amp;nbsp;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NOTE:- The&amp;nbsp;APP_ERROR_CHECK(err_code)&amp;nbsp; function halt the code execution only if we define DEBUG but in our project settings we are not included the DEBUG in preprocessor directives.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there any issue with segger ide version&amp;nbsp;?i am using segger ide v 4.10a and he is using segger ide V 4.52c&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK17.0  BEHAVING UNEVEN IN DIFFERENT PC  .</title><link>https://devzone.nordicsemi.com/thread/263705?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 11:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d528f7c-6eb5-4779-8a74-73167bd88f0e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] He build the code successfully and flashed the code to our device but now the device is not working with exactly same code .[/quote]
&lt;p&gt;Exactly what do you mean by not working? Have you checked that the application isn&amp;#39;t asserting somewhere?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>