PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Android On TP2 Development (http://forum.ppcgeeks.com/forumdisplay.php?f=319)
-   -   [TESTING] SCBS: Improved battery meter system (http://forum.ppcgeeks.com/showthread.php?t=142555)

jonpry 04-12-2011 08:26 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Ndno,

I forgot to mention that logs created with 0.3.d are not usable with 0.4.a. I was able to run an analysis on the logs your provided. I have an ubuntu binary of scbs that runs in just a few seconds. I'm getting strange numbers for se. just using scbs.log.2 it is negative. including .4 gives .008 which is possible.

ndno 04-12-2011 08:57 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2084053)
Ndno,

I forgot to mention that logs created with 0.3.d are not usable with 0.4.a. I was able to run an analysis on the logs your provided. I have an ubuntu binary of scbs that runs in just a few seconds. I'm getting strange numbers for se. just using scbs.log.2 it is negative. including .4 gives .008 which is possible.

OK, I'll delete my old logs and run again to get a new sample for the analysis. Should I delete my current settings (by deleting scbs.conf)?

BTW in the log files I posted, scbs.log.2 was the latest (starting from Monday morning to early Tuesday morning); I believe scbs.log.4 was from late Sunday night to Monday morning.

jonpry 04-12-2011 11:25 PM

Re: [TESTING] SCBS: Improved battery meter system
 
You don't have to delete the old logs, just don't select them when running an analysis. Deleting your scbs.conf is probably not necessary either. However the existing conf is used as a starting place for the solution. It's possible to get different running times and results based on the contents of that file, but in practice the difference is pretty small. If it absolutely won't converge or something i guess deleting it is a good idea.

Here is the conf i generated from the 3 files you posted:

cc=4.065186531
cb=161.774149053
rc=0.611959660
re=0.141321335
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=-32.243861234
se=0.008442857

ndno 04-12-2011 11:30 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2084119)
You don't have to delete the old logs, just don't select them when running an analysis. Deleting your scbs.conf is probably not necessary either. However the existing conf is used as a starting place for the solution. It's possible to get different running times and results based on the contents of that file, but in practice the difference is pretty small. If it absolutely won't converge or something i guess deleting it is a good idea.

Here is the conf i generated from the 3 files you posted:

cc=4.065186531
cb=161.774149053
rc=0.611959660
re=0.141321335
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=-32.243861234
se=0.008442857

Thanks. I'll keep the current .conf file and make note of which sbcs.log(s) that I start with. I'll post my results tomorrow night.

steveholtam 04-13-2011 06:15 PM

Re: [TESTING] SCBS: Improved battery meter system
 
1 Attachment(s)
Sorry for the slow reply on my testing. Here is my first test:

cc=0.451819334
cb=91.461110830
rc=0.482023780
re=0.209051753
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=23.775654705
se=0.318998355

Should I use this? Does this look about right for one full cycle?

I've attached the file in case you want to view it.

jonpry 04-13-2011 09:06 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Steveholtam,

Your Se parameter is way out of line. From looking at your log i see that the phone was never sleeping. It will take at least a few hours of sleep data to create Se, (sleep error).

ndno 04-13-2011 09:22 PM

Re: [TESTING] SCBS: Improved battery meter system
 
1 Attachment(s)
Jon,

Got a new set of 0.4.a logs for you; I started the log yesterday (keeping my old sbcs.conf settings I got from version 0.3.d). Here are the analysis results:


cc=0.172781556
cb=109.461356370
rc=0.699108815
re=0.135708305
vf=1.103000000
cf=0.312500000
lr=0.000001000
sl=19.745881232
se=0.049452680


Attached are the logs.

steveholtam 04-14-2011 12:31 PM

Re: [TESTING] SCBS: Improved battery meter system
 
1 Attachment(s)
Ok, here is the latest:

cc=0.271449729
cb=93.847733930
rc=0.494704470
re=0.198933553
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=9.658709027
se=0.158811608

Attached is the raw data. Also, I used the most current log (the one that keeps building) for the above numbers. THANKS!!!!

arrrghhh 04-14-2011 12:52 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by steveholtam (Post 2084861)
Ok, here is the latest:

