Other Parts Discussed in Thread: EV2400, GPCCHEM
We are trying to communicate with the Fuel gauge using the i2c-tools and we are able successfully retrieve couple of properties from fuel gauge like current_now, voltage_now, device_id etc. But when we are reading the battery capacity, it always returns "0". To Calibrate the Fuel gauge using host System calibration method we referred Host System calibration but it doesn't seems to be working.
We followed the steps provided there,
Before executing the below commands, the CALMODE is being set, so we tried exiting the calibration mode, but it doesn't have any effect.
send_subCommand(0x00, 0x2D); //Enable Calibration mode send_subCommand(0x00, 0x81); //Enter Calibration mode send_subCommand(0x00, 0x00); send_Command(0x00); unsigned char buffer[2] = { 0x00, 0x00 }; _delay_cycles(10000); I2C_read(buffer, 2);
So we are not very sure whether we are doing is right.
Are there any references w.r.t to i2c programming explaining how to send command and sub-command to the Fuel gauge?