Menu

#81 Battery consumption

Accepted
nobody
None
Medium
Task
2013-08-23
2010-07-10
Anonymous
No

Originally created by: egcros...@gmail.com
Originally owned by: r3gis...@gmail.com

Maybe this issue is too vague to register as a "defect" but as there is no discussion forum for CSipSimple, here goes:

I was using Sipdroid for a while, but I strongly dislike their UI decisions so I am trying alternative SIP agents. I actually talk very little, maybe a few minutes per day but I have SIP agent registered at all times when under WiFi coverage. When I run Sipdroid, by the end of the day I have battery indicator at about 50%. When I run CSipSimple instead, with all other activities basically the same, by the end of the day the battery indicator is yellow or even red (< 20% I think).

This issue and loosing registration (issue #67 comment #4) are two things that makes this program less acceptable to me than Sipdroid. Otherwise, I am happy with the UI and satisfied with stability.

HTC Desire, Android 2.1, CSipSimple pre5.

Related

Tickets: #1136
Tickets: #204
Tickets: #326
Tickets: #522
Tickets: #67
Tickets: #676
Tickets: #724
Tickets: #744
Tickets: #832

Discussion

<< < 1 2 3 4 5 6 > >> (Page 4 of 6)
  • Anonymous

    Anonymous - 2011-04-26

    Originally posted by: 304...@gmail.com

    No problem for me more. Samsung Spica, Froyo 2.2.
    I have disabled STUN, ICE (temporarily I think) and enabled "Use mode Audio API" in extended mode (helps release Spica's speaker after call).
    But recently was CSIPSimple busyloop after 5 days of running (night build of 11 April). Battery was hot, in CPU I just updated CSIPSimple, will see if this repeats.

     
  • Anonymous

    Anonymous - 2011-05-03

    Originally posted by: jayz...@gmail.com

    I'm using PowerTutor app and it's showing that the radio is pulsing very frequently even when the I disabled all network answer & callout forms (GPRS, EDGE, 3G, Wifi...). Also closed the app via 'disconnect' option, and verified the service shut down in Settings > Applications > Running Services. The only way I could get the pulsing to stop was to toggle off/on the Data connection in Android Settings. There seems to be a bug somewhere.

     
  • Anonymous

    Anonymous - 2011-05-03

    Originally posted by: r3gis...@gmail.com

    @jayz : are you using the market version or the nightly build? The market version has known imperfections regarding battery usage that are fixed in nightly build.

     
  • Anonymous

    Anonymous - 2011-05-03

    Originally posted by: jayz...@gmail.com

    I was using the market version, but just installed nightly build 822 and still the same issue.

    Some other notes about the latest nightly build during my brief testing to a landline:

    Noticed where double incoming calls would show up, and I can't answer either, or if I "throw away" one, it disconnects the call. I think I have to back out of the app completely instead of using the home key to escape to get rid of this problem. On the bright side the ringtone sound plays when the double incoming appears, but when single incoming call appears, ringtone is silent.

    My Acer Liquid (android 2.2) has weak speakers for some reason and if I set the audio amplification to anything higher than 1.0, I get no audio at all. the mic gain I have to turn down to 0.5, otherwise if at 1.0 it gets staticky if my voice gets high.

     
  • Anonymous

    Anonymous - 2011-05-04

    Originally posted by: r3gis...@gmail.com

    About the double call : did you activate (or have the option active) Settings > Call settings > allow multiple calls?
    In fact when you are registered twice on a sip provider (which may occur if your sip provider does not fully respect sip standard or if the sip connection was not 'disconnected' by csipsimple (connection lost or app uninstall).
    In this case your provider may call you twice. You should be able to answer by drag and droping one of the two calls on the upper part of the screen. (you'll have a missed call log in this case, but nothing hurting).

    That's why I've introduced the allow multiple calls option, it's in order to prevent regression for users that already receive two calls from their sip provider but are saved thanks to the fact csipsimple did support only one call in previous releases.
    Now the allow multiple calls should be disabled by default, and guys that enable it must be aware about the fact their sip provider has to support rfc correctly (or if not, csipsimple has to have the corresponding account configured to rewrite contact in legacy mode), and that in case of connection lost they can have this weird behavior.

     
  • Anonymous

    Anonymous - 2011-05-08

    Originally posted by: dutyan...@gmail.com

    HTC Desire HD, stock Android, CSipsimple version from Market.

    Configured strictly for outgoing calls, all Android integration disabled (as it's certainly inconvenient to select transport every time when you make a call).

    After a SIP call, the device lost ~50% of battery charge overnight, with partial wake usage 100%, due to CSipCall lock (judging by battery statistics).

    Too bad there is no certain way just to switch everything off, completely stop the CSipSimple and forget about any potential issues (except for uninstalling, but install/uninstall every time to make a SIP call seems a bit impractical :) ).

     
  • Anonymous

    Anonymous - 2011-05-08

    Originally posted by: r3gis...@gmail.com

    @dutyan : this one is fixed in nightly build version that will land soon on the android market.

     
  • Anonymous

    Anonymous - 2011-05-09

    Originally posted by: k...@laberteaux.org

    Now that I got the echo thing resolved (issue 119), I am focusing on battery performance.  I use mostly over 3g.  From reading this thread, it seems that the main two parameters (since I'm mostly not using wifi) is the keep alive and the re-registration.  If I want to eliminate the keep alive for mobile, can I just set it to -1?

    While the purpose of the keep alive is clear to me, what does register timeout and register delay before refresh (which is currently set to -1) do?  When the register timeout expires, does the client un-register, then re-register?  What is the purpose?

     

    Related

    Tickets: #119

  • Anonymous

    Anonymous - 2011-05-09

    Originally posted by: r3gis...@gmail.com

    About the keep alive thing : in fact no -1 will not disable it. There is no way to disable this in fact. An equivalent to disable it would be to set it to the time of registration timeout of you sip provider.
    In fact the re-registration is done by pjsip (in C layer). Previously keep alive was also done in C layer. The problem is that C layer has no way to tell the CPU to wake up at regular interval. Only android java API allow that.
    In consequence I did hacks in pjsip code to disable their keep alive mechanism (which was per account), and replace by one managed in java part of the app.
    As consquence the keep alive mechanism will not only be useful to send blank packets to the stream but also to wake up the cpu at regular interval. As consequence in worse case keep alive should be at least the value of the registration timeout.

    About the "register delay before refresh". This is something that has been introduced by pjsip really recently. In fact it represent the time just before the renewal of the registration.
    I'll take an example :
    CSipSimple config : register timeout : 3000 sec & register delay before refresh : 10s
    * pjsip send register timeout when registering (say 3000 sec)
    * the server register the client and tell that finally this registration will be valid for 1800 sec
    * => pjsip will try to re-register in 1800 s - 10 s

    In register delay before refresh -1 means to keep the default value of pjsip (it's 5s if I do not mistake).

     
  • Anonymous

    Anonymous - 2011-05-09

    Originally posted by: k...@laberteaux.org

    Thanks, your example makes it very clear!

    r3gis, I am sure that if I sent you a log file, you could determine the optimal (or at least reasonable) values to set for keep alive and register time out.  But could you give a quick tutorial here (where everyone can see) of what to look for in the log file?  If it is too complicated, I will just send you a log file.

     
  • Anonymous

    Anonymous - 2011-05-09

    Originally posted by: yok...@gmail.com

    Running the latest v.0.02-00 from the market.

    I suppose that registration process should happen on a regular basis (and no more then it's being required). But here is example what I see in FreeSWITCH log:
    2011-05-09 11:08:04.133718
    2011-05-09 11:10:22.477473
    2011-05-09 11:16:59.028847
    2011-05-09 11:31:55.939492
    2011-05-09 11:46:56.775483
    2011-05-09 12:02:23.756731
    2011-05-09 12:03:43.732958
    2011-05-09 12:04:58.482242
    2011-05-09 12:11:29.832046
    2011-05-09 12:26:50.424808
    2011-05-09 12:42:52.693418
    2011-05-09 12:58:54.839573
    2011-05-09 13:14:41.931381
    2011-05-09 13:16:02.722050
    2011-05-09 13:17:22.370872
    2011-05-09 13:18:36.841319
    2011-05-09 13:19:17.116459
    2011-05-09 13:29:56.650829
    2011-05-09 13:46:16.195421
    2011-05-09 14:02:03.438599
    2011-05-09 14:18:05.042140
    2011-05-09 14:19:25.315967
    2011-05-09 14:19:57.551677
    2011-05-09 14:25:40.658197
    2011-05-09 14:26:21.806545
    2011-05-09 14:27:21.821645

    Cell phone and SIP server was completely idle at the time of the test. All settings are default. Registration supposed to happen every 15 min (900 sec). But log above shows it's not the case...

    Why registration is so irregular?

    Obviously it leads to two problems:
    1. drain move power (unnecessary frequent communications with server)
    2. potential of loosing registration for a while (and it can't get incoming calls at that time)

     
  • Anonymous

    Anonymous - 2011-06-14

    Originally posted by: ber...@gmail.com

    Samsung Galaxy S, Froyo (2.2.1), no custom rom, csipsimple from android market,

    Thank you very much for this little addon to android - very appreciated! It even works through an OpenVPN tunnel to my home router (unlike sipdroid).

    But the battery drain is a big issue, even when all sip accounts are disconnected. Usually my phone looses 2% per ~8 hour night with all data connections disabled. With csipsimple running in background (no sip accounts connected) i lost ~30% power one night.

    I use the app for outgoing calls only. So i would also prefer to have an option to shutdown csipsimple completely because i dont need an running background service for incoming calls/etc.

    Workaround: for the time being i use "Bloat Freezer - Root" to 'freeze' csipsimple.

     
  • Anonymous

    Anonymous - 2011-06-14

    Originally posted by: r3gis...@gmail.com

    @ber... :
    * did you try the 0.02-02? it should fix the crazy mode that drained battery.
    * The option to shut down csipsimple is already available, press menu and disconnect... that's it :)

     
  • Anonymous

    Anonymous - 2011-06-14

    Originally posted by: ferna...@bugabundo.net

    r3gis actually i've been meaning to talk to you about that: the Disconnect option stop working a few nightlies ago. it used to close the app, now it keeps running

     
  • Anonymous

    Anonymous - 2011-06-14

    Originally posted by: ber...@gmail.com

    i installed the 0202 two(?) days ago. didnt have time to gather some 'statistically reliable' data about the runtime til now ...
    but i can confirm, the way ->menu ->disconnect didnt work for me - even with build 0202. battery loosing power much faster than without csip. and killing the service with a taskmanager is no solution: csipsimple restarts itself after a few minutes.

     
  • Anonymous

    Anonymous - 2011-06-15

    Originally posted by: r3gis...@gmail.com

    About menu > disconnect problem, that's strange I do not reproduce. What are your global setting on availability of csipsimple ? (always available? on wifi? for outgoing? and is the allowed over 3g activated?).

     
  • Anonymous

    Anonymous - 2011-06-15

    Originally posted by: ferna...@bugabundo.net

    We should move this to a new bug.
    I have always available, wifi and 3G, incoming and outgoing

     
  • Anonymous

    Anonymous - 2011-06-15

    Originally posted by: r3gis...@gmail.com

    I did a new build on nightly build website can you try and let me know if it helps with disconnect option?

     
  • Anonymous

    Anonymous - 2011-06-15

    Originally posted by: ber...@gmail.com

    for your information: integration into android dialer NO, outgoing connections only,3G allowed.

    923 is installed and i'll monitor what happens after "disconnect" ...

    thanks!

     
  • Anonymous

    Anonymous - 2011-06-16

    Originally posted by: r3gis...@gmail.com

    Unfortunately the fix of [r932] has really bad side effects. So I reverted things. I open a new issue to track a clean fix for that point (issue 1066)

     

    Related

    Commit: [r932]
    Tickets: #1066

  • Anonymous

    Anonymous - 2011-06-23

    Originally posted by: bacon.li...@live.com

    #88
    > option to shut down csipsimple is already available, press menu and disconnect

    Consider option to integrate with tasker (application) to allow it to kill CsipSimple by matching criteria like time of day or battery %

    http://tasker.dinglisch.net/

     
  • Anonymous

    Anonymous - 2011-07-02

    Originally posted by: ber...@gmail.com

    there is still some unwanted activity in backround going on after 'disconnect'.
    i am using the same config as before: NO integration into android dialer, outgoing only, 3G YES.
    tonight i lost ~25% battery, while the expected drain without csipsimple was around 5-10% in that period.
    later i looked into a taskmanager after using the phone a bit and csipsimple disappeared - ok ... then i came back to the phone after a while and when i got the unlock-screen to enter my pin (not my sim-card pin, phone did not restart in between), i saw "(s?)ip registered" coming up in the status bar.
    i accessed csipsimple via status bar and had to re-enter the global settings on availability - my settings were lost!

     
  • Anonymous

    Anonymous - 2011-07-02

    Originally posted by: r3gis...@gmail.com

    About tasker integration, tasker just like locale, is not opensource software. I don't want to give an advantage to an non opensource software. As consquence I planned to do something for this stuff. Both locale and tasker use the same API. As consequence I'll soon create a new project that is an opensource alternative to this closed source application. Then it will be possible to use my new project or tasker or locale with a new plugin for CSipSimple. But it took time because I have to create this new alternative to these closed source programs.

    About the loose of settings, another users had this problem too.
    It was cause he used a buggy alternative ROM (and when he migrated settings of apps before migration was duplicated in two places). You should search on the issue list (even on closed issue), he explained how to solve the problem. Could also be linked to how and where the app is installed on your android system. Actually CSipSimple use very basic feature of android system on settings so if you loose settings that's more likely cause android os do something weird with preference database.
    (Could also be linked to the backup/restore feature, did you use it?) If you want to follow up, maybe worth to open an new issue about this point.

     
  • Anonymous

    Anonymous - 2011-07-03

    Originally posted by: ber...@gmail.com

    the disappearing settings can be related to a known bug on samsungs 2.2.1, where some apps cannot save their values. thanks for that hint. i did use the restore feature - but thats not the topic here and not so important for me now.

    csipsimple got unloaded from androids memory after disconnect (no csip in taskmanager anymore), but why does it restart itself later on? i guess there is a runnning service which causes the battery drain and restarts the app.
    i would really like to have an option to shut down csipsimple completely. or am i the only one with this wish?

     
<< < 1 2 3 4 5 6 > >> (Page 4 of 6)

Log in to post a comment.