cc=0.271449729
cb=93.847733930
rc=0.494704470
re=0.198933553
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=9.658709027
se=0.158811608

Attached is the raw data. Also, I used the most current log (the one that keeps building) for the above numbers. THANKS!!!!

I'm no expert on this, but your se still appears to be over 15% - jonpry's looks like it's half that. Maybe it's not a big deal, but how much sleep time did you have generating this log? Seems the more the better...

steveholtam 04-14-2011 01:26 PM

Re: [TESTING] SCBS: Improved battery meter system
 
The phone was on the charger and unused all night, about 9 hours. Do incoming texts/alerts/emails interrupt the sleep cycle?

arrrghhh 04-14-2011 03:16 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by steveholtam (Post 2084888)
The phone was on the charger and unused all night, about 9 hours. Do incoming texts/alerts/emails interrupt the sleep cycle?

Yes, anything the phone has to wake up for interrupts sleep. Also, if it was on the charger it wasn't sleeping (phone can't sleep & charge...)

steveholtam 04-14-2011 07:55 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Well my phone is constantly receiving texts (from Twitter), emails, WordFeud updates, etc. So maybe my sleeping time will be far and few between. Will the SCBS compute for this?

Here is my latest:

cc=0.386893785
cb=111.315805545
rc=0.711410240
re=0.157943773
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=4.600294081
se=0.116924412

It's just over four hours of data. Can I or should I merge all my logs into one to get a better overall result? I wish I knew what the above numbers mean...

arrrghhh 04-15-2011 09:14 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by steveholtam (Post 2085104)
Well my phone is constantly receiving texts (from Twitter), emails, WordFeud updates, etc. So maybe my sleeping time will be far and few between. Will the SCBS compute for this?

Here is my latest:

cc=0.386893785
cb=111.315805545
rc=0.711410240
re=0.157943773
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=4.600294081
se=0.116924412

It's just over four hours of data. Can I or should I merge all my logs into one to get a better overall result? I wish I knew what the above numbers mean...

jonpry would need to explain them all... I vaguely know what some of the metrics are.

se we know is sleep error. Perhaps you need to get a baseline with a new data.img so your phone can actually sleep? I guess if your phone is never sleeping, then it's not a big deal... Not sure how that works to be honest. Your sleep error looks better at least, 11.6%. I'm not really sure how scbs accounts for devices that never sleep... I would think sleep error would always be skewed, but if the device rarely sleeps perhaps that point is moot. Again, jonpry would be the man to confirm ;).

jonpry 04-15-2011 11:00 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Steveholtam,

I am not sure why but your phone is still not sleeping. You probably want to fix this as your battery life will get at least 5x better. You should be seeing the power led go to solid green about 5 seconds after any activity. Some kind of application your running may be breaking it. Do you have pm.sleep_mode=1 in the STARTUP.txt?

Sleep error is in amperes. So .116 is 116mA. Number should be less than 10ma or so. High Se can result in very bad things if your phone does all of a sudden start sleeping. Ie battery charging when not plugged in.

Re, Rc are ohms representing impedance of the battery. 2 numbers because we model it as 2 batteries in parallel.

Cc, Cb are capacitance in not real units.

Vf corrects for incorrect reporting of battery voltage
Cf corrects for incorrect reporting of charge current

arrrghhh 04-15-2011 11:02 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Ah, thanks for the explanation jonpry. Makes much more sense now :thumbright:

fishingmedic 04-15-2011 11:48 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Jonpry, how would charging your phone overnight impact the testing? Would it be better to leave it off the charger when I'm streaming music, i.e. sirius radio, which drains like mad, so I typically leave it just plugged in when listening, which can be the better part of a work day?

steveholtam 04-15-2011 12:57 PM

Re: [TESTING] SCBS: Improved battery meter system
 
My phone does go solid green after about 5 seconds. I do have the pm.sleep_mode=1 in my startup.

I don't get horribile battery life though, normally about 9-10 hours under pretty heavy use. This includes lots of texting, mostly incoming thanks to Twitter, reading on the Kindle app, playing WordFeud and X-Construct, and then the Yahoo app pushing my emails. Plus even a few phone calls.

