MC75A Smart battery App to report number of Charge Cycles on Screen

A Andrea Sada 3 years 5 months ago
1 2 0

Hi All Does anyone have an executable which will read the number of charge cycles on a smart battery on MC75A6 and report the number of cycles on the display. I know it can be done with symscript but I need a single cab file solution which can be pushed out to devices via Afaria. Assistance would be greatly appreciated. 

Please Register or Login to post a reply

2 Replies

S Steve Cundy

You can try the Battery Status utility on the SES-Tools Compass site:      http://compass.mot-solutions.com/doc/397653311/BattStat.zip

R Richard Linsley-Hood

The below source code (though fairly old) should help towards an answer.
// Smart.cpp : Defines the entry point for the console application. //

#include "stdafx.h" #include #include #include #include

 

 

bool GetSmartBatteryInfo(void) { bool result = false; SMART_BATTERY_STATUS SmartBattData = {0}; SmartBattData.StructInfo.dwAllocated = sizeof( SmartBattData ); SmartBattData.StructInfo.dwUsed = sizeof( SmartBattData ); if (RCM_Open() != E_RCM_SUCCESS) return result; if (RCM_GetSmartBatteryStatus( &SmartBattData ) == E_RCM_SUCCESS) { wprintf(TEXT(" Part Number : %s\r\n"), SmartBattData.szBatteryPartNumber); wprintf(TEXT(" Serial Number : %s\r\n"), SmartBattData.szBatterySerialNumber); wprintf(TEXT(" Manufactured : %02d/%02d/%04d\r\n"), SmartBattData.BatteryMfgDate.byMonth, SmartBattData.BatteryMfgDate.byDay, SmartBattData.BatteryMfgDate.wYear); wprintf(TEXT(" Rated Capacity: %4d (mAh)\r\n"), SmartBattData.wBatteryRatedCapacity); wprintf(TEXT(" Charge Cycles : %4d\r\n"), SmartBattData.wBatteryChargeCycles); result = true; } else { wprintf(TEXT("ERROR: Failed to get data\r\n")); } RCM_Close(); return result; }

 

 

 

int _tmain(int argc, _TCHAR* argv[]) { wprintf(TEXT("Smart Battery information\r\n")); wprintf(TEXT("\r\n")); GetSmartBatteryInfo(); wprintf(TEXT("\r\n")); wprintf(TEXT("Any key to continue ")); getwchar(); return 0; }

CONTACT
Can’t find what you’re looking for?