-
I would like to support sending battery voltage through Bluetooth battery service. Does Zephyr project provide sample code for sending battery voltage through Bluetooth battery service? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
BAS is supported out of the box in zephyr yes, you can see how to use it in some of the sample applications: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/bluetooth/peripheral_csc/src/main.c#L386 though you would need to calculate the level that it shows to a client with your own code as that would be device specific (the sample above sends a dummy changing value) |
Beta Was this translation helpful? Give feedback.
BAS is supported out of the box in zephyr yes, you can see how to use it in some of the sample applications: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/bluetooth/peripheral_csc/src/main.c#L386 though you would need to calculate the level that it shows to a client with your own code as that would be device specific (the sample above sends a dummy changing value)