Here is another 15 hour look at my data:
cc=0.2127
cb=100.8226
rc=0.6799
re=0.1937
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=4.8677
se=0.1306

Just for info sake, my Battery Info indicates Good, at 61 mV and a temp of 32.7c.

Usage Stats show (for the last 15 hrs):
Ba tree app 2 1531150 ms
Handcent SMS 6 1478750 ms
Wordfeud 8 1252630 ms
Zeam 22 450520

Other Usage (for the last 15 hrs):
Running 50.8%
Screen On 33.1%
Phone On 3.4%

CPU Usage (for the last 15 hrs):
scbc
Android OS
Handscent
mmcqd
suspend
Words Free
Ba tree app

jonpry 04-15-2011 02:24 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Steveholtam,

Its hard to see the effect of sleep if your using it a lot. But on my phone, I can get 20hours max with no sleep, and 70 hours with. I do not charge every day. If you don't care about sleep, then arrrghhh is right and scbs will work fine the way it is, just ignore your Se parameter. I'm not really sure why your phone wouldn't be sleeping at this point, other people are probably more skilled than I am at finding wakelocks and such.


Fishingmedic,

Leaving it plugged in all the time is not really a problem. Just if your generating a model for your battery, you will need to spend some considerable time on the battery. Once the model is generated, it does not matter.

ndno 04-15-2011 02:31 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2085448)
Steveholtam,

Its hard to see the effect of sleep if your using it a lot. But on my phone, I can get 20hours max with no sleep, and 70 hours with. I do not charge every day. If you don't care about sleep, then arrrghhh is right and scbs will work fine the way it is, just ignore your Se parameter. I'm not really sure why your phone wouldn't be sleeping at this point, other people are probably more skilled than I am at finding wakelocks and such.


Fishingmedic,

Leaving it plugged in all the time is not really a problem. Just if your generating a model for your battery, you will need to spend some considerable time on the battery. Once the model is generated, it does not matter.

jonpry, let's say one of the parameters in scbs.conf doesn't look "right", can you just force it to be "right" by changing the value or will that do it no good (I guess all batteries are unique)? my se value is 0.04xxxx which is higher than the one (0.007xxxx) I had with 0.3.d. Or should I try to get more data and run the analysis again; the one I generated with 0.3.d had like 3 charge/discharge cycles of log collected whereas the most recent one based off 0.4.a has only 1 cycle. I have been off your test kernel for over a day now but I'll be back on it.

jonpry 04-15-2011 03:21 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Ndno,

The big different between 3.d and 4.a is that 4.a attempt to calculate Se where as it used to be fixed to .007. I'm not sure what it should be for your phone. I know that it is ~.0013 on rhod300, and .0075 on rhod210. If you can get lots of logs, and find that different combinations give you some consistent number, then we will know what it should be with some confidence. Other than that it kind of requires a multimeter :p.

Editing the conf is a fine thing to do if your so inclined.

detule 04-15-2011 09:43 PM

Re: [TESTING] SCBS: Improved battery meter system
 
cc=0.396894618
cb=75.704576085
rc=0.528471579
re=0.211668715
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=25.273078086
se=0.012059658

I know I am a little late to the party - this is on my rhod400. Battery drained from full in 10~12 hours with fairly light use - I did have a couple of resets into winmo, including one orange light SOD. I gather that se number seems high (considering the phone was in green light sleep for good portions of the day.)

Thanks for the hard work jonpry - I think I'll try the combined WisTilt2/SCBS kernel when I get back in town next week.

jandyman 04-16-2011 06:23 AM

Out of curiosity has anyone tested this on a partition build?
They don't take rootfs, so technically I suppose it won't work properly without updating .. . .but still :)

jonpry 04-16-2011 10:37 AM

Re: [TESTING] SCBS: Improved battery meter system
 
The scbs rootfs just includes the scbs binary (/bin/scbs), and there are some trivial changed to the init script that run scbs on startup and also do a better job of creating the camera device nodes. This could in theory be moved to system.img but putting it in rootfs made it easier to distribute.

Detule,

