Languages

Menu
Sites
Language
Battery drained Randomly in a Native Sensors Gathering App

 

 

Hi.

We have a 2.3.1 Native App (Launcher + Service + Custom Watch) running on a Gear Fit 2. The Service records ACC/GYROS/GRAVITY/LINEARACC/HRM/ sensors values with the following frequency rate:

* ACC/GYROS/GRAVITY/LINEARCC/: 10 Hz

* HRM: 1 Hz

This is the sensors configuration:

  • The CPU_POWER is locked when the display is off and released when the display is on.

  device_power_request_lock(POWER_LOCK_CPU, 0);

  • And all the sensors have the attribute SENSOR_OPTION_ALWAYS_ON activated.

The Problem

=========

We are running the same App in 10 Gear Fit units at a time. Each one follows this cycle: 18 hours recording data [Gathering stage] and 6 hours sending the gathered data to server while charging [Sending stage]. 

In normal conditions the battery lasts for 18 hours recording constinuously with the above frequencies [Gathering stage], and some times in any random point of this stage the battery starts to drain at an abnormal speed (reducing the battery life to 7 hours instead of 18 hours, that is the expected battery life).

We have realized that when the battery starts to drain at an abnormal speed the frequency rate of the sensors rised just a little (from 9.75 to 9.98 Hz).

Can anyone advice us about possible clues?

 

Responses

3 Replies
K Johnson

So far I know, device power lock causes very fast battery consumption and it's not recommended due to that reason.

You may trace battery usage of your app with different debugging tools i.e. Dynamic Analyzer. It may help you to find out the reason for such power consumption.

Please go through below links.

https://developer.tizen.org/development/tizen-studio/native-tools/debugging-your-app 

https://developer.tizen.org/ko/development/tizen-studio/native-tools/debugging-your-app/dynamic-analyzer

Enrique de la Cal

 

Firstly, thank you for your answer.

 

>  So far I know, device power lock causes very fast battery consumption and it's not recommended due to that reason.

 

But it's the only way to gather sensors data continuously in Tizen 2.3.1 (Gear Fit 2).

 

> You may trace battery usage of your app with different debugging tools i.e. Dynamic Analyzer. It may help you to find out the reason for such power consumption.

 

We did that, storing the battery level in a internal data base. Also we have tried to use the  Dynamic Analyzer but the test last for several days and hours so the buffer of the Tool (Dynamic ANalyzer is stucked). 

 

We will try to restart the service when the battery gradient is above a certain level. 

Best regards.

 

 

 

> Please go through below links.

https://developer.tizen.org/development/tizen-studio/native-tools/debugging-your-app 

https://developer.tizen.org/ko/development/tizen-studio/native-tools/debugging-your-app/dynamic-analyzer

 

K Johnson

Ok, please share the status after trying service restart approach. Moreover, you may follow the workaround posted in this link to avoid using device power lock. Please try the second option described in GEUNSOO KIM's reply.