# ABKey01 battery level advertisement

**URL:** <https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442>\
**Category:** AprilBeacon\
**Created:** [March 2, 2019, 5:46am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442 "2019-03-02T05:46:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![john-arvid](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@john-arvid](https://bbs.aprbrother.com/u/john-arvid)\
**Post date:** [March 2, 2019, 5:46am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/1 "2019-03-02T05:46:42Z")

</div>

Hello,

I am trying to get the battery level to be sent with the advertisement package from the ABKey01.  
I see that Eddystone-TLM supports this by default, but the ABKey01 only support iBeacon, Eddystone-UID, Eddystone-URL and Line Beacon.

I know that if I connect to the ABKey01 I can get the battery level, but that will be a little problematic since I only want to see the advertising packages.

Is there a new firmware for the ABKey01 that supports Eddystone-TLM?  
Or do I have to modify the firmware myself so it can adverisen the battery level?  
If so, how to I “easily” create a new firmware for these?

(I found a alternative cheap product that uses Eddystone-TLM, the Minew C6, but I wanted to use the ABKey01 as long as there is a solution)

Thanks  
John

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [March 4, 2019, 7:21am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/2 "2019-03-04T07:21:35Z")

</div>

Hi john,

ABKey01 advertises eddystone-TLM packet between about 15 other packet. It works for all advertising mode. You should filter out the TLM packet and parse it

---

<div class="post-metadata">

**Author:** ![john-arvid](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@john-arvid](https://bbs.aprbrother.com/u/john-arvid)\
**Post date:** [March 4, 2019, 6:16pm UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/3 "2019-03-04T18:16:40Z")

</div>

Hi April,

Thank you for your reply.  
I modified the scanner a bit and focused only on TLM packets. Now I found them. Thank you very much for the information.

This is what I have figured out up to now.

key nr1:

[20][0][9][F6][0][0][0][55][3F][7D][0][0][0][0]  
Combine and convert byte 3 and 4 to decimal and divide by 100, since the specification says Battery voltage in 1 mV per bit. Ref: [https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-plain.md#field-notes](https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-plain.md#field-notes)  
09f6 -\> decimal = 2550 / 100 = 2,55 = 85% (got that percentage number from the app)

key nr2:

[20][0][B][4][0][0][0][7C][BA][83][0][0][0][0]  
Combine and convert byte 3 and 4 to decimal and divide by 100, since the specification says Battery voltage in 1 mV per bit.  
0b04 -\> decimal = 2820 / 100 = 2,82 = 94% (got that percentage number from the app)

270 mv = 9% difference  
so 30mv pr 1%

But I doubt the ABKey01 will run on 30mv, so I checked the datasheet for the dialog14580. Ref: [https://support.dialog-semiconductor.com/downloads/DA14580\_DS\_v3.1.pdf](https://support.dialog-semiconductor.com/downloads/DA14580_DS_v3.1.pdf)

So my next question is:  
Are the ABKey01 running in a boost converter application or buck-converter application?

I hope it is using boost converter, since it would then allow a battery voltage of minimum 0.9V and not just 2.35V

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [March 5, 2019, 1:59am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/4 "2019-03-05T01:59:31Z")

</div>

BUCK mode is for 3V battery and BOOST mode is for AA battery (1.5V). ABKey01 uses BUCK mode.

Please also check our latest [ABSensor N01](https://blog.aprbrother.com/product/nrf52810-absensor-n01), it’s based on nRF52810 and support 1.7V ~ 3.6V. It’s also same shape with ABKey01.

---

<div class="post-metadata">

**Author:** ![john-arvid](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@john-arvid](https://bbs.aprbrother.com/u/john-arvid)\
**Post date:** [March 5, 2019, 7:06am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/5 "2019-03-05T07:06:17Z")

</div>

Ok, so just to confirm. The ABKey01 will stop working at 78%? (2.35V)  
If not how low will it go?

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [March 5, 2019, 8:33am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/6 "2019-03-05T08:33:58Z")

</div>

It remaps battery percent from 2.2V (0%) to 3V (100%)

---

<div class="post-metadata">

**Author:** ![john-arvid](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@john-arvid](https://bbs.aprbrother.com/u/john-arvid)\
**Post date:** [March 5, 2019, 9:45am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/7 "2019-03-05T09:45:32Z")

</div>

But that does not look correct.

If you see on what I wrote about the voltage and percentage.  
From nr1 I get 2.55V from the TLM and 85% from the iphone app.  
And nr2 gives 2.82V from the TLM and 94% from the iphone app.  
Which remaps to 30mv pr %

So if what you say is correct it should be 8mv pr %.  
And then I should get around 44% instead of 85% on nr1, and around 78% instead of 94% on nr2.  
Maybe there is a bug in the AprilBeacon app?

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [March 5, 2019, 10:02am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/8 "2019-03-05T10:02:53Z")

</div>

It’s not calculated with linear percent. a little complex

---

<div class="post-metadata">

**Author:** ![john-arvid](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@john-arvid](https://bbs.aprbrother.com/u/john-arvid)\
**Post date:** [March 5, 2019, 10:05am UTC](https://bbs.aprbrother.com/t/abkey01-battery-level-advertisement/1442/9 "2019-03-05T10:05:09Z")

</div>

Ok, for non-linear I don’t have enough data.

I will come back in 6 months or so.

Thanks for your replies