Your model looks ok to me. We will need to get more data to see what Se should be on rhod400, but 12ma doesn't sound impossible.

pdawg17 04-16-2011 05:40 PM

Re: [TESTING] SCBS: Improved battery meter system
 
So just to clarify - you are supposed to go from full charge down to below 20% and then fully recharge BEFORE analyzing?

arrrghhh 04-16-2011 09:08 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by pdawg17 (Post 2085997)
So just to clarify - you are supposed to go from full charge down to below 20% and then fully recharge BEFORE analyzing?

Yes, to get the best analysis.

This is by no means required, but it will create a much better model than say just draining it to 20%.

ndno 04-17-2011 12:31 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2085852)
The scbs rootfs just includes the scbs binary (/bin/scbs), and there are some trivial changed to the init script that run scbs on startup and also do a better job of creating the camera device nodes. This could in theory be moved to system.img but putting it in rootfs made it easier to distribute.

That's great! This means I can pull the scbs binary, place it in any distribution I plan to run, update that distribution init script to add your "stuff", and use your kernel or the new one that arrrghhh posted that has your SCBS support. arrrghhh, any chance of the SCBS getting committed to the mainline kernel?

jonpry, once I have a "desired" model, can I disable the background data collection?

pdawg17 04-17-2011 12:40 AM

Re: [TESTING] SCBS: Improved battery meter system
 
cc=0.497087802
cb=78.937759433
rc=0.362606503
re=0.213442319
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=9.597751116
se=0.026020606

So here is my first "attempt"...this is on a Rhod400 with wistilt's test kernel...file was from around 10 hours of time from full charge to around 10% and then back to full charge...it looks a bit different than jonpry's...any comments?

arrrghhh 04-17-2011 12:55 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by ndno (Post 2086121)
That's great! This means I can pull the scbs binary, place it in any distribution I plan to run, update that distribution init script to add your "stuff", and use your kernel or the new one that arrrghhh posted that has your SCBS support. arrrghhh, any chance of the SCBS getting committed to the mainline kernel?

jonpry, once I have a "desired" model, can I disable the background data collection?

Well, I'd say everything is destined for mainline. Just need to get kinks worked out, which jonpry seems close to doing.

With that said, this only works for RHOD at this point. I doubt it'll show up in the autobuild until all phones are supported.

ndno 04-17-2011 01:36 AM

Re: [TESTING] SCBS: Improved battery meter system
 
1 Attachment(s)
OK, another day a half of data collection, here are my new values from the attached scbs log files; the se value got down to 0.007:


cc=0.308551483
cb=151.246337531
rc=1.195478281
re=0.136412463
vf=1.103000000
cf=0.312500000
lr=0.000001000
sl=9.589367021
se=0.007547648

Gonna try another distribution over at neopeek with this SCBS-kernel system now. Thanks!

hekc0211 04-17-2011 08:04 AM

Re: [TESTING] SCBS: Improved battery meter system
 
I have installed it the battery meter works Great on my TP2 Rhodium 100.
But the Kernel Blocks the use of my wifi...

For so far i can live with it...
I am fully open for any tests on this smartphone...For So Far thnx alot

jonpry 04-17-2011 09:43 AM

Re: [TESTING] SCBS: Improved battery meter system
 
heck0211,

The best thing to do is just to use the wistilt2 testing kernel pack with zImage and modules. It will get wifi working for you.

steveholtam 04-17-2011 03:41 PM

Re: [TESTING] SCBS: Improved battery meter system
 
1 Attachment(s)
Jon, attached is a large log file that I am not having any luck analyzing since it is quite large. I think its a couple of days worth of operation.

jonpry 04-17-2011 05:34 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Steveholtam,

Here is what i got from your log in a slightly different format:

Rc: 0.460259, Re: 0.217757, Cc: 0.425917, Cb: 106.443573 Sl: 14.180931: Se: 0.058490

iiinycboi 04-17-2011 10:24 PM

Re: [TESTING] SCBS: Improved battery meter system
 
is it possible to remap the call button to be the home button on your roofts.img file? or can i use this fix 3 times to get a good battery model and put the F22 rootfs to have remapping capabilities?

BTW, thanks for awesome work!

thank you

