<?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>Testing the Battery Service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38110/testing-the-battery-service</link><description>Dear Sir, 
 
 I am using SDK15 and sodtdevice S132. I am testing on the kit BMD300. 
 I am using nRFConnect App in andoird to connect to the device and check the services. 
 How can I test the battery service to check whether it is giving the correct</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Sep 2018 08:12:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38110/testing-the-battery-service" /><item><title>RE: Testing the Battery Service</title><link>https://devzone.nordicsemi.com/thread/147108?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 08:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c4903d9-adc9-486a-b802-423e6f0ee21d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, for a real device you want to use the ADC to get the battery voltage. The difference between using the ADC and the simulator, is how they input values to the battery service. The simulator will just simulate and create &amp;ldquo;fake&amp;rdquo; values. But using the ADC you will get real voltage values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Testing the Battery Service</title><link>https://devzone.nordicsemi.com/thread/147104?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 07:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f286b017-8750-4db9-82b6-bf2224eb79a2</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi, Thank you for the reply.&lt;/p&gt;
&lt;p&gt;So if I want to build a BLE device on my own and if I want to use the battery service to get battery status, am I supposed to use the service which works with adc?&lt;/p&gt;
&lt;p&gt;Or both ways(one with adc as well as the one with simulator) will give the correct answer?&lt;/p&gt;
&lt;p&gt;Because in both cases I am getting different values?(I was expecting both of them&amp;nbsp;to display the same value for battery status)&lt;/p&gt;
&lt;p&gt;I am confused which one to use in my code base..&lt;/p&gt;
&lt;p&gt;Please shed some light on this.&lt;/p&gt;
&lt;p&gt;Thanking you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Testing the Battery Service</title><link>https://devzone.nordicsemi.com/thread/147097?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 07:28:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119aacff-956f-4428-b930-c30c1c2cf76b</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="73671" url="~/f/nordic-q-a/38110/testing-the-battery-service/147083"]I think the battery service implemented here is not using adc.. Is this work correctly?[/quote]
&lt;p&gt;That is correct. In&amp;nbsp;&lt;span&gt;ble_app_bps we are using the simulator.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="73671" url="~/f/nordic-q-a/38110/testing-the-battery-service/147083"]Do we need any external module/connection for this?[/quote]
&lt;p&gt;The ADC can measure VDD directly. So if you are powering the chip&amp;nbsp;directly from battery, you don&amp;#39;t need any external module.&lt;/p&gt;
[quote userid="73671" url="~/f/nordic-q-a/38110/testing-the-battery-service/147083"]After&amp;nbsp; connecting to the device , each time I press the &amp;#39;down arrow&amp;#39; in battery service, it is giving different values?[/quote]
&lt;p&gt;The simulator values will vary between&amp;nbsp;MIN_BATTERY_LEVEL and&amp;nbsp;MAX_BATTERY_LEVEL. So if you are testing&amp;nbsp;ble_app_bps, this is the&amp;nbsp;expected&amp;nbsp;behavior.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Testing the Battery Service</title><link>https://devzone.nordicsemi.com/thread/147083?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 06:34:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fcd3603-0775-4ad6-8a89-0537f8606042</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi Sigurd, I was using the Battery service in &amp;quot;\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_bps&amp;quot;.&lt;/p&gt;
&lt;p&gt;I think the battery service implemented here is not using adc.. Is this work correctly?.Do we need any external module/connection for this?...&lt;/p&gt;
&lt;p&gt;After&amp;nbsp; connecting to the device , each time I press the &amp;#39;down arrow&amp;#39; in battery service, it is giving different values?&lt;/p&gt;
&lt;p&gt;Please&amp;nbsp; let me know if I went wrong somewhere?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Testing the Battery Service</title><link>https://devzone.nordicsemi.com/thread/146896?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 07:47:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24cf80ef-82c1-4c54-b756-d8f57fa57a2a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;There are 2 ways to test the battery service.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;1)&lt;/strong&gt; ADC: Use the ADC to do real battery measurements. You can test this with the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.1.0/ble_sdk_app_proximity.html?cp=4_0_0_4_1_2_21"&gt;ble_app_proximity example&lt;/a&gt;.&amp;nbsp;&lt;span&gt;The example uses the ADC peripheral to measure the battery level every 2 minutes. If there is a change in the battery level, the application sends the current level as notification. You should test this with a&amp;nbsp;CR2032 battery.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;2)&lt;/strong&gt; Simulator: Use a simulator to provide the battery measurements. You can test this with the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.1.0/ble_sdk_app_hts.html?cp=4_0_0_4_1_2_12"&gt;ble_app_hts example&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>