The Following User Says Thank You to 412b For This Useful Post: | ||
![]() |
2011-08-29
, 06:41
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#702
|
![]() |
2011-08-29
, 07:50
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#703
|
As for kp48, bq27x00 module is depreciated, and can't be used together with bme.
ho ever, all bq27200 (fuel gaude) data can be accessed by other means - via i2cget tools.
I've attached file with method of getting data via i2cget. I've took this from shadowjk's bq27200 script. It need i2cget placed in "./", but maybe You can use i2ctools as dependency and use other path for accessing it.
Of course, it requires root privileges, to access data via i2cget.
Currently, it's only thing lacking in Your wonderful application to be fully compatible with kp48, so, if by any chance, You can replace bq27x00 with this, it would be great.
Of course, method via i2cget works also in kp47 or earlier version, so it's more compatible method.
![]() |
2011-08-29
, 08:35
|
Posts: 1,341 |
Thanked: 708 times |
Joined on Feb 2010
|
#704
|
# uname -a Linux Nokia-N900 2.6.28.10-power48 #1 PREEMPT Mon Aug 22 15:09:51 EEST 2011 armv7l unknown # lsmod|grep bq bq27x00_battery 5264 0 power_supply 7044 1 bq27x00_battery # python -OO /opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py Advanced Power Monitor 0.6.0 RX-51_2009SE_20.2010.36-2_PR_MR0 Loaded modules (2/2): OSVersion_Maemo DeviceName Loading wrappers... LOADING battery Loading packages list... [L] Nokia's BME Alternative [L] Nokia's BME [L] BQ27200 [L] Dummy [L] BQ27200 Alternative Traceback (most recent call last): File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 30, in <module> daemon.run() File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 16, in run self.apm = AdvancedPowerMonitor.apm() File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 89, in __init__ self.__init_wrappers() File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 165, in __init_wrappers self.change_wrapper(key, self.get_available_wrappers(key)[0]) File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 218, in change_wrapper self.__wrappers[key]['object'].finish_init() File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/AbstractWrappers.py", line 35, in finish_init self.__end_init() File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/AbstractWrappers.py", line 43, in __end_init self.get_status() File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/battery/BatteryBQ27200.py", line 68, in get_status self.handle_battery_status(0, [], True) File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/battery/BatteryBQ27200.py", line 37, in handle_battery_status values['voltage'] = int(self.interfaces['BQ27200'].GetPropertyInteger(u'battery.voltage.current')) File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in __call__ **keywords) File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0 # ls -Rls /opt/maemo/usr/lib/advanced-power-monitor/ /opt/maemo/usr/lib/advanced-power-monitor/: 16 -rw-r--r-- 1 root root 14226 Jul 29 11:26 AdvancedPowerMonitor.py 20 -rw-r--r-- 1 root root 16484 Aug 26 21:41 AdvancedPowerMonitor.pyc 4 -rw-r--r-- 1 root root 97 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 648 Jul 25 16:17 apmdaemon.py 4 drwxr-xr-x 4 root root 4096 Aug 26 21:41 modules 4 drwxr-xr-x 3 root root 4096 Aug 29 11:15 wrappers /opt/maemo/usr/lib/advanced-power-monitor/modules: 4 -rw-r--r-- 1 root root 3727 Apr 6 03:00 AbstractModules.py 8 -rw-r--r-- 1 root root 8150 Aug 26 21:41 AbstractModules.pyc 4 -rw-r--r-- 1 root root 47 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 150 Aug 26 21:41 __init__.pyc 4 drwxr-xr-x 2 root root 4096 Aug 26 21:41 device_name 4 drwxr-xr-x 2 root root 4096 Aug 26 21:41 os_version /opt/maemo/usr/lib/advanced-power-monitor/modules/device_name: 4 -rw-r--r-- 1 root root 334 Apr 6 03:00 DeviceName.py 4 -rw-r--r-- 1 root root 964 Aug 26 21:41 DeviceName.pyc 4 -rw-r--r-- 1 root root 58 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 162 Aug 26 21:41 __init__.pyc /opt/maemo/usr/lib/advanced-power-monitor/modules/os_version: 4 -rw-r--r-- 1 root root 360 Apr 6 03:00 OSVersion_Maemo.py 4 -rw-r--r-- 1 root root 991 Aug 26 21:41 OSVersion_Maemo.pyc 4 -rw-r--r-- 1 root root 57 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 161 Aug 26 21:41 __init__.pyc /opt/maemo/usr/lib/advanced-power-monitor/wrappers: 8 -rw-r--r-- 1 root root 5028 Jul 29 11:35 AbstractWrappers.py 12 -rw-r--r-- 1 root root 9426 Aug 26 21:41 AbstractWrappers.pyc 4 -rw-r--r-- 1 root root 48 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 151 Aug 26 21:41 __init__.pyc 4 drwxr-xr-x 2 root root 4096 Aug 26 21:41 battery /opt/maemo/usr/lib/advanced-power-monitor/wrappers/battery: 4 -rw-r--r-- 1 root root 515 Jul 23 02:05 AbstractBattery.py 4 -rw-r--r-- 1 root root 1289 Aug 26 21:41 AbstractBattery.pyc 4 -rw-r--r-- 1 root root 3217 Jul 26 00:50 BatteryBME.py 8 -rw-r--r-- 1 root root 4938 Aug 26 21:41 BatteryBME.pyc 4 -rw-r--r-- 1 root root 3676 Jul 28 13:28 BatteryBMEA.py 8 -rw-r--r-- 1 root root 5292 Aug 26 21:41 BatteryBMEA.pyc 4 -rw-r--r-- 1 root root 3019 Jul 29 11:19 BatteryBQ27200.py 8 -rw-r--r-- 1 root root 4402 Aug 26 21:41 BatteryBQ27200.pyc 4 -rw-r--r-- 1 root root 3406 Jul 29 11:36 BatteryBQ27200A.py 8 -rw-r--r-- 1 root root 4750 Aug 26 21:41 BatteryBQ27200A.pyc 4 -rw-r--r-- 1 root root 489 Jul 29 13:00 BatteryDummy.py 4 -rw-r--r-- 1 root root 1507 Aug 26 21:41 BatteryDummy.pyc 4 -rw-r--r-- 1 root root 56 Apr 6 03:00 __init__.py 4 -rw-r--r-- 1 root root 159 Aug 26 21:41 __init__.pyc
![]() |
2011-08-29
, 08:53
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#705
|
(After vacation and happily forgotten all N900-tweaking stuff I couldn't recognize this "Pybattery" thread was related to problems why my "apmd" doesn't work anymore after upgrading from KP47 to KP48.
lshal | grep bq
![]() |
2011-08-29
, 15:27
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#706
|
The Following User Says Thank You to Estel For This Useful Post: | ||
![]() |
2011-08-29
, 20:06
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#707
|
![]() |
2011-08-29
, 21:47
|
Posts: 1,341 |
Thanked: 708 times |
Joined on Feb 2010
|
#708
|
What version of APM do you have? If less than 0.6.0-2, try upgradeing. But I think you've got the bug posted by Estel. I;ll take a closer look in the evening. It seems not to be hard to fix.
Can uoy also attach output of
Code:lshal | grep bq
Nokia-N900:~/battery# lshal | grep bq Nokia-N900:~/battery# dpkg -l advanced-power-monitor Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii advanced-power 0.6.0-2 Daemon providing information via D-Bus about
![]() |
2011-08-30
, 06:25
|
Posts: 462 |
Thanked: 550 times |
Joined on Sep 2008
@ Moscow
|
#709
|
lshal does not output anything with "bq"Code:Nokia-N900:~/battery# lshal | grep bq Nokia-N900:~/battery# dpkg -l advanced-power-monitor Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii advanced-power 0.6.0-2 Daemon providing information via D-Bus about
I know, that it is not possible to use bq module in v48. Patch which disabled autoloading (in board code) also disable registring board info. So solution is disable autoloading by blacklist. Now it is fixed on git (will be released in v49). So v48 cant use bq module (who want must downgrade to v47 or upgrade from git)!
The Following User Says Thank You to 412b For This Useful Post: | ||
![]() |
2011-09-08
, 01:05
|
|
Posts: 323 |
Thanked: 189 times |
Joined on Oct 2010
@ Brazil
|
#710
|
The Following User Says Thank You to Temporal For This Useful Post: | ||
Nevertheless when it happens again as root edit /opt/maemo/usr/lib/hildon-desktop/advpowlib/core/maemo5.py
Remove # sign in line # self.__create_settings_box() (about line 112).
Then run that often posted line (python /usr/lib/hildon-desktop/advanced_power.py 1) and attach log. Also as root run 'stop apmonitord && start apmonitord' and attach /home/user/apmonitord.log
Advanced Power, Advanced Interface Switcher, MediaBox Home Widget