Hi I'd really like to have some monitoring of the battery level. After having read up a bit on how it works, i happened by the relevant Bluetooth AT event in the journal log.
Dec 06 18:45:11 Sailfish ofonod[2932]: Server: < AT+IPHONEACCEV=2,1,3,2,0\r That says 2 pairs of data, and the pair starting with a 1 is followed by the battery level, 3. https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf p.69 While i appreciate the comedy value in using journalctl to check you battery level, it is not very convenient Anyway, seeing it there, logged by ofonod, means it should be very doable to make available. 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. 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. Does anyone feel like helping out getting this moving? By an hint from r0kk3rz, i found how Android handles it, and it doesn't look too complicated. (although there are two different events that can be emitted) http://androidxref.com/9.0.0_r3/xref/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java#getBatteryLevelFromXEventVsc Br, Anton
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org