N900 Software BME

(added lots of fuzzy rant about some part I currently know of BME, and about JRBME)
Line 24: Line 24:
killing or sigstop'ing it will cause immediate or delayed reboot
killing or sigstop'ing it will cause immediate or delayed reboot
it's easily suspended though thru upstart process management by
it's easily suspended though thru upstart process management by
-
~>stop bme
+
* ~>stop bme
and resumed any time by
and resumed any time by
-
~>start bme
+
* ~>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
+
* ->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
+
* 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"])
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"])
[[category:N900_Hardware]]
[[category:N900_Hardware]]

Revision as of 11:52, 9 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 killing or sigstop'ing it will cause immediate or delayed reboot it's easily suspended though thru 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"])