<?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>pca10059 - Read battery level from BLE Event (Beacon Advertise)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59199/pca10059---read-battery-level-from-ble-event-beacon-advertise</link><description>Hello, 
 
 Im using pca10059 to scan for near beacons address and RSSI, but i also want to look for its battery level. (im using pca10056 to develop and debug) 
 I&amp;#39;ve found some posts here talking about checking its own battery, as a peripheral. But in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Mar 2020 08:00:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59199/pca10059---read-battery-level-from-ble-event-beacon-advertise" /><item><title>RE: pca10059 - Read battery level from BLE Event (Beacon Advertise)</title><link>https://devzone.nordicsemi.com/thread/240342?ContentTypeID=1</link><pubDate>Wed, 18 Mar 2020 08:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ce83566-1ac5-4aee-801f-84a40601cabf</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, this should be possible. You can add the battery level to the advertising data, and update the advertising data on each SAADC callback. Seeing as you already have quite a bit of data in your advertisement, you might have to add the battery service data in a scan response packet, as the advertising packet can only contain 31 bytes of data.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2023/advertising-battery-levels-on-a-beacon/8688#8688"&gt;This (rather old) example&lt;/a&gt; already does this. It uses an app_timer to trigger a periodic timeout where it uses the ADC to measure the battery level and update the advertising data with the new battery values. You can use that as a guide.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>