View Single Post
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#530
Originally Posted by colin.stephane View Post
Hi pali,

The new driver bq27x00_battery does not report properly parameters :

Here is output from the new driver :

Code:
-bash-2.05b# lshal -u /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0
udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0'
  battery.charge_level.current = 0  (0x0)  (int)
  battery.charge_level.design = 2056  (0x808)  (int)
  battery.charge_level.last_full = 1531  (0x5fb)  (int)
  battery.charge_level.percentage = 0  (0x0)  (int)
  battery.charge_level.rate = 161  (0xa1)  (int)
  battery.is_rechargeable = true  (bool)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.reporting.current = 0  (0x0)  (int)
  battery.reporting.design = 2056  (0x808)  (int)
  battery.reporting.last_full = 1531  (0x5fb)  (int)
  battery.reporting.rate = 161  (0xa1)  (int)
  battery.reporting.technology = 'Li-ion'  (string)
  battery.reporting.unit = 'mAh'  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.voltage.current = 3757  (0xead)  (int)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Generic Battery Device'  (string)
  info.subsystem = 'power_supply'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'power_supply'  (string)
  linux.sysfs_path = '/sys/class/power_supply/bq27200-0'  (string)
And here is output from bme :

Code:
-bash-2.05b# lshal -u /org/freedesktop/Hal/devices/bme
udi = '/org/freedesktop/Hal/devices/bme'
  battery.charge_level.capacity_state = 'ok'  (string)
  battery.charge_level.current = 3  (0x3)  (int)
  battery.charge_level.design = 8  (0x8)  (int)
  battery.charge_level.last_full = 0  (0x0)  (int)
  battery.charge_level.percentage = 25  (0x19)  (int)
  battery.charge_level.unit = 'bars'  (string)
  battery.is_rechargeable = true  (bool)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.remaining_time = 0  (0x0)  (int)
  battery.remaining_time.calculate_per_time = false  (bool)
  battery.reporting.current = 311  (0x137)  (int)
  battery.reporting.design = 1241  (0x4d9)  (int)
  battery.reporting.last_full = 0  (0x0)  (int)
  battery.reporting.unit = 'mAh'  (string)
  battery.type = 'pda'  (string)
  battery.voltage.current = 3684  (0xe64)  (int)
  battery.voltage.design = 4200  (0x1068)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.addons = {'hald-addon-bme'} (string list)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Battery (BME-HAL)'  (string)
  info.subsystem = 'unknown'  (string)
  info.udi = '/org/freedesktop/Hal/devices/bme'  (string)
  maemo.charger.connection_status = 'disconnected'  (string)
  maemo.charger.type = 'none'  (string)
  maemo.rechargeable.charging_status = 'off'  (string)
  maemo.rechargeable.positive_rate = false  (bool)

Oviously, the corrects values are the ones from bme.

Hope it help ...

A++

PS : I have also posted same message here : http://talk.maemo.org/showpost.php?p...&postcount=799
This values are exported by HAL, not by my program/module, so I cannot change it. And it is correct, see specification battery.charge_level of HAL. BME has bad values (it use its own values which is not correct for HAL).

Do not create duplicate messages!!! (Remove duplicate from other threads!)
 

The Following 5 Users Say Thank You to pali For This Useful Post: