PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2011, 01:19 AM
toadlife's Avatar
Lurker
Offline
Pocket PC: T-Mobile Touch Pro 2
Carrier: T-Mobile
Location: Lemoore, CA
 
Join Date: Dec 2008
Posts: 15
Reputation: 15
toadlife is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by arrrghhh View Post
What I'm wondering is how to stop it? Does it just perpetually take logs?
By default, it logs to /sdcard/scbs.log, but you can effectively disable logging by making it log to /dev/null

e.g. `scbs -d -co /sdcard/scbs.conf -lf /dev/null`

Here are the command line options...

Code:
 # scbs --help
scbs --help
Warning: Failed to open config file /etc/scbs.conf
Super cool battery software, version: 0.04.a

Usage: scbs [OPTIONS]
Start battery daemon or perform maintance functions on data files.

Mandatory arguments for long options are mandatory for short options too.
  -h, --help                display this help and exit
  -v, --version             display scbh version number
  -pn                       print nan warnings to console
  -df PATH                  use device file def:(/dev/scbs0)
  -lf PATH                  use file for logging def:(/sdcard/scbs.log)
  -co PATH                  use file for initial config def:(/etc/scbs.conf)
  -d                        start sbcs in daemon mode
  -s INT                    set the sleep mode data interval def:(5000)
  -w INT                    set the wake mode data interval def:(5000)
  -cf REAL                  set the charge scale factor def:(0.312500000)
  -vf REAL                  set the voltage scale factor def:(1.098000000)
  -se REAL                  set the sleep error constant def:(0.007000000)
  -ln PATH                  open data file and use it to compute linearization
  -n PATH                   open data file and use it to compute Rc,Cc,Re,Cb
  -nr REAL                  set nls learning rate def:(0.000010000)
  -wf                       write the computed battery model out to the config file
  -l PATH                   open data file and generate stream of Cb estimates
  -lr REAL                  set luenberger learning rate def:(0.000001000)
  -rc REAL                  set Rc value def:(0.028796000)
  -re REAL                  set Re value def:(0.130299000)
  -cc REAL                  set Cc value def:(2.064020000)
  -cb REAL                  set Cb value def:(64.219460000)
  -sl REAL                  set Cb slope value def:(0.000000000)
Reply With Quote
This post has been thanked 1 times.
  #2 (permalink)  
Old 04-22-2011, 02:41 AM
ndno's Avatar
VIP Member
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint
 
Join Date: Jan 2010
Posts: 421
Reputation: 3570
ndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by toadlife View Post
By default, it logs to /sdcard/scbs.log, but you can effectively disable logging by making it log to /dev/null

e.g. `scbs -d -co /sdcard/scbs.conf -lf /dev/null`

Here are the command line options...
Thanks for the syntax. I think I'm happy with my model now so I'm going to disable logging by redirectly to /dev/null. That should lighten up the writes to the SD card constantly.
Reply With Quote
  #3 (permalink)  
Old 04-22-2011, 09:45 PM
toadlife's Avatar
Lurker
Offline
Pocket PC: T-Mobile Touch Pro 2
Carrier: T-Mobile
Location: Lemoore, CA
 
Join Date: Dec 2008
Posts: 15
Reputation: 15
toadlife is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

jonpry,

I'm having a strange issue with scbs and was wondering if you could shed some light on why this was happening.

I've integrated scbs into F22's latest rootfs and in /init I've integrated the following code, which starts debug logging and scbs

Code:
    logfiledate=`date +%Y%m%d%H%M%S`
    cat /proc/kmsg>"$card"/debuglogs_kmsg_"$logfiledate".txt &    
    logcat -v time >"$card"/debuglogs_logcat_time_"$logfiledate".txt &
    logcat -v time -b radio>"$card"/debuglogs_logcat_time_radio_"$logfiledate".txt &


    dev=$(cat /sys/class/scbs/0/dev | sed -e "s/:/ /g")
    mknod /dev/scbs0 c $dev


    scbs -d -co /sdcard/scbs.conf
The problem I am having is that, if I enable scbs, it causes both instances of logcat to crash with the errors 'unable to access /dev/log/main' and 'unable to access /dev/log/radio'.

