Battery recovery issues

Richard A. Smith richard at laptop.org
Fri May 1 02:29:49 EDT 2009


Emiliano Pastorino wrote:

> Richard,
> 
> I've just received a box with 60 faulty batteries inside, so I'll be 
> playing with them
> for the next few years...

:)

> I did a "bat-recover" on one of them for about 18 hours and I noticed this:
> When I run "watch-battery", it still says "No battery". I did a 
> full-reset of the XO
> but nothing happened, it still says "No battery".
> Then I loaded batman.fth and ran bat-charge and I got a nice output. All 
> the values 
> seemed to be OK when charging or discharging the battery.
> I tried "batman-start; 6a bat-set-status; batman-stop" and I could see 
> tha 6a in
> the first block, but "watch-battery" still says "No battery".

Hmm.. and see-bstate shows 0 1 2 over and over?

There is one more battery debugging tool available.  Its called 
bat-debug and bat-debug-log.with the power for the cpu and for the

The both read the same thing but bat-debug-log will write the contents 
to 'disk:\batdbug.log'.  'disk' is USB or SD depending on what you have 
inserted.  bat-debug just does the screen and serial port.

If the 1-wire state machine is just looping over and over bat-debug 
won't provide much more info.  It might however point out what part of 
the state machine is failing.  That part of the code has a pretty large 
number of if() clauses all lumped into the same state.

Procedure:

1) Remove the problem battery.
2) Boot machine and stop boot at OFW prompt.
3) run bat-debug (or bat-debug-log)
4) insert the battery
5) let it run for one or 2 screenfuls of info
6) hit a key to stop bat-debug

send me the info.  Note, that you don't run batman-start before you run 
bat-debug since you want the EC state machine to run and you don't need 
to 'fload batman.fth'.  bat-debug should be in your firmware already.

> What is the difference between batman's "bat-charge" and "watch-battery"?
> Tell me if I'm wrong, but I think that "bat-charge" reads battery info 
> directly from it,
> and "watch-battery" takes that info from the EC. So, the problem could 
> be that
> the EC isn't synced with the battery. Am I right?

Correct.  Batman code takes over the 1-wire communication bus from the 
EC and talks directly to the battery.  'watch-battery' uses EC commands 
to read what the EC thinks.  So if the EC state machine is bailing out 
for some reason then you will get odd things from watch-battery where 
batman only needs the 1-wire to work.

> So long I could recover 2 batteries out of 4. I'll try more batteries, 
> the batteries
> that seem to be ok now are the same model (GP NTA2490), and the other two
> (the ones I couldn't recover even with bat-recover) are 

> BYD LP183662AR-2S.

I have no idea what this number is.  The serial number I would need is 
the long string of digits under the barcode in the center of the battery.

> If you want me to do a particular test with any of these batteries, just 
> ask and I'll
> share my results with you.

Well.  I'd like to make sure the firmware has the diagnostics that will 
allow you to figure out whats up with the battery.  So depending on what 
see-bstate and bat-debug info is I'll perhaps need to make new firmware 
or new diags in batman.fth to try and figure out whats up.

-- 
Richard Smith  <richard at laptop.org>
One Laptop Per Child



More information about the Devel mailing list