Reply
Thread Tools
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#1
DANGER! Uncertified hardware hack! Though it worked for me, there's NO GUARANTEE it will not fry your N900 or even You. I found no indications this procedure could be harmful or dangerous, but I could be wrong.
PROCEED ON OWN PERIL!


You can swap battery to replace an empty one with a fresh full one, without completely powering down the device.

Tested generic method-1 (You will want to try this only when main battery is not completely charged - good, as it needs device indicating "charging" otherwise hotswap will fail):
  1. Get your fastcharger (aka wallcharger) ready and plugged in to mains power outlet.
  2. Open back battery cover of N900. (On PR1.1.1 and older, close camera-ui which pops up)
  3. in x-terminal become root and prepare command to stop bme
    Code:
    root
    stop bme
    wait with hitting ENTER on the stop-bme-line until you got your setup sorted. I.E wallcharger is plugged in to mains, you had a close look on how to remove battery - next steps are time critical!
  4. switch OFF GSM modem (flight mode, tablet mode)
  5. reduce screen backlight to lowest level, make sure it will not switch off during next few minutes (use long timeout or 'always keep on' function)
  6. (I did NOT switch off my WLAN in N900, but depending on your configuration yours might be too power greedy and cause N900 to switch off when battery is removed. You will need to switch off WLAN (flightmode) then to make this procedure work)
  7. Plug in the fastcharger USB plug, check for notifier saying "charging...", start the stopwatch in your mind.
  8. Now hit ENTER to trigger the 'stop bme' command you prepared. Now 30 seconds left to finish mission of swapping batteries!
  9. Remove empty battery. Device shall stay alive
  10. Insert fresh battery,
    10..30s after bme stop bright yellow indicator LED will light up, showing the device is working in emergency autonomous charge mode. You better have finished with inserting battery at that point.
    With bright yellow light showing up you managed to cross the finish line just in time, now you got ~30 minutes to complete procedure by:
  11. Issue command 'start bme' in x-terminal. Yellow Indicator light will switch off, screen goes black. Lock and unlock with sliding lockswitch to recover screen.
  12. Now you probably want to revert all the power saving measures, like level up your screen backlight and enable GSM etc
  13. unplug fastcharger USB, wait 5 seconds. Plug in again to make sure bme restarted correctly and device is indicating charging and not charging like supposed.
Congratulations, you are ready to consume another battery charge worth of fun with N900

