Active Topics

 


Reply
Thread Tools
Posts: 669 | Thanked: 433 times | Joined on May 2010
#1
I just got a new portable charger - the energizer 18000 and tried to charge the N900 with it unsuccessfully, even though it DOES charge other devices.
I tried to stop BME and use the "charge21.sh" script for the charging process and it works good even though it charges slowly.
I'm thinking now to completely disable BME during startup in one of the following ways:
1. Adding a script to event.d with "stop bme" and "/usr/bin/charge21.sh&" commands
2. Modifying the "event.d/bme" script itself (which I was unsuccessful in doing since the device got to an infinite loop when I did it)

Taking care of emergency shutdown when the power gets very low is not a feature I need (I can implement it myself) so it does not make me worry, but I do want - if possible to keep the behavior of the flashing yellow light during charging and the green light when charging is complete (RSOC=100 is not enough to make the green led appear so I do not know how to REALLY know if the battery is fully charged).

Any thoughts/ideas/enhancements will be very welcome.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2
Wouldn't it be more feasible to use bq2415_charger module from kernel-power? It have most (if not all) hooks for userland ready, and it's only awaiting for userland bits, to be 100% ready for replacing BME.

It may be worth to contribute your efforts there, as it's closest thing we have for FOSSS bme replacement, now.

/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!
 
Posts: 669 | Thanked: 433 times | Joined on May 2010
#3
Thanks - i was not aware that there was such thing.

I've just sniffed around the threads to read about it, but could not find how to actually use it - were there any instructions published you know of?
 
Posts: 112 | Thanked: 92 times | Joined on Nov 2010
#4
stop bme
modprobe bq2415x_charger

Kp51r1 or above is required.

//nkirk
 

The Following 2 Users Say Thank You to nkirk For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#5
Thanks i using it now
any suggestion for the way to make it permanent instead of BME (the way to permanently prevent BME loading at startup and starting this mod instead - would it be best to modify the bme startup script for example)?

Last edited by impeham; 2012-10-12 at 14:28.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#6
There are also many sysfs parameters, that you can modify after loading module (for example, as part of your loading script). See content of:

Code:
/sys/class/power_supply/bq24150-0/
Most of things there are sysfs entry that you can modify, to alter things like charging current, or diode, or low battery threshold, or...

/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: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#7
Originally Posted by impeham View Post
Thanks i using it now
any suggestion for the way to make it permanent instead of BME (the way to permanently prevent BME loading at startup and starting this mod instead - would it be best to modify the bme startup script for example)?
Be careful!

I actually did that a few months ago. In the end I irreversibly* bricked my N900.
(* because USB port also stopped working, and even though I had U-boot installed the SD card wasn't being recognized..)

The /etc/event.d/bme script does quite a number of things besides merely starting bme (pre-charging, actdead-dependent stuff, etc.)

Plus /etc/event/rc-default (which emits the signal to start a runlevel) has "start on started bme".

I modified the latter to say "start on started dsme" (because bme starts when dsme has started).

It worked, but there were various issues when shutting down (it would go to actdead instead of shutting down) and starting up (sometimes it would go directly to actdead). If your USB port is healthy and/or you have U-boot and your SD card works, then go ahead and try it.

Unfortunately I didn't document everything I did, so I may have fvcked up somewhere else. Please do document what you do so we can all learn from it!

Cheers and good luck.

PS: without bme your battery indicator will be just a static bitmap. You'll need i2cget to know your battery status (you can easily get the voltage, which is as good/effective/informative as any percentage value).
 

The Following 2 Users Say Thank You to reinob For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#8
Originally Posted by reinob View Post
Be careful!

I actually did that a few months ago. In the end I irreversibly* bricked my N900.
(* because USB port also stopped working, and even though I had U-boot installed the SD card wasn't being recognized..)

The /etc/event.d/bme script does quite a number of things besides merely starting bme (pre-charging, actdead-dependent stuff, etc.)

Plus /etc/event/rc-default (which emits the signal to start a runlevel) has "start on started bme".

I modified the latter to say "start on started dsme" (because bme starts when dsme has started).

It worked, but there were various issues when shutting down (it would go to actdead instead of shutting down) and starting up (sometimes it would go directly to actdead). If your USB port is healthy and/or you have U-boot and your SD card works, then go ahead and try it.

Unfortunately I didn't document everything I did, so I may have fvcked up somewhere else. Please do document what you do so we can all learn from it!

Cheers and good luck.

PS: without bme your battery indicator will be just a static bitmap. You'll need i2cget to know your battery status (you can easily get the voltage, which is as good/effective/informative as any percentage value).
My USB port is ok and i have backupmenu with multiboot and an SD card - of course - so testing such script changes are not a problem, however, i tried playing with this bme script and every change i did caused the device to enter a boot loop so if anyone knows what exactly needs to be changed there it will be very helpful. another option is to actually run stop bme and modprob afterwards but this is not so elegant

One change i tested is replacing the "exec /usr/sbin/bme_RX-51" command but as i said - i got the device in a boot loop as a result.

about the battery indicator - i already removed it from the status bar a long time ago and created a battery widget myself (with queen beecon and a script using i2cget) so this is not an issue.
 

The Following User Says Thank You to impeham For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#9
Originally Posted by Estel View Post
There are also many sysfs parameters, that you can modify after loading module (for example, as part of your loading script). See content of:

Code:
/sys/class/power_supply/bq24150-0/
Most of things there are sysfs entry that you can modify, to alter things like charging current, or diode, or low battery threshold, or...

/Estel
Where can i find info about all the parameters there? I searched for this but didn't couldn't find anything.
 
Posts: 669 | Thanked: 433 times | Joined on May 2010
#10
ok - eventually i've added a script to event.d:

-----
start on started hildon-desktop
stop on starting shutdown

script
run-standalone.sh stop bme
run-standalone.sh modprobe bq2415x_charger
end script
-----

with my portable charger - works like a charm so far.

i wonder - will using "modprobe bq2415x_charger" turn of my device automatically at 3400ma?
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:43.