<div dir="ltr"><div>Hi</div><div><br></div><div>I'd really like to have some monitoring of the battery level.</div><div>After having read up a bit on how it works, i happened by the relevant Bluetooth AT event in the journal log.</div><div><br></div><div><span style="font-family:monospace">Dec 06 18:45:11 Sailfish ofonod[2932]: Server: < AT+IPHONEACCEV=2,1,3,2,0\r</span></div><div><div><br></div><div>That says 2 pairs of data, and the pair starting with a 1 is followed by the battery level, 3.</div><div><a href="https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf">https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf</a> p.69</div></div><div>While i appreciate the comedy value in using journalctl to check you battery level, it is not very convenient</div><div><br></div><div>Anyway, seeing it there, logged by ofonod, means it should be very doable to make available.</div><div>However it seems to be sent very seldom, effectively only when connecting, simply listening to it from a 3rd-party app isn't quite enough. And regardless, receiving it properly, saving it per session etc is the better solution.</div><div><br></div><div>I guess i'm effectively asking for help finding where this was logged (i looked for a while, but can't find it), where it can be handled properly (tied to a specific headset/session). And then how it can be exposed, at least to DBUS.<br></div><div>Does anyone feel like helping out getting this moving?<br></div><div><br></div><div>By an hint from r0kk3rz, i found how Android handles it, and it doesn't look too complicated.<br></div><div>(although there are two different events that can be emitted)<br></div><div><a href="http://androidxref.com/9.0.0_r3/xref/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java#getBatteryLevelFromXEventVsc">http://androidxref.com/9.0.0_r3/xref/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java#getBatteryLevelFromXEventVsc</a></div><div><br></div><div>Br,</div><div>Anton<br></div></div>