Background and supplementary info
The N900 has a battery charger chip that can charge battery without software control - the so called emergency recover charge mode (it's characterized by a bright steady yellow indicator LED lighting up). This mode will on charger chip's watchdog triggered reset, ~32s after bme stopped talking to chip. Until reset the chip will continue with whatever charge mode bme has configured, that's why we need charging state prior to bme stop. Both modes can NOT supply enough power to reliably operate the whole N900 incl subsystems like GSM, GPS, vibrator, camera/flashlight, video codec, audio stereo speakers, so we need to make sure all those power hogs won't kick in during the time the device is running off charger without battery backup. On the other side charging mode will switch off when the bq24150 charger chip thinks the battery is full. The chip detects this battery full condition by supply current going below a certain threshold - this is why we need to keep backlight screen on, it ensures there will always be enough current flowing so charger chip keeps charging. There's a 3rd condition which will lead to immediate hard switch off of charging, and that's a ~32 minutes timer inside charger chip that will unconditionally stop emergency charging when timer expires. That's where the 30 minutes figure in above instructions comes from.
This flavour of emergency charging will work only with fastcharger, which is detected in hardware by a short of USB data lines D+/D-. So this procedure usually will NOT work with CA-101 USB cable and USB host PC instead of fastcharger.
Q:Why do we need all that 'stop bme' obscure stuff? A: bme (the battery management entity) seems to check for existence of a correct battery, by probing the 3rd contact of battery (the BSI indicator contact). If bme detects the battery is missing, it shuts down N900 in <1 second. (that's what I gathered on unconfirmed facts so far). Probably this is done to switch off system gracefully and not corrupt filesystems or whatever evil may happen when you pull the plug of any computer system. So for normal situation this is a nice and sane thing to do. Here however we take on our own the whole responsibility not to operate power hogs and make system crash, so we need to keep bme from taking care on our behalf. Be warned, the risk of corrupting your filesystem when anything goes wrong is a real one. Keep backups of your data, and be prepared to reflash! Keep in mind you need a freshly charged battery to reflash, and odds are your system won't charge battery when you ruined the rootfs. See WARNING at head of this post.


Q: You wrote your instructions are for 'method-1' - so is there a 'method-2' as well?
A: Let's see if there is enough positive response on this method-1 (you are free to hit 'Thanks!' button under this post, to show you appreciate the work). If there is, I will come up with a script to simplify the whole process and same time make it more safe by checking a few preconditions. And I'll also come up with a nice surprise for you - topic >>How to hotswap in the field? Subtitle 'But I got no mains power'<<

This little hack brought to you by courtesy of
jOERG
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2010-07-06 at 11:58.
 

The Following 104 Users Say Thank You to joerg_rw For This Useful Post:
9000, aanckar, adhrie, AgentZ, ammyt, anapospastos, andreas.k, andree, antezz, ArnimS, Bartcore3, Benson, BlackList, BLIZZARD, caco3, ceroberts75, Char, clasificado, Creamy Goodness, Cue, D4rKlar, DaSilva, debernardis, deegore, divan, drangina, eiraku, ejasmudar, ersanpermana, F2thaK, flexxxv, foobar, fw190, gabby131, GigaByte, gionni88, godofwar424, gttnnn, G_Gus, handaxe, Heman1310, ivgalvez, javispedro, jcharpak, Joseph9560, joshv06, jostefan13, jpala16, kolos, lemmyslender, lieronet, lma, logicalsid, magog, Marklar, Marshall Banana, mece, Mentalist Traceur, mikki-kun, MohammadAG, mpi, mrsellout, mr_jrt, mthmob, musculus, naj, ndi, noipv4, OVK, pali, panjgoori, PanzerSajt, Patola, peterleinchen, qole, qwazix, qwerty12, Radu, RiD, RobbieThe1st, Russe89, rustler, saadgadit, sachin007, salemsnake, shaf, sicelo, sjgadsby, Sohil876, Steffe69, stlpaul, Straycat, Termana, ThomasAH, TiagoTiago, titi974, Trestry, tuxsavvy, vabgeo, Venemo, wumpwoast, zdanee, [Knuckles]
Posts: 1,729 | Thanked: 388 times | Joined on Jan 2010 @ Canada
#2
thanks.....i dont see the reason that i will/must do this but i will surely need it in the future.......
__________________
if i did help you, just click "Thanks" on the lower right of my post. thanks!

"The best way to break a Spell is to prevent it from being cast in the first place"

N900: 1000/1150mhz; sampling_rate 15; up_threshold 150000;
 
RolePlayGame's Avatar
Posts: 106 | Thanked: 51 times | Joined on Jun 2010 @ Amazonia (Spain)
#3
is there a tutorial "how to change your car's wheels without stopping"?
Cool hackers...
__________________

...
Coming soon
...
 

The Following 6 Users Say Thank You to RolePlayGame For This Useful Post:
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#4
Looks interesting. Go ahead and post your information!
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#5
Very informative post. Thanks a lot.
__________________
find . -name \*.mp3 -exec mplayer -quiet -shuffle "{}" +
das ist your media player, and yuu vill like it
 
Posts: 193 | Thanked: 92 times | Joined on May 2010 @ galveston, tx
#6
Originally Posted by RolePlayGame View Post
is there a tutorial "how to change your car's wheels without stopping"?
Cool hackers...
Beats the idea of pitstops:P I have heard air-air refuelling though
 
Posts: 840 | Thanked: 823 times | Joined on Nov 2009
#7
Originally Posted by RolePlayGame View Post
is there a tutorial "how to change your car's wheels without stopping"?
Cool hackers...
tutorial begins at 1:38
http://www.youtube.com/watch?v=z1EQcDfNZwQ

on topic, this is amazing. The next best thing from a hibernate mode.

Last edited by Cue; 2010-07-04 at 12:20.
 

The Following User Says Thank You to Cue For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#8
Please tell me where could this be used. It would be awesome if it would work without losing the connections etc etc but this is almost turning the device off.
It's not sarcasm, it's an honest question.

Last edited by qwazix; 2013-07-14 at 21:03.
 

The Following User Says Thank You to qwazix For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#9
imo, turning off two modems and the display saves much more time than rebooting the whole device (mine takes about 6 minutes to get stable at boot up).
Plus if you use IRC and have a static IP, it means you don't have to quit
 

The Following User Says Thank You to MohammadAG For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#10
6 minutes?? And I thought I had overburdened the device. Ok that is one good reason but again it's too much of a risk for a couple of minutes. Of course it is a risk now, maybe with a proper script it will be procedural, waiting for the change in the field solution though. That will kick ***.

Last edited by qwazix; 2013-07-14 at 21:03.
 

The Following User Says Thank You to qwazix For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:33.