View Single Post
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#603
Originally Posted by Mentalist Traceur View Post
So that's some initial, non-technical documentation on the conflict between BME and bq27x00_battery. Wish I had the know-how to report the techical details of how this occurs.
I have an educated guess for the reason and type of conflict here.

The easiest (and only?) way to read values from BME is through HAL. One could run a `lshal | grep battery.charge_level.percentage´ command on shell for example, and see what BME thinks is the current value.

However, when the bq module is inserted, it also starts to provide a similarly named value to HAL. Indeed, you can repeat the above lshal command when bq driver is active, and it outputs two (different) values for percentage. Apps that read the percentage this way have a good chance to get confused.

Properly selecting what values to read can be done with -u switch to lshal:
Code:
lshal -u /org/freedesktop/Hal/devices/bme
lshal -u /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0
or by using the hal-device command:
Code:
hal-device bme
hal-device computer_power_supply_battery_bq27200_0
As far as I understand, this is the only kind of conflict there exists between BME and the bq driver.
__________________
Trout have underwater weapons.

Last edited by juise-; 2010-11-03 at 10:10. Reason: Adding note about hal-device
 

The Following User Says Thank You to juise- For This Useful Post: