Active Topics

 



Notices


Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 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:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2
I've updated description and added a picture.

/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!
 

The Following 6 Users Say Thank You to Estel For This Useful Post:
Posts: 112 | Thanked: 92 times | Joined on Nov 2010
#3
Being a fan of your bat capacity guide + script, i always thought why didnt you build something like this earlier to make it more mass-market friendly so most others could benifit from it. good work estel

/nkirk.
 

The Following 3 Users Say Thank You to nkirk For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#4
Another release so soon Estel? Get in my son!
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 3 Users Say Thank You to vi_ For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#5
@Estel,

Thanks for the script. I've tried it, and I get:
SoC: 70%
Charge: 1384 mAh
Full Charge: 1969 mAh

My battery is however the stock one, so the full charge is about 1300mAh (1269 according to battery-eye) and current charge should be around 584mAh (again, according to battery-eye).

BatteryGraph "confirms" that the charge is 584mAh (46%).

Note that bnf says, in my case, that "Calibration needed: 1" (and VDQ: 0, no idea what that is).

I know that the whole battery-thing is a mess, and I guess I do need to calibrate the battery measurements, but I just wanted to indicate my results in case you might want to add a warning on the first post..

Add.: I just read through http://talk.maemo.org/showpost.php?p...&postcount=846 again (it's an amazing read , so I'll give that a shot and see if I can calibrate the measurement

Last edited by reinob; 2012-05-24 at 11:35. Reason: Link to post about calibration and much more, from Estel.
 

The Following User Says Thank You to reinob For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#6
@nkirk

Thanks - it wasn't released earlier, because I've lacked skills to put it into repos properly

@vi_
Fortunately, releasing this one was a no-brainer, after ereswap that took ~20 hours of constant effort (*after* having main reswapping part ready) to write missing parts and upload this bugger to repos

I also have something "in-middle" to release - thing less complicated than ereswap, but requiring some actual work (unlike bnf) before release - so expect 3th one soon, but it will be targeted at absolutely niche "market" (users of optical disc drives via hostmode).

/Estel

// Edit

@reinob
Thansk a lot for trying it I see You've already went through calibration guide, so you probably know already what VDQ is (Valid discharge quality). Just don't worry if You won't get accurate result after first calibration - drop from 1900 to 1200-something will, probably, require few calibration "steps".

also, keep in mind, that both batteryeye and batterygraph doesn't give "real" results - even if You would have 3000 mAh battery, it would say about "Stock" capacity - it's taking data from same source as BME, so capacity is "red" from resistor value between BMI (3th battery pin) and mass - whatever manufacturer put there, "code" the readings - and State of Charge is calculated via voltage.

After proper calibration, bnf will should you absolutely 100% accurate State of Charge - percentage shown is CSOC (Compensated State of Charge), so it even take into account current temperature of battery (which affects capacity).

/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; 2012-05-24 at 11:43.
 

The Following 5 Users Say Thank You to Estel For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#7
Thought I'd mention something I found after installing (or not) bnf.
Downloaded via HAM, accidently tapped the fuzzy area on ic2tool execption warning.
bnf "failed to install".
On checking HAM again it wasn't in the repo's.

Turn's out it's installed without ic2tools and when run the desktop goes blank and CPU hits 100%. Only way to stop it is pressing power key.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 87 | Thanked: 46 times | Joined on Nov 2010 @ lisbon, portugal
#8
Name:  screenshot02.jpg
Views: 5535
Size:  22.8 KB

niceeeee.... I guess it needs calibration
 

The Following User Says Thank You to trlopes1974 For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#9
Well, "Calibration needed: 1" means something

BTW, even having "Calibration needed: 0" doesn't mean You don't need calibration, if You've changed battery recently or so. N900's hardware doesn't have any way to fingerprint battery, so if You switch from standard BL-5J to, lets say, dual-scud, You still need to calibrate before seeing Your 3000 mAh.

Generally, "Calibration needed" is derived form amount of cycles since last calibration. If chip was reset, calibration is "never" so induct "Calibration needed".

/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!
 

The Following 3 Users Say Thank You to Estel For This Useful Post:
Posts: 176 | Thanked: 110 times | Joined on Jul 2010
#10
Love the app! not sure if others would be interested, but is their a possibilty of having a widget displaying all the info?
 

The Following 3 Users Say Thank You to Jigzy For This Useful Post:
Reply

Tags
battery, bnf script, bq27200, bq27x00, charging

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:16.