![]() |
2010-07-04
, 11:29
|
Posts: 1,729 |
Thanked: 388 times |
Joined on Jan 2010
@ Canada
|
#2
|
![]() |
2010-07-04
, 11:36
|
|
Posts: 106 |
Thanked: 51 times |
Joined on Jun 2010
@ Amazonia (Spain)
|
#3
|
![]() |
2010-07-04
, 11:38
|
Posts: 842 |
Thanked: 1,197 times |
Joined on May 2010
|
#4
|
![]() |
2010-07-04
, 11:46
|
|
Posts: 1,107 |
Thanked: 720 times |
Joined on Mar 2007
@ Germany
|
#5
|
![]() |
2010-07-04
, 11:46
|
Posts: 193 |
Thanked: 92 times |
Joined on May 2010
@ galveston, tx
|
#6
|
![]() |
2010-07-04
, 12:17
|
Posts: 840 |
Thanked: 823 times |
Joined on Nov 2009
|
#7
|
is there a tutorial "how to change your car's wheels without stopping"?
Cool hackers...
The Following User Says Thank You to Cue For This Useful Post: | ||
![]() |
2010-07-04
, 13:39
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#8
|
The Following User Says Thank You to qwazix For This Useful Post: | ||
![]() |
2010-07-04
, 13:44
|
|
Posts: 2,473 |
Thanked: 12,265 times |
Joined on Oct 2009
@ Jerusalem, PS/IL
|
#9
|
The Following User Says Thank You to MohammadAG For This Useful Post: | ||
![]() |
2010-07-04
, 13:50
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#10
|
The Following User Says Thank You to qwazix For This Useful Post: | ||
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):
- Get your fastcharger (aka wallcharger) ready and plugged in to mains power outlet.
- Open back battery cover of N900. (On PR1.1.1 and older, close camera-ui which pops up)
- in x-terminal become root and prepare command to stop bme
Code:
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!
- switch OFF GSM modem (flight mode, tablet mode)
- 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)
- (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)
- Plug in the fastcharger USB plug, check for notifier saying "charging...", start the stopwatch in your mind.
- Now hit ENTER to trigger the 'stop bme' command you prepared. Now 30 seconds left to finish mission of swapping batteries!
- Remove empty battery. Device shall stay alive
- Insert fresh battery,
- 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.
- Now you probably want to revert all the power saving measures, like level up your screen backlight and enable GSM etc
- 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 N90010..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:
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.