0

I am using react-native-ble-plx library to fetch battery level from the device but I am unable to interpret the data fetched.

I am getting "MA==" as value after reading characteristic:

Michael Kotzjan
  • 2,093
  • 2
  • 14
  • 23
  • Have you found the solution? – Delice May 12 '22 at 09:50
  • You need to base64 decode that value -- looks like it decodes to `0`. In my case I'd get values like `*`, for which you would additionally call `charCodeAt` like `'*'.charCodeAt(0)`, which gives the right value (in this example 42). – riqitang Sep 30 '22 at 15:24

0 Answers0