<?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>Battery Service Good Practice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50563/battery-service-good-practice</link><description>I am adding a Battery Service and am searching for advice on good practice. Can you advise? 
 In the SDK examples, many include the battery service but only ble_app_proximity makes real battery measurements (others simulate the battery voltage). If I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Aug 2019 11:47:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50563/battery-service-good-practice" /><item><title>RE: Battery Service Good Practice</title><link>https://devzone.nordicsemi.com/thread/202595?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 11:47:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b43df23-e559-4d59-be12-ab33f8c96c73</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]Do I understand that the device will then send notifications to the Central device, containing the battery level? If so, does this happen on every connection or only if the level has changed?[/quote]
&lt;p&gt;&amp;nbsp;The example will not send the battery level on every connection interval, that would be a waste of lot of power. The sampling like you said is done based on the configurable timer expiry callback and if the sampled value is different than the one sampled before, then a notification is sent on the next connection interval. If it is same as before, then no notification is sent, as it is assumed that the central will remember the last notification value sent.&lt;/p&gt;
[quote user=""]What should I do with ble_bas_battery_lvl_on_reconnection_update()? The only code example I see with this is for a device operating as a Central device.[/quote]
&lt;p&gt;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__ble__bas.html"&gt;This&lt;/a&gt;&amp;nbsp;infocenter page says that this function can be used to send an battery level update for the bonded peers. This will be a bit faster first time update than to do the whole procedure again.&amp;nbsp;&lt;/p&gt;
[quote user=""]Can I rely on the various constants defined in ble_app_proximity? especially DIODE_FWD_VOLT_DROP_MILLIVOLTS&amp;nbsp; 270[/quote]
&lt;p&gt;These are given as a reference only, these values should be adapted to your application needs. For example look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2685/unaccurate-battery-level-measurment-on-beacon-device"&gt;this &lt;/a&gt;thread&lt;/p&gt;
[quote user=""]Any other tips?[/quote]
&lt;p&gt;&amp;nbsp;All your concerns and questions are well discussed in this forum, I would recommend you to search the forum a bit to find the answers. We at Nordic take great effort to encourage the forum members to discuss things clearly, so that others like you can be benefited with that information. But to find that information, you need to put some effort to search the forum. If you have already done that, It might be tedious if you are a beginner in this forum, but trust me, there is a lot of information you can pull out once you get used to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>