[Gta04-owner] Detecting cable/discharing on USB

Radek Polak psonek2 at seznam.cz
Fri Apr 6 12:58:35 CEST 2012


On Tuesday, April 03, 2012 11:33:19 PM NeilBrown wrote:

> > So the question. How to correctly detect On cable/On Battery? And btw
> > after
> > checking the battery charge, it was only like 70% full. I guess it would
> > have completely discharged if i didnt replug the USB.
> 
> No, it gets down to 3.95V - which for me is about 75% - and then charges up
> again.  We can program that '3.95V' to some other value if we know what
> value to choose.
> 
> See:
> http://lists.goldelico.com/pipermail/gta04-owner/2012-February/001687.html

This night i tried to let GTA04 with my newer bettery on USB charge. In the 
morning everyting was ok. The battery was nealy full.

But with my old battery i can always reproduce that on USB it charges full and 
discharges to zero. I am attaching simple script and output from the script 
that demonstrates it.

I will be glad to provide more info and tests if needed.

Btw here are some other sysfs values, if they can help you:

cat: /sys/class/power_supply/twl4030_ac/online: 0
cat: /sys/class/power_supply/twl4030_ac/current_now: No data available
cat: /sys/class/power_supply/twl4030_ac/voltage_now: No data available

cat: /sys/class/power_supply/twl4030_usb/current_now: No data available
cat: /sys/class/power_supply/twl4030_usb/online: 0
cat: /sys/class/power_supply/twl4030_usb/status: Not charging
cat: /sys/class/power_supply/twl4030_usb/voltage_now: No data available

Regards