natemcnutty 04-18-2011 02:09 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by iiinycboi (Post 2086363)
is it possible to remap the call button to be the home button on your roofts.img file? or can i use this fix 3 times to get a good battery model and put the F22 rootfs to have remapping capabilities?

BTW, thanks for awesome work!

thank you

Just grab the navipad.kl for your device from F22's rootfs and put it in this one.

ndno 04-18-2011 03:49 AM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by natemcnutty (Post 2086463)
Just grab the navipad.kl for your device from F22's rootfs and put it in this one.

I think he doesn't know how to "do" so, especially if he doesn't know Linux; he probably wants the rootfs.img updated with it ;)

@iiinycboi, do you know Linux? If so, you can mount jonpry's rootfs.img under Linux (Ubuntu, Fedora, etc), and copy the navipad.kl from F22's rootfs over as Nate suggested.

If not, you can try this:
  1. Boot into android, using F22's rootfs
  2. Use a file explorer and navigate to /init.etc/keymaps and copy the navipad.kl file to your /sdcard directory
  3. Boot back to WinMo and use a text editor to edit /conf/froyo.user.conf to add the following line in the custom_shells section at the bottom:
    Quote:

    mount --bind /sdcard/navipad.kl /init.etc/keymaps/navipad.kl
  4. Replace F22's rootfs.img with jonpry's rootfs.img and you should get the button mapping the next time you boot into android; you should have SCBS feature working as well as the F22's button mapping.
I haven't tried this myself but it should work.

steveholtam 04-18-2011 02:20 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Quote:

Originally Posted by jonpry (Post 2086277)
Steveholtam,

Here is what i got from your log in a slightly different format:

Rc: 0.460259, Re: 0.217757, Cc: 0.425917, Cb: 106.443573 Sl: 14.180931: Se: 0.058490

Thanks Jon. My sleep error number just sucks all around... Oh well, hopefully your code will give me a better idea how much juice I actually have left at any time though.

toadlife 04-18-2011 06:36 PM

Re: [TESTING] SCBS: Improved battery meter system
 
After creating a bogus conf that sent my phone in a reboot-loop, I credated another one...

Code:

cc=0.486578467
cb=86.509612234
rc=0.413599619
re=0.174350114
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=15.229616050
se=0.014369028

Even without the .conf, the meter is much better!

iiinycboi 04-19-2011 01:02 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Yeah i didnt know how to do it cause i wasn't familiar with linux. I'll give this a try sounds like it should work lol. Thanks in advance! :razz:

Quote:

Originally Posted by ndno (Post 2086489)
I think he doesn't know how to "do" so, especially if he doesn't know Linux; he probably wants the rootfs.img updated with it ;)

@iiinycboi, do you know Linux? If so, you can mount jonpry's rootfs.img under Linux (Ubuntu, Fedora, etc), and copy the navipad.kl from F22's rootfs over as Nate suggested.

If not, you can try this:
  1. Boot into android, using F22's rootfs
  2. Use a file explorer and navigate to /init.etc/keymaps and copy the navipad.kl file to your /sdcard directory
  3. Boot back to WinMo and use a text editor to edit /conf/froyo.user.conf to add the following line in the custom_shells section at the bottom:
  4. Replace F22's rootfs.img with jonpry's rootfs.img and you should get the button mapping the next time you boot into android; you should have SCBS feature working as well as the F22's button mapping.
I haven't tried this myself but it should work.


manekineko 04-19-2011 01:45 PM

Re: [TESTING] SCBS: Improved battery meter system
 
Rhodium 400, original battery

Booted up, charged it to full, then ran it down to 7% with a mix of ~12 hours of sleeping, wifi tethering and games before charging it all the way back to full.

cc=0.069308073
cb=115.604675265
rc=0.842694823
re=0.228095166
vf=1.098000000
cf=0.312500000
lr=0.000001000
sl=16.619811388
se=0.010055974

Has anyone collect data multiple times to see how constant these numbers remain between between runs? That would seem to indicate how accurate they really are.

Does SCBS continue generating new logs so we can do that after a model has already been accepted?


All times are GMT -4. The time now is 12:18 PM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0