<?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>Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94068/send-battery-level-notifications-to-nrf-connect-app-when-battery-level-reaches-certain-level</link><description>Hello, I am new to BLE and I need help with Battery Service notifications. I am using nrf52840dk, nrf sdk 17.1.0 and I am using ble_app_proximity example which already uses Battery Service. I need to send a pop up notification from device to nRF Connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Nov 2022 09:45:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94068/send-battery-level-notifications-to-nrf-connect-app-when-battery-level-reaches-certain-level" /><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396593?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:45:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b17531b-c71f-410b-bfad-a1b42e3af9be</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;No problem at all, Kanthi Deep - I am happy to help! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if you should have any follow-up questions, or open another ticket if the subject diverges from the original issue in this ticket.&lt;br /&gt;&lt;br /&gt;Good luck with your development! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396589?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:33:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e2ca216-f112-4e8f-a89e-90ba9f10d008</guid><dc:creator>Kanthi Deep</dc:creator><description>&lt;p&gt;Okay Karl, I will try what you have mentioned.&lt;br /&gt;Thank you so much for your help&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f647.svg" title="Bow"&gt;&amp;#x1f647;&lt;/span&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f647.svg" title="Bow"&gt;&amp;#x1f647;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;K.Kanthi Deep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396587?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:28:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18df578-79f6-40b9-8053-8500299502dc</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Kanthi Deep"]Oh ok, so it is not possible for nRF Connect.[/quote]
&lt;p&gt;Unfortunately not, no.&lt;/p&gt;
[quote user="Kanthi Deep"]Sorry to keep bothering you but suppose I have new smartphone application which has that ability then what changes should I make in the ble_app_proximity code so that my condition is met?[/quote]
&lt;p&gt;No need to apologize! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In this case you should not have to make any changes to the ble_app_proximity application - it will keep sending its BAS notification after each sampling.&lt;br /&gt;However, for a real life application I would recommend that you modify the sampling interval for the time before you hit 40%, since you are not really interested in this section it seems. Reducing the unnecessary samplings will reduce your overall current consumption.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396586?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:24:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dde8c45f-f65b-4bdb-b37a-df850396f6ea</guid><dc:creator>Kanthi Deep</dc:creator><description>&lt;p&gt;Oh ok, so it is not possible for nRF Connect.&lt;br /&gt;&lt;br /&gt;Sorry to keep bothering you but suppose I have new smartphone application which has that ability then what changes should I make in the ble_app_proximity code so that my condition is met?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanthi Deep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396585?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1df51845-15f4-4b95-876d-d2facaa6082e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;I do not think so, unfortunately.&lt;br /&gt;However, if you were to create your own smartphone application you could easily add this as a feature based on the received BAS notification.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396581?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:17:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f10d070c-e45b-4a20-a36c-5879b20d775c</guid><dc:creator>Kanthi Deep</dc:creator><description>&lt;p&gt;Oh okay, but what about a pop up notification in the nRF Connect app itself. Is it possible? Like a small pop up box telling Battery is at 40%, please charge.&lt;br /&gt;The documentation on the nRF Connect app said that notifications are possible. Is there no way to add in code so that a notification will be displayed?&lt;br /&gt;Thanks,&lt;br /&gt;Kanthi Deep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396580?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef0983a1-85f2-4592-a314-5a7c30f8fb78</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Kanthi Deep"]Thank you for replying so fast.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="Kanthi Deep"]I have a doubt about the function that you mentioned ble_bas_battery_level_update I thought it will just update the battery level in the app, but I need a pop up notification on the screen when the battery level is 40% like the one you receive on your phone when it is 20%.[/quote]
&lt;p&gt;Oh, would you like to change the behavior of the smartphone application, not the peripheral device?&lt;br /&gt;There is unfortunately no way to add a popup notification / main screen notification for a specific characteristic value in the nRF Connect for smartphone application, to my knowledge.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396578?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 09:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18db5e67-ea7e-4358-acd7-88b53fe7e4ad</guid><dc:creator>Kanthi Deep</dc:creator><description>&lt;p&gt;Hello Karl,&lt;br /&gt;Thank you for replying so fast.&lt;br /&gt;I have a doubt about the function that you mentioned ble_bas_battery_level_update I thought it will just update the battery level in the app, but I need a pop up notification on the screen when the battery level is 40% like the one you receive on your phone when it is 20%.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanthi Deep.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send Battery Level notifications to nRF Connect app when battery level reaches certain level</title><link>https://devzone.nordicsemi.com/thread/396564?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 08:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4d643aa-4978-402b-b5c7-4cb9a5488ac7</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Kanthi Deep,&lt;/p&gt;
[quote user=""]Can anyone please help me with this?[/quote]
&lt;p&gt;Absolutely, you&amp;#39;ve come to the right place! :)&amp;nbsp;&lt;/p&gt;
[quote user=""]I am new to BLE and I need help with Battery Service notifications. I am using nrf52840dk, nrf sdk 17.1.0 and I am using&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fble_sdk_app_proximity.html"&gt;ble_app_proximity&lt;/a&gt; example which already uses Battery Service.&lt;br /&gt;I need to send a pop up notification from device to nRF Connect mobile app when battery level reaches 40%. Whenever battery level reaches 40%, a notification should pop up telling us that battery level has reached 40% please charge.[/quote]
&lt;p&gt;In the default ble_app_proximity application the battery notification will be sent as part of the handling for the&amp;nbsp;NRF_DRV_SAADC_EVT_DONE event, through the call to ble_bas_battery_level_update. If you would only like it to update when it is 40% or lower you will need to implement a check or conditional here that verifies that the condition is met before the notification is sent.&lt;br /&gt;You could probably also reduce the sampling rate to be much more seldom before you are at &amp;lt; 40% for the first time, to conserve power, for instance.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>