I tried starting scbs before the logging and after, and it makes no difference. I also tried some other things like having the script sleep for 5 seconds but the result is always the same. If I start scbs via gscript logcat does not blow up, so it seems like it might have to do with them being fired of in the same tty.
__________________
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega

Last edited by toadlife; 04-22-2011 at 10:08 PM.
Reply With Quote
  #4 (permalink)  
Old 04-25-2011, 11:22 PM
hlo's Avatar
hlo
Lurker
Offline
Pocket PC: HTC Touch Pro2
Carrier: Sprint
 
Join Date: Apr 2007
Posts: 3
Reputation: 0
hlo is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by ndno View Post
Thanks for the syntax. I think I'm happy with my model now so I'm going to disable logging by redirectly to /dev/null. That should lighten up the writes to the SD card constantly.
I probably missed a post about this but what file do I edit to redirect to /dev/null? Thanks.
Reply With Quote
  #5 (permalink)  
Old 04-19-2011, 04:07 PM
quid246's Avatar
PPCGeeks Regular
Offline
Pocket PC: None
Carrier: None
 
Join Date: Oct 2009
Posts: 72
Reputation: 35
quid246 is just getting started
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Any chance of the code being GPL'd?

Would be nice to export the logs and analyze them on a desktop PC... would definitely cut down on the .conf build time!
Reply With Quote
  #6 (permalink)  
Old 04-19-2011, 04:18 PM
arrrghhh's Avatar
Testing Extraordinaire
Offline
Pocket PC: HTC Touch Pro 2 (RHOD400)
Carrier: Sprint
 
Join Date: Mar 2007
Posts: 3,604
Reputation: 7360
arrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the community
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by quid246 View Post
Any chance of the code being GPL'd?

Would be nice to export the logs and analyze them on a desktop PC... would definitely cut down on the .conf build time!
I think jonpry has made an x86 binary of SCBS.

Not sure if BABS will be GPL'd, but the kernel code will be, don't worry 'bout that. Perhaps we can coax jonpry into giving up his x86 version .
Reply With Quote
  #7 (permalink)  
Old 04-19-2011, 06:05 PM
quid246's Avatar
PPCGeeks Regular
Offline
Pocket PC: None
Carrier: None
 
Join Date: Oct 2009
Posts: 72
Reputation: 35
quid246 is just getting started
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by arrrghhh View Post
I think jonpry has made an x86 binary of SCBS.

Not sure if BABS will be GPL'd, but the kernel code will be, don't worry 'bout that. Perhaps we can coax jonpry into giving up his x86 version .
x86 EXE would be nice... don't need source, one less step if it's an EXE.

I ran the analyzer, but came back 45 minutes later to find my TP2 rebooted back into MightyRom.
Reply With Quote
  #8 (permalink)  
Old 04-19-2011, 05:49 PM
jandyman's Avatar
Lurker
Offline
Pocket PC: htc touch pro2/ rhod210
Carrier: 3mobile
 
Join Date: Mar 2011
Posts: 8
Reputation: 15
jandyman is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Any chance of gettn the changes and files in your rootfs so it can be pushed and used in a partition build?
Ie) init changes? Binaries, etc . . .
Reply With Quote
  #9 (permalink)  
Old 04-19-2011, 07:23 PM
arrrghhh's Avatar
Testing Extraordinaire
Offline
Pocket PC: HTC Touch Pro 2 (RHOD400)
Carrier: Sprint
 
Join Date: Mar 2007
Posts: 3,604
Reputation: 7360
arrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the community
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by jandyman View Post
Any chance of gettn the changes and files in your rootfs so it can be pushed and used in a partition build?
Ie) init changes? Binaries, etc . . .
The binary is in the first post. Just pull out scbs and add the change to init... done.
Reply With Quote
  #10 (permalink)  
Old 04-19-2011, 08:56 PM
ndno's Avatar
VIP Member
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint
 
Join Date: Jan 2010
Posts: 421
Reputation: 3570
ndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIPndno is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: [TESTING] SCBS: Improved battery meter system

Quote:
Originally Posted by arrrghhh View Post
The binary is in the first post. Just pull out scbs and add the change to init... done.
CWM should allow us, the users, to create an update.zip to patch any distribution with this and share it with the other users.
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2 > Android On TP2 Development

Tags
battery, tp2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 05:09 AM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com