Editing Mer/Documentation/BME Protocol
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | + | This documentation is entirely for the purpose of implementing software gathering battery information on Nokia Internet Tablets, not alteration of battery management state. | |
- | + | ||
- | This documentation is entirely for the purpose of implementing software gathering battery information on Nokia Internet Tablets, not alteration of battery management state | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
Existing code: | Existing code: | ||
Line 60: | Line 54: | ||
struct emsg_bme_bulk_reply { | struct emsg_bme_bulk_reply { | ||
- | uint32 unknown1; | + | uint32 unknown1; |
- | uint32 unknown2; | + | uint32 unknown2; |
- | uint32 unknown3; | + | uint32 unknown3; |
- | uint16 sw_status; // Battery monitor SW status | + | uint16 sw_status; // Battery monitor SW status |
uint16 instaneous_battery_voltage; // Instantaneous battery voltage (mV) | uint16 instaneous_battery_voltage; // Instantaneous battery voltage (mV) | ||
uint16 // Remaining standby time to battery low (mins) | uint16 // Remaining standby time to battery low (mins) | ||
- | uint16 unknown4; | + | uint16 unknown4; |
- | uint16 unknown5; | + | uint16 unknown5; |
uint16 unknown6; | uint16 unknown6; | ||
uint16 // Battery monitor check voltage (mV) | uint16 // Battery monitor check voltage (mV) | ||
- | uint16 // Battery low warning interval counter | + | uint16 // Battery low warning interval counter |
uint16 // Double median filtered battery voltage | uint16 // Double median filtered battery voltage | ||
uint16 // Initial battery monitor voltage (mV) | uint16 // Initial battery monitor voltage (mV) | ||
- | uint16 // Time per battery bar (mins) | + | uint16 // Time per battery bar (mins) |
uint16 // DMF voltage sampled at first battery low (mV) | uint16 // DMF voltage sampled at first battery low (mV) | ||
uint32 // Average phone current (uA) | uint32 // Average phone current (uA) | ||
Line 81: | Line 75: | ||
uint16 // Largest TX-Off/On voltage difference (mV) | uint16 // Largest TX-Off/On voltage difference (mV) | ||
uint8 // Battery bar level log mask | uint8 // Battery bar level log mask | ||
- | uint8 // Previous battery bar level | + | uint8 // Previous battery bar level |
- | uint8 // Battery low reason | + | uint8 // Battery low reason |
- | uint8 // CS state information | + | uint8 // CS state information |
- | uint16 // Number of battery bars | + | uint16 // Number of battery bars |
- | uint16 // Battery type | + | uint16 // Battery type |
uint16 // Temperature, in kelvin | uint16 // Temperature, in kelvin | ||
uint16 // Battery capacity | uint16 // Battery capacity | ||
- | uint16 // Battery impedance (mOhm | + | uint16 // Battery impedance (mOhm) |
- | uint16 // Present value of v_bat_full_level | + | uint16 // Present value of v_bat_full_level |
- | uint16 // Present value of v_bat_low_ths_mv | + | uint16 // Present value of v_bat_low_ths_mv |
- | uint16 unknown7; | + | uint16 unknown7; |
- | uint16 unknown8; | + | uint16 unknown8; |
- | uint16 unknown9; | + | uint16 unknown9; |
- | uint16 // Load current estimated by Batmon4 (uA | + | uint16 // Load current estimated by Batmon4 (uA) |
- | uint16 unknown10; | + | uint16 unknown10; |
}; | }; | ||
</pre> | </pre> | ||
- | The '''“Instantaneous battery voltage (mV)”''' field’s observed values have a certain regular spacing indicating a linear function of some integer value with a smaller range, presumably retu adc register #8. If it is indeed from that register, then note there is a non-zero offset involved: one function that gives values consistent with the set of values observed and that somewhat matches one set of observations of both fields (which unfortunately had a non-negligible delay between sampling the two) is mV = 2252.362 + 2.81361 * adc#8 (where the multiplier is fairly accurate, | + | The '''“Instantaneous battery voltage (mV)”''' field’s observed values have a certain regular spacing indicating a linear function of some integer value with a smaller range, presumably retu adc register #8. If it is indeed from that register, then note there is a non-zero offset involved: one function that gives values consistent with the set of values observed and that somewhat matches one set of observations of both fields (which unfortunately had a non-negligible delay between sampling the two) is mV = 2252.362 + 2.81361 * adc#8 (where the multiplier is fairly accurate, but the constant could be out by some multiple of 2.81361). -- pjrm. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | The '''“Battery monitor check voltage (mV)”''' field has similar values to the “Instantaneous battery voltage (mV)” field, but without obvious regular spacing. I | + | The '''“Battery monitor check voltage (mV)”''' field has similar values to the “Instantaneous battery voltage (mV)” field, but without obvious regular spacing. I don't know how it's calculated. -- pjrm. |
Voltage levels depend not just on amount of charge remaining in the battery, but also recent electrical load: the voltage level goes down markedly while the CPU is being heavily used, for example. | Voltage levels depend not just on amount of charge remaining in the battery, but also recent electrical load: the voltage level goes down markedly while the CPU is being heavily used, for example. |
Learn more about Contributing to the wiki.