Swollen battery - how to prevent it in mobile lab? Is UFT Mobile can help there?

Swollen battery - how to prevent it in mobile lab? Is UFT Mobile can help there?

Symptoms

There are a number of possible reasons that a lithium-ion battery can swell. The most common cause is an overcharge of the battery, which causes a chemical reaction between the electrodes and the electrolyte, resulting in the release of heat and gases that expand inside the battery, causing the casing to swell or even to split open. Swelling can also result from a poor cell build, somewhat common in very low-grade batteries from some overseas manufacturers. Mechanical damage to the battery, such as striking a hard surface and denting the casing, can definitely cause a swelling condition, as can exposure to excessive high temperatures. Finally, lithium-ion batteries can swell as a result of a deep discharge of the cells; usually lithium-ion batteries are governed by circuitry (sometimes called a battery management system or BMS) that prevents this from happening.

Diagnosis

This process produces a great deal of heat, which in turn warms the gases inside the battery, causing them to expand. Lithium-ion batteries are not designed to be ventilated, and so the the battery’s casing expands with the gasses, distorting and warping its appearance into that familiar swollen look.

Solution

The device battery should be monitored for his temperature. There is also an indication of "battery health", but it is available only for Android devices.

When device battery temperature is higher than expected, the device can be moved to specific workspace that can be used for the UFTM Administrator to inspect and resolve the issue (replace the device battery, etc.).

UFT Mobile version 3.3 introduces a new capability for device states: battery state, WiFi state, screen brightness, etc. in addition to standard metrics for CPU, RAM and Disk.

This information is available on device cart (METRICS properties) as well as via REST API (GET /rest/v2/device/{deviceId}/states).

The example bellow (python with requests) demonstrate usage of this REST API to get devices battery temperature (attached as well in py format):

 

import sys,json, requests
degree_sign= u'\N{DEGREE SIGN}' + 'C'

PROTOCOL = '<HTTP/S>'
PORT = '<PORT>'
SERVER = '<SERVER>'

BASE_URL = PROTOCOL + '://' + SERVER + ':' + PORT + '/rest'
s = requests.Session()
# LOGIN
url = BASE_URL + '/oauth2/token'
headers = {'Accept': 'application/json' , 'Content-Type': 'application/json; charset=UTF-8'}
payload = {'client': '<OAUTH2-TOKEN>' , 'secret': '<OAUTH2-SECRET>' , 'tenant': <TENANT_ID>}

response = s.post(url, headers=headers, data=json.dumps(payload))

if response.status_code == requests.codes.ok:
hp4msecret = response.headers['x-hp4msecret']
access_token = response.json()['access_token']

if response.status_code == requests.codes.ok:
# DEVICES
url = BASE_URL + '/deviceContent'
headers = {'x-hp4msecret': hp4msecret, 'Authorization': 'Bearer ' + access_token}
response = s.get(url, headers=headers)

if response.status_code == requests.codes.ok:
# STATES
for device in response.json():
deviceName = device["deviceName"]
udid = device["udid"]
url = BASE_URL + '/v2/device/' + udid + '/states'
response = s.get(url, headers=headers)
temperature = response.json()['battery']['temperature']
print (deviceName + ": " + str(temperature) + degree_sign)

Labels (1)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2019-12-01 13:00
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.