View Single Post
Estel's Avatar
Posts: 5,029 | Thanked: 8,597 times | Joined on Mar 2011
#1
Current version: 1.2
---

bnf 1.2 was uploaded to extras-devel. It is minor release, incorporating changes from tar-only 1.1 into repos version (tar link removed from attachment) + small fix for sudo. Changelog:
  • Fixed typo in sudoers file (bnf.sh was present, instead of bnf)
  • Back in the repos, ad they're working again
---

bnf 1.1 was just released. Repositories and autobuilder are not working reliably ATM, so extras-* release will arrive if when it's ever fixed. For now, update from 1.0 is available as attachment to this post. To install, just untar it to /usr/sbin (overwriting old file).Changelog:
  • Uses either bq27x00_battery module, or i2cget method, transparently deciding which one is applicable.
  • New value - "Average Time Remaining", which shows remaining time, calculated from averaged power usage since last complete charging.
  • Minor code cleanup + more things commented for easy code understanding, even for sh beginners.
---

bnf 1.0 was just uploaded to extras-devel. Changelog:
  • Initial release.

bnf is minimalistic, simple tool that display most important informations about battery and charging chip status (gathered via bq27x00_battery module, or i2cget), as notification pop-up message. It process values that need calculating and display them in human-readable format, detect state (charging via USB, wall charger, or discharging) and formatting visible info accordingly.

It's main advantage is, that it displays info from last 5 seconds without influencing output by itself - it's even possible to measure such small things as 3 mA total power usage in echo > sys/power/mem state (via calling it as first thing upon wakeup).

bnf can be called via desktop icon (provided by package), terminal:
Code:
sudo bnf
...or things like shortcutd. Last one is extremely useful, as with bnf, it allows to check power usage, while inside full-screen programs (bnf can be called via camera button half-press), without connecting via ssh or running anything in background.

bnf works out-of-the box, and doesn't require any configuration.



bnf is licensed under terms of GPL (latest revision). It is provided as-is, without any warranty whatsoever.
---

Credits:

Thanks to shadowjk for method of gathering data via i2cget. I wouldn't be even close to starting it without Your state-of-art bq27200.sh script.
Thanks to merlin1991 and X-Fade, for teaching me about debhelper requirements.
---

FAQ:
---

Q: Nice tool, but I would like it to also display <xyz>...
A: Open /usr/sbin/bnf with any text editor of Your choice and modify it - it's quite easy, in fact, everything is documented to (almost) single command, so adjusting it to own needs should be trivial. This makes bnf great tool for learning few basic things about shell scripting for N900.

Q: How to calibrate battery measurements?
A: See:
http://talk.maemo.org/showpost.php?p...&postcount=846
Instructions are long, but process itself is very straightforward, at least, when You get used to it. I've written it as verbosely as I can, to allow everyone understand what is happening - otherwise, it would be 3-4 liner.
---

First post will be updated when appropriate (with notes left as post, inside this thread).

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2013-03-19 at 15:18.
 

The Following 42 Users Say Thank You to Estel For This Useful Post: