<?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>nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107876/npm1100-and-bas</link><description>Hello, 
 I am creating a battery service for our project and am using the nPM100 with the nRF52832. We have a custom board and would like some help getting the battery level sent over BT. 
 Currently I was creating a discharge curve for the battery, but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Feb 2024 09:19:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107876/npm1100-and-bas" /><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/470645?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 09:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2a857d3-a290-4031-8d68-992869ad0c29</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Jared,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;bt_bas_set_battery_level() function is used for updated battery level. You have to scale your battery to the correct range while calling this function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Valid range for bluetooth battery service is 0-100, so the function reports failure if you set a higher value:&lt;/p&gt;
&lt;p&gt;&lt;a title="https://www.bluetooth.com/specifications/bas-1-1/" href="https://www.bluetooth.com/specifications/bas-1-1/" rel="noopener noreferrer" target="_blank"&gt;Battery Service | Bluetooth&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/00ae.svg" title="Registered"&gt;&amp;#x00ae;&lt;/span&gt; Technology Website&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/470626?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 08:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4479810-754f-4e1e-8e76-c59b3ef5803c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello jared,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I am looking into the case. I will reply to you soon.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/468107?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2024 15:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b43f032-5e2f-42e4-bfcc-700646a969bb</guid><dc:creator>jbeh444</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;/p&gt;
&lt;p&gt;I hope your sick child gets better soon!&lt;/p&gt;
&lt;p&gt;Sorry to be confusing with the BAS return 22. It&amp;#39;s from the bas.c file. See the code snippet below. I&amp;#39;m just trying to understand the code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define	EINVAL 22	/* Invalid argument */

int bt_bas_set_battery_level(uint8_t level)
{
	int rc;

	if (level &amp;gt; 100U) {
		return -EINVAL;
	}

	battery_level = level;

	rc = bt_gatt_notify(NULL, &amp;amp;bas.attrs[1], &amp;amp;level, sizeof(level));

	return rc == -ENOTCONN ? 0 : rc;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/468078?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2024 13:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba4c2ec0-10c3-40bf-97da-3a649d07eafa</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Jared,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I am out of office with sick child.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have one question to ask you:&lt;/p&gt;
&lt;p&gt;1. What do you mean by &amp;#39;&amp;#39;BAS return 22&amp;#39;&amp;#39; ? Could you please post some console output from your program?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/467771?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 14:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26d266a-1891-43a5-bbdb-72c48523e36e</guid><dc:creator>jbeh444</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t heard anything from you yet.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nPM1100 and BAS</title><link>https://devzone.nordicsemi.com/thread/466813?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 16:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12898508-b54f-4011-bb39-8ff38154a1ec</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Jared,&lt;/p&gt;
&lt;p&gt;I have taken your case. I will get back to you tomorrow.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>