Editing N900 Software BME
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
This is required to implement user friendly [[N900_Hardware_USB_Host|Host Mode]] | This is required to implement user friendly [[N900_Hardware_USB_Host|Host Mode]] | ||
- | |||
- | |||
BME is divided into three parts. | BME is divided into three parts. | ||
- | * Kernel driver that handles all of the low-level interaction with the hardware. | + | * 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. | * hald-addon-bme - an add-on process for HAL that reports status. | ||
- | * bme_RX-51 - Process started early in boot, with | + | * 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. | The kernel driver is split over several files. | ||
http://mxr.maemo.org/fremantle/source/kernel/include/linux/i2c/twl4030-madc.h | http://mxr.maemo.org/fremantle/source/kernel/include/linux/i2c/twl4030-madc.h | ||
- | This handles reading various ADCs to readout voltages | + | This handles reading various ADCs to readout voltages and currents. |
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
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 | |
- | + | http://wiki.maemo.org/Mer/Documentation/BME_Protocol (N810!) | |
- | + | ||
- | + | ||
- | A nice little experiment to investigate the | + | 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 | * plug in Nokia wallwart charger | ||
- | * | + | * ->stop bme |
- | * wait max 32s until | + | * 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]] | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | [ | + |
Learn more about Contributing to the wiki.