Reply
Thread Tools
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#951
Problem is that bq27200 chip report only one value (there is no active or ide using). New hald-addon-bme sending that dbus signal too, but both values are same.

See function hald_addon_bme_timeleft_info in https://gitorious.org/rx51-bme-repla...ld-addon-bme.c
 

The Following User Says Thank You to pali For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#952
Originally Posted by pali View Post
Problem is that bq27200 chip report only one value (there is no active or ide using). New hald-addon-bme sending that dbus signal too, but both values are same.

See function hald_addon_bme_timeleft_info in https://gitorious.org/rx51-bme-repla...ld-addon-bme.c
Ok, I understand. But in the file you linked I still see
Code:
...
    else if (battery_info->power_supply_status == STATUS_DISCHARGING)

    {

      CHECK_INT(power_supply_time_to_empty_avg,

            libhal_device_set_property_int (hal_ctx, udi, "battery.remaining_time", battery_info->power_supply_time_to_empty_avg, NULL));

    }
...
As well as...
Code:
...
#define BQ27200_UEVENT_FILE_PATH "/sys/class/power_supply/bq27200-0/uevent"
...
fp = fopen(BQ27200_UEVENT_FILE_PATH,"r")
...
   while(fgets(line,sizeof(line),fp))

  {

    char*tmp;

    tmp = strchr(line,'=');
...
      else if(!strcmp(line,"POWER_SUPPLY_TIME_TO_EMPTY_AVG"))

        battery_info->power_supply_time_to_empty_avg = atoi(tmp);
...
But I don't have "/sys/class/power_supply/bq27200-0/uevent" on my main n900 (i have bme, not any open replacement and neither your kernel module). So I understand this code and I think I know now what you mean.

1. your kernel module reports values in its own way and it's irrelevant here
2. hald-addon-bme from rx51-bme-replacement reports value ONLY via battery.remaining_time
3. hald-addon-bme from stock firmware (the closed one) reports value via battery.remaining_time AND reports two values via a signal I desribed earlier.

So, the rx51-bme-replacement doesn't implement the signal emission, do I get it right? (if this is true, the code of your widget could become even more complex and have 3 possible reading options, not 2 )

AND, if I understand you correctly, the chip reports only one value and it's the one reported in battery.remaining_time and the values reported in a signal:
Code:
signal sender=:1.27 -> dest=(null destination) serial=48 path=/com/nokia/bme/signal; interface=com.nokia.bme.signal; member=battery_timeleft
   uint32 4260
   uint32 180
are calculated by some equation we don't know. Do I get you right?

If I understood you, is it possible that the value reported by chip (which we put in battery.remaining_time) is e.g. some kind of current (not as "electric current" but as "right here right now") power usage (some encoded value, e.g. 3600 means 500mA, 7200 means 600mA, 10800 means 700mAh, etc. - but the mA numbers are totally made up), I just noticed that these values depend on device usage - the more cpu and ram is active atm, the higher that number is (that's why I came to this conclusion, but feel free to educate me and proove me wrong, or just write I'm wrong and where I can read more about it to become less of a ***** and more of a genius ).

edit: by the way, thanks for answering.

edit2: in order not to spam i answered for the next Pali's message at http://talk.maemo.org/showthread.php...28#post1291628 .

Last edited by misiak; 2012-11-07 at 23:12.
 

The Following 4 Users Say Thank You to misiak For This Useful Post:
Posts: 424 | Thanked: 196 times | Joined on Mar 2010 @ Sweden
#953
Hello again.
Still some stange stuff here after the update to the new deb.
I have done a few reboots too.


Link to lshal dump.
http://toxaris.com/lshal.txt

Last edited by toxaris; 2012-11-07 at 21:33.
 

The Following 2 Users Say Thank You to toxaris For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#954
Originally Posted by toxaris View Post
Hello again.
Still some stange stuff here after the update to the new deb.
I have done a few reboots too.


Link to lshal dump.
http://toxaris.com/lshal.txt
Ok, from your output and log I see that you stopped bme and loaded bq27x00 and bq2415x drivers.

Battery design capacity (which is 0) is read from rx51_battery kernel driver, which is not loaded. But this driver is part of kernel-power v52 (prerelease), so it is not present in v51.

If status menu plugin cannot read design capacity it will try to read last full capacity.

But in HAL log is missing "battery.reporting.last_full" in /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0 (for bq27200 chip). This can be problem if learning cycle of bq27200 was not complete. Can you write output of this?

$ cat /sys/class/power_supply/bq27200-0/uevent
$ cat /sys/class/power_supply/bq27200-0/charge_full
 

The Following 2 Users Say Thank You to pali For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#955
@misiak,

hald-addon-bme from rx51-bme-replacement reports both "battery.remaining_time" HAL key and "battery_timeleft" dbus signal. In previous post I wrote that funcion for generating singal is "hald_addon_bme_timeleft_info". But that function (you can see) sending both values same as "battery.remaining_time".

How BME calculating that 2 times nobody know. What I know is that BME not using time value from bq chip.

For bq27200 chip see datasheet on https://focus.ti.com/docs/prod/folde...t/bq27200.html There is maybe also info how chip calculate that value.
 

The Following 6 Users Say Thank You to pali For This Useful Post:
Posts: 306 | Thanked: 38 times | Joined on Dec 2009 @ Austria
#956
is it normal, that the battery only charging to 94% and the led for low battery starts at 0% to blink?
and the remaining time disappears at lower percentages?
 
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#957
Percentage is calculated as current/design_capacity. So if your battery is older then it is not possible to charge it to design capacity.

Battery low signal is sent by hald-addon-bme (BME version or new replacement).

If remaining time is reported as 0, then it disappear.

For values look to lshal.
 

The Following 2 Users Say Thank You to pali For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#958
Originally Posted by pali View Post
I created new battery status area plugin (based on old MAG version). It work with BME or with bq27x00_battery kernel driver. It is like original Nokia version, plus display percentage, remaining time and capacity.

Please test it and write if this can go to CSSU :-)

