The BLE GATT Luna API allows you to use webOS TV's BLE GATT client function.
This project is a sample app that uses BLE GATT Luna API.
You can find out how to call the luna service API in this project and can check scan, connect, read/write/notify characteristic operation.
To use the BLE GATT API, your app should acquire user permission.
If the app calls the API without the permission, a pop up to get user permission will appear, and only after the user choose to give the permission, the app can use the BLE GATT API.
Once acquired, the permission of the app remains valid until the user deletes it and no pop up for getting permission will appear till then.
If the user explicitly deletes the permission, the app cannot use the BLE GATT API, and only after the user gives the permission again, it can use the API again.
Add/delete permissions can be changed in the nearby devices menu in the Settings app.
This project visualized the BLE scan, connect read/write/notify characteristic operation from BLE GATT service in this following:
- Show BLE scan results and request to connect target device.

- You can check the supported services, characteristics, and descriptors of the connected GATT server device.

- You can set to receive notification from a specific characteristic, and you can read/write a specific characteristic.


- webOS 24 latest version and higher.
Clone the repository and cd into the cloned directory.
git clone https://github.com/webOS-TV-app-samples/BLEGATT.git
cd BLEGATT
enact app build.
https://enactjs.com/docs/developer-tools/cli/building-apps/#packaging-source-code
ares package and install on TV.
https://webostv.developer.lge.com/develop/tools/cli-dev-guide#ares-package
https://webostv.developer.lge.com/develop/tools/cli-dev-guide#ares-setup-device
https://webostv.developer.lge.com/develop/tools/cli-dev-guide#ares-install
1. enact app build
npm install
npm run pack -- --production --isomorphic --locales=tv
2. ares packaing & install
ares-package -no-minify dist
ares-install com.test.app.testblegatt_1.0.3_all.ipk
If you want to see details about the BLE GATT Service API, please refer to this url.
https://webostv.developer.lge.com/develop/references/ble-gatt
If you want to see implementation guide using BLE GATT Service API, please refer to this url.
https://webostv.developer.lge.com/develop/guides/ble-gatt