<?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 outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19602/battery-service-outputs-100-no-matter-what</link><description>Hi DevZone 
 I am trying to measure the battery voltage using the bas service. I got some hints from the ble_app_proximity example. 
 My problem is that no matter what the output is 100% (And yes it is tested on a CR2032 with 2.8V, so it should be more</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Feb 2017 08:20:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19602/battery-service-outputs-100-no-matter-what" /><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76274?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 08:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34543bc5-bd59-4e90-a970-cb175f337d31</guid><dc:creator>Mathias Vandel</dc:creator><description>&lt;p&gt;Well, that works now! Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76273?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 08:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5d50ba8-bfaa-4924-9abd-67f5f0da047a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Press this button:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://image.ibb.co/jsZ3Fa/bilde123.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76272?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 07:12:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc0c6562-03cd-4f7f-93d3-86a11f3bd700</guid><dc:creator>Mathias Vandel</dc:creator><description>&lt;p&gt;I see my phone does say that notifications and indications is disabled. But where do i enable it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76277?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 07:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:198c2104-6732-40e2-8461-a17ed05d9e9a</guid><dc:creator>Mathias Vandel</dc:creator><description>&lt;p&gt;Sorry, but i am a little confused over the notification thing. Where should i enable notifications? Is it in my bas_init?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    static void bas_init(void)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;{
uint32_t       err_code;
ble_bas_init_t bas_init_obj;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;memset(&amp;amp;bas_init_obj, 0, sizeof(bas_init_obj));

bas_init_obj.evt_handler          = on_bas_evt;
bas_init_obj.support_notification = true;
bas_init_obj.p_report_ref         = NULL;
bas_init_obj.initial_batt_level   = 100;

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;bas_init_obj.battery_level_char_attr_md.cccd_write_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;bas_init_obj.battery_level_char_attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;bas_init_obj.battery_level_char_attr_md.write_perm);

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;bas_init_obj.battery_level_report_read_perm);

err_code = ble_bas_init(&amp;amp;m_bas, &amp;amp;bas_init_obj);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76271?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 16:07:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3d0dc53-e832-4569-a514-481b531caec2</guid><dc:creator>Mathias Vandel</dc:creator><description>&lt;p&gt;Thanks! I will look into that tomorrow :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76276?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 15:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a1607c-1377-4927-a9da-f43caca17e2e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Make sure that notification is enabled, the saadc_event_handler isn&amp;#39;t called before notification is enabled from your phone:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://preview.ibb.co/daYS8v/pic123.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76270?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 15:08:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20f03798-c1fd-4d90-9aee-f60ce32334fb</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Well that should be your first thing to check - are you getting reasonable readings from the ADC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76269?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 15:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6e66787-67fd-4e49-b365-cdd300f2bb4d</guid><dc:creator>Mathias Vandel</dc:creator><description>&lt;p&gt;Nothing. It doesn&amp;#39;t output anything in RTT viewer..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76268?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 14:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2113cbb5-4167-406b-8cfa-34066d80dcef</guid><dc:creator>awneil</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;SEGGER_RTT_printf(0, &amp;quot;adc_result: %d\n&amp;quot;, adc_result);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So what does this tell you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Battery service outputs 100% no matter what</title><link>https://devzone.nordicsemi.com/thread/76275?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 14:58:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cf23e55-c558-4cb9-af49-5bf2de60603f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/question/61566/why-proximity-example-shows-always-100-battery/?answer=61707#post-id-61707"&gt;this answer&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>