Active Topics

 


Reply
Thread Tools
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#1
Hello, This is my first thread, I hope I am approaching the situation correctly. I am not aware of anything that does this job so I hacked a little shell script together for whoever needs it.

What is it?
If you are using charge21.sh in replacement of BME (or whilst doing hostmode + charging) or are using the bq27xxx kernel module by pali (I believe that is its name) for charging then you will have noticed the battery icon and the LED patterns will not change as they did with BME. This script updates HAL values so that all that functionality is still there whilst using these great projects.

How do I use it?
I have attached a ZIP file. If you extract it in a filesystem where you can set executable rights, mark i2cget as executable and run updatehal.sh it will work. If you don't understand the previous, do the following:
To install:
  1. Copy the zip into MyDocs
  2. Open a terminal
Code:
unzip MyDocs/updatehal.zip
chmod +x i2cget
To use:
  1. Open a terminal
    Code:
    sudo gainroot
    sh updatehal.sh
You will need root to run it!

Is this for me?
If you want the battery icon and LED patterns to update while not using BME and you can follow the simple instructions above then yes, this is for you.

PLEASE NOTE:
I have not tested this with the kernel module by pali so I am not sure if his LED orange-always-on while charging will interact in any way with mceledpattern. That being said I cannot imagine anything bad will happen because then receiving an SMS would break something in your phone while charging with his module .

ToDo:
  1. This script can be fairly optimized by making it check if the kernel module is loaded and reading values from it as opposed to running bq27200.sh (I am sure in some /sys or /proc entry the module updates something; again I cannot check as I have not yet upgraded and the repos are all down).
  2. I have a version that integrates with charge21.sh.txt (i.e. both scripts in one), should probably modify that to check that if the kernel module by pali is not loaded and BME is not running then run with the whole charge21.sh.txt functionality, else read values from bq27xxx kernel module.
  3. I believe that when the battery is full the LED pattern sets correctly but the charging icon stays with the charging animation... Must look into that...

Any questions, comments or suggestions please post bellow!

EDIT: According to Estel a few packages do this already for the bq27x00 kernel module, I was unaware of that .
Originally Posted by Estel View Post
Now, don't get me wrong, but wasnt it already achieved, when using all 4 packages of Pali's BME replacement, + Pali's replacement battery applet, modified by kerio?

I'm definitely using bq2415x for charging, and bq27x00_battery for gathering data - it's auto-loading on my device boot. I'm also definitely using bme replacement. Now, all my charging leds patterns, notifications, etc are working OK; without using custom scripts.
This is still useful for those of you (like myself) that use the charge21.sh.txt script by shadowjk
Attached Files
File Type: zip updatehal.zip (11.3 KB, 101 views)

Last edited by pablocrossa; 2013-02-07 at 16:08.
 

The Following 7 Users Say Thank You to pablocrossa For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2
Thanks a lot for your hard work.

Now, don't get me wrong, but wasnt it already achieved, when using all 4 packages of Pali's BME replacement, + Pali's replacement battery applet, modified by kerio?

I'm definitely using bq2415x for charging, and bq27x00_battery for gathering data - it's auto-loading on my device boot. I'm also definitely using bme replacement. Now, all my charging leds patterns, notifications, etc are working OK; without using custom scripts.

Am I missing something?

/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 4 Users Say Thank You to Estel For This Useful Post:
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#3
Originally Posted by Estel View Post
Thanks a lot for your hard work.

Now, don't get me wrong, but wasnt it already achieved, when using all 4 packages of Pali's BME replacement, + Pali's replacement battery applet, modified by kerio?

I'm definitely using bq2415x for charging, and bq27x00_battery for gathering data - it's auto-loading on my device boot. I'm also definitely using bme replacement. Now, all my charging leds patterns, notifications, etc are working OK; without using custom scripts.

Am I missing something?

/Estel
Well it appears I am missing something
TBH I am stuck on powerkernel46-wl1 (the first one with packet injection) and was planning out the whole upgrade to thumb CSSU + PK51r1 + Better hostmode et al I was not aware of the solution as I had not gotten there yet Thanks for letting me know about that, when I upgrade this script will be rendered useless but for the few who use charge21.sh.txt I imagine

Yes, I do know about the temporary repos, I am sure I could even manipulate my gw to redirect automatically by modifying some packets (I use a netbook ) but I prefer to wait until the 'official' repos are back up
 

The Following 2 Users Say Thank You to pablocrossa For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#4
BTW, if you're interested in doing big upgrade, better choose kp52 - it's release-ready, and it would be in repos for some time, if not for migration fiasco and repos being disabled. Also, newest usbmode versions require kp52.

I'm also quite sure, that official repos are working for last few days - it's just that they were extremely slow. Now, if nothing changed for last 24h, they're fast, but many packages give hash sum errors. I.E, everything is as usual

/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 2 Users Say Thank You to Estel For This Useful Post:
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#5
Originally Posted by Estel View Post
BTW, if you're interested in doing big upgrade, better choose kp52 - it's release-ready, and it would be in repos for some time, if not for migration fiasco and repos being disabled. Also, newest usbmode versions require kp52.

I'm also quite sure, that official repos are working for last few days - it's just that they were extremely slow. Now, if nothing changed for last 24h, they're fast, but many packages give hash sum errors. I.E, everything is as usual

/Estel
I was unaware of a KP52 release (I need to update out of 2011 software )
Today sudo apt-get install hexedit gave me a hash sum error so I assumed they still weren't up properly, AFAIK they are up under heavy load and work fairly unreliably... I will start on a more stable repo where I am sure the repos containing KP52, CSSU thumb etc work reliably... Then I need to re-write ALL my scripts... For updated stuff... Ah well, will surely start soon BTW good luck with the aluminium replacement covers/cases, I am really looking forward to that Stick around TMO for longer, I am sure many people here like you opinions, knowledge and projects </rant>
 

The Following User Says Thank You to pablocrossa For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#6
Originally Posted by pablocrossa View Post
I was unaware of a KP52 release (I need to update out of 2011 software )
Today sudo apt-get install hexedit gave me a hash sum error so I assumed they still weren't up properly, AFAIK they are up under heavy load and work fairly unreliably...
Now heavy load problem is gone, but many packages have wrong hash sum (only hash, afaik, packages itself should be ok, so downloading them and installing manually, or forcing apt to ignore hash, should work). Sadly, reasons for this are unknown - it's suspected to have something to do with autobuilder, as only relatively new packages are affected (the "oldest" discovered and affected thing is package from 10.2012).

Well, those are joys with keeping autobuilder mess, and abandoning COBS project. I'm tempted to write who is responsible for this and for what wrong reasons such decisions were made, but I don't want to go into maemo politics again, it's quite revolting concept. and definitely, off-topic here

Originally Posted by pablocrossa View Post
BTW good luck with the aluminium replacement covers/cases, I am really looking forward to that Stick around TMO for longer, I am sure many people here like you opinions, knowledge and projects </rant>
Thanks a lot for your kind words

/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 User Says Thank You to Estel For This Useful Post:
Posts: 863 | Thanked: 213 times | Joined on Feb 2012 @ Goa
#7
noob here - Where can i get these BME? is it in kernel stuff? or i've to install it separately? plz help
 
Reply

Tags
bme-addon, update hal


 
Forum Jump


All times are GMT. The time now is 20:03.