N900 Software BME

m (wikify link)
(wikify)
Line 17: Line 17:
Unsorted adds:
Unsorted adds:
-
Then there's also /usr/lib/hal/hald-addon-bme, which seems not to be completely out of order (according to lshal) even when bme_RX-51 is stopped.
 
-
Mer 'replacement hald-addon-bme': http://gitorious.org/mer-toggles/hald-addon-bme/blobs/master/hald-addon-bme.c
+
* Then there's also /usr/lib/hal/hald-addon-bme, which seems not to be completely out of order (according to lshal) even when bme_RX-51 is stopped.
-
[[Mer/Documentation/BME_Protocol]] (N810!)
+
-
lsof -p `pidof bme_RX-51` gives an idea about what BME is actually interfering/interfacing with, and a strace will show it talks to dsme_lib probably to implement the watchdog timers.
+
* Mer 'replacement hald-addon-bme': http://gitorious.org/mer-toggles/hald-addon-bme/blobs/master/hald-addon-bme.c [[Mer/Documentation/BME_Protocol]] (N810!)
-
BME process/file is called /usr/sbin/bme_RX-51
+
* <code>lsof -p `pidof bme_RX-51`</code> gives an idea about what BME is actually interfering/interfacing with, and a strace will show it talks to dsme_lib probably to implement the watchdog timers.
-
killing or sigstop'ing it will cause immediate or delayed reboot
+
 
-
it's easily suspended though thru upstart process management by
+
* BME process/file is called <code>/usr/sbin/bme_RX-51</code> and killing or sigstop'ing it will cause immediate or delayed reboot. It is easily suspended though through upstart process management by:<br /><pre>~>stop bme</pre>and resumed any time by:<br /><pre>~>start bme</pre>
-
* ~>stop bme
+
-
and resumed any time by
+
-
* ~>start bme
+
A nice little experiment to investigate the bq24150 USB Battery Charger chip's abilities is to  
A nice little experiment to investigate the bq24150 USB Battery Charger chip's abilities is to  
* plug in Nokia wallwart charger
* plug in Nokia wallwart charger
-
* ->stop bme
+
* <pre>->stop bme</pre>
* wait max 32s until bq24150 internal watchdog timer expires (due to bme not resetting it), which will cause bq24150 to reset to defaults, which are a mostly sane, safe charging without any software support. You can tell this by bq24150 firing up the hardwired steady yellow indicator LED
* wait max 32s until bq24150 internal watchdog timer expires (due to bme not resetting it), which will cause bq24150 to reset to defaults, which are a mostly sane, safe charging without any software support. You can tell this by bq24150 firing up the hardwired steady yellow indicator LED

Revision as of 06:35, 10 May 2010

This page is to bring together efforts and links for those working on understanding BME - the battery managment entity.

This is required to implement user friendly Host Mode

BME is divided into three parts.

  • Kernel driver that handles all of the low-level interaction with the hardware.
  • hald-addon-bme - an add-on process for HAL that reports status.
  • bme_RX-51 - Process started early in boot, with watchdogs to reboot the device if it malfunctions.


The kernel driver is split over several files.

http://mxr.maemo.org/fremantle/source/kernel/include/linux/i2c/twl4030-madc.h This handles reading various ADCs to readout voltages and currents.


Unsorted adds:

  • Then there's also /usr/lib/hal/hald-addon-bme, which seems not to be completely out of order (according to lshal) even when bme_RX-51 is stopped.
  • lsof -p `pidof bme_RX-51` gives an idea about what BME is actually interfering/interfacing with, and a strace will show it talks to dsme_lib probably to implement the watchdog timers.
  • BME process/file is called /usr/sbin/bme_RX-51 and killing or sigstop'ing it will cause immediate or delayed reboot. It is easily suspended though through upstart process management by:
    ~>stop bme
    and resumed any time by:
    ~>start bme

A nice little experiment to investigate the bq24150 USB Battery Charger chip's abilities is to

  • plug in Nokia wallwart charger
  • ->stop bme
  • wait max 32s until bq24150 internal watchdog timer expires (due to bme not resetting it), which will cause bq24150 to reset to defaults, which are a mostly sane, safe charging without any software support. You can tell this by bq24150 firing up the hardwired steady yellow indicator LED

I'm about to write a first draft little script to somewhat replace bme's basic functions, eventually turning this into a real project Just-Replaces-BME aka jrbme (some say it's "JRBME replaces BME", according to an age old tradition of linux self referencing ETLA [like GNU=="GNU Not Unix", KDE=="KDE Desktop Environment"])