On Thursday 12 December 2019 22:34:15 Anton Thomasson wrote:
> 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

Hello! This request is partially related to my proposal how to handle
Bluetooth HFP profile on Linux where pulseaudio, ofono and power supply
software are involved. Here is link to email discussion about my proposal:

https://lore.kernel.org/linux-bluetooth/20191201185740.uot7zb2s53p5gu7z@pali/T/#u

-- 
Pali Rohár
pali.ro...@gmail.com

Attachment: signature.asc
Description: PGP signature

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to