javabluetoothbattery

Is it possible to connect to a Bluetooth api in general


I have this Lifepo4 battery (Swedish language on that page)that has built in Bluetooth connectivity.

Simply by using an Android app connection with Bluetooth I can see all sorts of battery state like, remaining power, current output, temperature and cykels.

I would like to have more functionality in the Android app and I spoke the to seller and asked for the app source code, if by any chance it was open-source, but it was not.

My question is since there is no password when accessing the battery I was thinking the battery API could be open to connect to. The battery could of course have a pass key that the app passes in to get access, and that will put an end to this endeavour

Anybody with experience of this type of programming, preferable in Java would love to get some tips on this

Maybe there´s a way to "scan" the battery API to find out endpoints and then build some Bluetooth rest interface, dunno just getting brainer and brainer here


Solution

  • It looks like they use the only BLE service and get all parameters from a notification in single byte array format. You can decompile the app, it is not obfuscated. There are similar applications with the same API from other battery brands.