Notices


Reply
Thread Tools
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#701
Originally Posted by Estel View Post
2x nope. It just happens sometime, can't reproduce, but it wasn't "one time mystery error" either. *if* it happens - and I've seen it 2-3 times in last 2 days - it last until reboot.

If it's relevant - I use KP47, with bq27200 enabled as by default.
I've tested on KP47 and had no issue.
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
 

The Following User Says Thank You to 412b For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#702
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.
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#703
Originally Posted by Estel View Post
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.
Attachment missing unfortunatelly )
Polling data from i2c can bring additional overhead to APM and partly is an exception of async nature of wrappers in APM, nevertheless, I'll try to make a beta wrapper module for it ASAP, 'cause at the moment I'm more looking into adding Bleeding Edge to AIS than upgrading AP/APM.
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#704
(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. The apmd thread was so quiet. Maybe the title of this thread could be changed abit to mention apmd or apmonitord?)

Code:
# 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
--reinstalling apmonitord didn't fix the problem, neither does stop+start apmnitord.

The battery icon in the status bar is grey and in the status menu "Start APMD. APMD disconnected".

start apmonitord gives:
# start apmonitord
apmonitord (start) waiting
apmonitord (stop) starting
apmonitord (stop) starting
apmonitord (stop) waiting
start: apmonitord respawning too fast, stopped

Last edited by zimon; 2011-08-29 at 08:38.
 
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#705
Originally Posted by zimon View Post
(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.
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
Originally Posted by zimon View Post
Maybe the title of this thread could be changed abit to mention apmd or apmonitord?)
If only I could (((
 

The Following 2 Users Say Thank You to 412b For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#706
Sorry, of course lack of attachment is my mistake. Here it is:

As for changing topic name - can't you do that by editing Your first post? you should see thread title there...
Attached Files
File Type: txt i2cget_data.txt (4.4 KB, 115 views)
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#707
Originally Posted by Estel View Post
As for changing topic name - can't you do that by editing Your first post? you should see thread title there...
Nope, it doesn't work )))
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#708
Originally Posted by 412b View Post
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
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
lshal does not output anything with "bq"
 
Posts: 462 | Thanked: 550 times | Joined on Sep 2008 @ Moscow
#709
Originally Posted by zimon View Post
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
lshal does not output anything with "bq"
Originally Posted by pali View Post
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)!
(full post)
So at the moment I can only fix bug with BQ module being marked as available.
 

The Following User Says Thank You to 412b For This Useful Post:
Temporal's Avatar
Posts: 323 | Thanked: 189 times | Joined on Oct 2010 @ Brazil
#710
Hi, sorry for bothering, but I believe I have a feature request:

Whilst I love to be able to see the percentage, I find the hours it shows kinda... not really helpful. They almost never match or make much sense. SO, would you mind to take a look at what is implemented on Battery-Eye (not Battery-Graph) on its statistics tab, where it shows almost "exactly" what will happen to your phone based in previous data? (1/3 lowest consumption, 1/3 normal consumption, 1/3 highest consumption)÷(present consumption) and then use this data to make predictions?

I believe something like that would make PyBattery 100 times more useful than it already is.

Thank you!
__________________
Love and Goodness are not a property. Are not a franchising. They are present in each one of us, and must be cultivated with KNOWLEDGE.
 

The Following User Says Thank You to Temporal For This Useful Post:
Reply

Tags
applet, battery, python, statusbar

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:11.