Source: https://gitorious.org/~pali/communit...applet-battery
DEB: http://atrey.karlin.mff.cuni.cz/~pal....0-1_armel.deb
Wow, well done!
If it works flawlessly, I'd like to see it in CSSU

This should get on with Advanced Power (maybe conflict?)
I didn't test it, but it'd have great advantage over Adv. Power if it showed in which measure the time left is counted
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 31 | Thanked: 95 times | Joined on Apr 2012
#959
Just installed the new battery indicator on fresh cssu-thumb. Works like a charm after a reboot, thanks.
 
Posts: 424 | Thanked: 196 times | Joined on Mar 2010 @ Sweden
#960
Originally Posted by pali View Post
Ok, from your output and log I see that you stopped bme and loaded bq27x00 and bq2415x drivers.

Battery design capacity (which is 0) is read from rx51_battery kernel driver, which is not loaded. But this driver is part of kernel-power v52 (prerelease), so it is not present in v51.

If status menu plugin cannot read design capacity it will try to read last full capacity.

But in HAL log is missing "battery.reporting.last_full" in /org/freedesktop/Hal/devices/computer_power_supply_battery_bq27200_0 (for bq27200 chip). This can be problem if learning cycle of bq27200 was not complete. Can you write output of this?

$ cat /sys/class/power_supply/bq27200-0/uevent
$ cat /sys/class/power_supply/bq27200-0/charge_full
Hello.

Well maybe its about time to upgrade to KP52 then.
Today Im running CSSU Testing, and CSSU Thumb.
Is it safe to just install the KP52 debs or do I have to wait until CSSU Thumb is based upon KP52?

Anyway the output from uevent i attached.
And I get this error when I
Code:
cat /sys/class/power_supply/bq27200-0/charge_full
cat: read error: no data available
Attached Files
File Type: txt uevent.txt (401 Bytes, 100 views)
 

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

Tags
cssu testing


 
Forum Jump


All times are GMT. The time now is 16:13.