Radek
-------------- next part --------------
Fri Apr  6 10:33:14 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Charging
/sys/class/power_supply/bq27000-battery/voltage_now = 4039000
/sys/class/power_supply/bq27000-battery/charge_now  = 665626
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = -453568
===================================================
Fri Apr  6 10:38:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Charging
/sys/class/power_supply/bq27000-battery/voltage_now = 4115000
/sys/class/power_supply/bq27000-battery/charge_now  = 703111
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = -445536
===================================================
Fri Apr  6 10:43:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Charging
/sys/class/power_supply/bq27000-battery/voltage_now = 4144000
/sys/class/power_supply/bq27000-battery/charge_now  = 739347
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = -428043
===================================================
Fri Apr  6 10:48:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3997000
/sys/class/power_supply/bq27000-battery/charge_now  = 746130
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 215985
===================================================
Fri Apr  6 10:53:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3984000
/sys/class/power_supply/bq27000-battery/charge_now  = 732207
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 184926
===================================================
Fri Apr  6 10:58:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3970000
/sys/class/power_supply/bq27000-battery/charge_now  = 718105
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 158151
===================================================
Fri Apr  6 11:03:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3957000
/sys/class/power_supply/bq27000-battery/charge_now  = 704361
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159043
===================================================
Fri Apr  6 11:08:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3947000
/sys/class/power_supply/bq27000-battery/charge_now  = 691152
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 157437
===================================================
Fri Apr  6 11:13:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3933000
/sys/class/power_supply/bq27000-battery/charge_now  = 676336
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 158508
===================================================
Fri Apr  6 11:18:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3923000
/sys/class/power_supply/bq27000-battery/charge_now  = 662592
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 158329
===================================================
Fri Apr  6 11:23:17 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3912000
/sys/class/power_supply/bq27000-battery/charge_now  = 649026
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 206167
===================================================
Fri Apr  6 11:28:17 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3886000
/sys/class/power_supply/bq27000-battery/charge_now  = 628498
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159222
===================================================
Fri Apr  6 11:33:17 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3875000
/sys/class/power_supply/bq27000-battery/charge_now  = 614040
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 175644
===================================================
Fri Apr  6 11:38:17 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3875000
/sys/class/power_supply/bq27000-battery/charge_now  = 600295
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159757
===================================================
Fri Apr  6 11:43:18 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3862000
/sys/class/power_supply/bq27000-battery/charge_now  = 586194
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 192780
===================================================
Fri Apr  6 11:48:18 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3844000
/sys/class/power_supply/bq27000-battery/charge_now  = 569058
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 186532
===================================================
Fri Apr  6 11:53:18 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3846000
/sys/class/power_supply/bq27000-battery/charge_now  = 555492
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 11:58:18 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3836000
/sys/class/power_supply/bq27000-battery/charge_now  = 542104
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159400
===================================================
Fri Apr  6 12:03:18 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3828000
/sys/class/power_supply/bq27000-battery/charge_now  = 528717
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:08:19 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3820000
/sys/class/power_supply/bq27000-battery/charge_now  = 515329
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 161542
===================================================
Fri Apr  6 12:13:19 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3812000
/sys/class/power_supply/bq27000-battery/charge_now  = 501763
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 160114
===================================================
Fri Apr  6 12:18:19 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3804000
/sys/class/power_supply/bq27000-battery/charge_now  = 488197
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 161364
===================================================
Fri Apr  6 12:23:19 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3799000
/sys/class/power_supply/bq27000-battery/charge_now  = 474810
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:28:20 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3791000
/sys/class/power_supply/bq27000-battery/charge_now  = 461422
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:33:20 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3786000
/sys/class/power_supply/bq27000-battery/charge_now  = 448035
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159579
===================================================
Fri Apr  6 12:38:20 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3781000
/sys/class/power_supply/bq27000-battery/charge_now  = 434469
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159757
===================================================
Fri Apr  6 12:43:20 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3773000
/sys/class/power_supply/bq27000-battery/charge_now  = 420546
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:48:20 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3767000
/sys/class/power_supply/bq27000-battery/charge_now  = 407158
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:53:21 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3762000
/sys/class/power_supply/bq27000-battery/charge_now  = 393235
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 160293
===================================================
CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3852000
/sys/class/power_supply/bq27000-battery/charge_now  = 566559
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159757
===================================================
Fri Apr  6 11:54:13 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3844000
/sys/class/power_supply/bq27000-battery/charge_now  = 553171
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159757
===================================================
Fri Apr  6 11:59:13 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3836000
/sys/class/power_supply/bq27000-battery/charge_now  = 539605
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159579
===================================================
Fri Apr  6 12:04:13 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3828000
/sys/class/power_supply/bq27000-battery/charge_now  = 526218
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159579
===================================================
Fri Apr  6 12:09:13 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3820000
/sys/class/power_supply/bq27000-battery/charge_now  = 512830
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 160828
===================================================
Fri Apr  6 12:14:14 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3812000
/sys/class/power_supply/bq27000-battery/charge_now  = 499264
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159400
===================================================
Fri Apr  6 12:19:14 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3804000
/sys/class/power_supply/bq27000-battery/charge_now  = 485877
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 160650
===================================================
Fri Apr  6 12:24:14 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3796000
/sys/class/power_supply/bq27000-battery/charge_now  = 472489
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159579
===================================================
Fri Apr  6 12:29:14 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3791000
/sys/class/power_supply/bq27000-battery/charge_now  = 458923
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 161542
===================================================
Fri Apr  6 12:34:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3786000
/sys/class/power_supply/bq27000-battery/charge_now  = 445536
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159400
===================================================
Fri Apr  6 12:39:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3778000
/sys/class/power_supply/bq27000-battery/charge_now  = 431970
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159936
===================================================
Fri Apr  6 12:44:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3773000
/sys/class/power_supply/bq27000-battery/charge_now  = 418047
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 161721
===================================================
Fri Apr  6 12:49:15 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3765000
/sys/class/power_supply/bq27000-battery/charge_now  = 404481
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 174037
===================================================
Fri Apr  6 12:54:16 CEST 2012
/sys/bus/platform/devices/twl4030_usb/vbus          = on
/sys/class/power_supply/bq27000-battery/status      = Discharging
/sys/class/power_supply/bq27000-battery/voltage_now = 3762000
/sys/class/power_supply/bq27000-battery/charge_now  = 390736
/sys/class/power_supply/bq27000-battery/charge_full = 766122
/sys/class/power_supply/bq27000-battery/current_now = 159757
===================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: current.sh
Type: application/x-shellscript
Size: 853 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20120406/85fe0b15/attachment-0001.bin>


More information about the Gta04-owner mailing list