Hi,
I am new to Ionic/Capacitor. We are trying to build an App to listen to our sensor’s BLE message through BLE notification/indication.
We decide to use the capacitor plugin GitHub - capacitor-community/bluetooth-le: Capacitor plugin for Bluetooth Low Energy instead of the old codorvar.
I managed to connect the sensor through BLE, and enable the notification from the sensor.
However, the ionic side gives an error message as long as the sensor sends notification/indication to the phone.
Here are the logs from android studio.
2021-08-04 17:49:11.527 11398-11574/io.ionic.starter V/Capacitor: callback: 61954489, pluginId: BluetoothLe, methodName: connect, methodData: {"deviceId":"E8:EB:1B:53:D0:99"}
2021-08-04 17:49:11.533 11398-11499/io.ionic.starter D/BluetoothGatt: connect() - device: E8:EB:1B:53:D0:99, auto: false
2021-08-04 17:49:11.533 11398-11499/io.ionic.starter D/BluetoothGatt: registerApp()
2021-08-04 17:49:11.533 11398-11499/io.ionic.starter D/BluetoothGatt: registerApp() - UUID=e3baf6e5-065b-4422-bcad-2fbe89faf14b
2021-08-04 17:49:11.540 11398-11415/io.ionic.starter D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
2021-08-04 17:49:11.697 11398-11415/io.ionic.starter D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=E8:EB:1B:53:D0:99
2021-08-04 17:49:11.698 11398-11415/io.ionic.starter D/Device: Connected to GATT server. Starting service discovery.
2021-08-04 17:49:11.698 11398-11415/io.ionic.starter D/BluetoothGatt: discoverServices() - device: E8:EB:1B:53:D0:99
2021-08-04 17:49:12.175 11398-11415/io.ionic.starter D/BluetoothGatt: onConnectionUpdated() - Device=E8:EB:1B:53:D0:99 interval=6 latency=0 timeout=500 status=0
2021-08-04 17:49:12.516 11398-11415/io.ionic.starter D/BluetoothGatt: onSearchComplete() = Device=E8:EB:1B:53:D0:99 Status=0
2021-08-04 17:49:12.516 11398-11415/io.ionic.starter D/Device: requestMtu 512
2021-08-04 17:49:12.516 11398-11415/io.ionic.starter D/BluetoothGatt: configureMTU() - device: E8:EB:1B:53:D0:99 mtu: 512
2021-08-04 17:49:12.534 11398-11415/io.ionic.starter D/BluetoothGatt: onConfigureMTU() - Device=E8:EB:1B:53:D0:99 mtu=158 status=0
2021-08-04 17:49:12.534 11398-11415/io.ionic.starter D/Device: MTU changed: 158
2021-08-04 17:49:12.534 11398-11415/io.ionic.starter D/Device: resolve: connect Connected.
2021-08-04 17:49:12.539 11398-11398/io.ionic.starter I/Capacitor/Console: File: http://localhost/ - Line 213 - Msg: undefined
2021-08-04 17:49:12.540 11398-11398/io.ionic.starter I/Capacitor/Console: File: http://localhost/js/chunk-69312c9a.ae92b072.js - Line 3 - Msg: connected to device [object Object]
2021-08-04 17:49:12.540 11398-11574/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 61954490, pluginId: BluetoothLe, methodName: addListener
2021-08-04 17:49:12.541 11398-11574/io.ionic.starter V/Capacitor: callback: 61954490, pluginId: BluetoothLe, methodName: addListener, methodData: {"eventName":"notification|E8:EB:1B:53:D0:99|49535343-FE7D-4AE5-8FA9-9FAFD205E455|49535343-1E4D-4BD9-BA61-23C647249616"}
2021-08-04 17:49:12.544 11398-11574/io.ionic.starter V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 61954491, pluginId: BluetoothLe, methodName: startNotifications
2021-08-04 17:49:12.544 11398-11574/io.ionic.starter V/Capacitor: callback: 61954491, pluginId: BluetoothLe, methodName: startNotifications, methodData: {"deviceId":"E8:EB:1B:53:D0:99","service":"49535343-FE7D-4AE5-8FA9-9FAFD205E455","characteristic":"49535343-1E4D-4BD9-BA61-23C647249616"}
2021-08-04 17:49:12.546 11398-11499/io.ionic.starter D/BluetoothGatt: setCharacteristicNotification() - uuid: 49535343-1e4d-4bd9-ba61-23c647249616 enable: true
2021-08-04 17:49:12.565 11398-11415/io.ionic.starter D/Device: resolve: setNotifications|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616 Setting notification succeeded.
2021-08-04 17:49:12.568 11398-11398/io.ionic.starter I/Capacitor/Console: File: http://localhost/ - Line 213 - Msg: undefined
2021-08-04 17:49:12.589 11398-11415/io.ionic.starter V/Capacitor/BluetoothLe: Notifying listeners for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:12.589 11398-11415/io.ionic.starter D/Capacitor/BluetoothLe: No listeners found for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:12.628 11398-11415/io.ionic.starter D/BluetoothGatt: onConnectionUpdated() - Device=E8:EB:1B:53:D0:99 interval=36 latency=0 timeout=500 status=0
2021-08-04 17:49:13.074 11398-11415/io.ionic.starter D/BluetoothGatt: onConnectionUpdated() - Device=E8:EB:1B:53:D0:99 interval=24 latency=0 timeout=512 status=0
2021-08-04 17:49:13.620 11398-11415/io.ionic.starter V/Capacitor/BluetoothLe: Notifying listeners for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:13.620 11398-11415/io.ionic.starter D/Capacitor/BluetoothLe: No listeners found for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:14.612 11398-11415/io.ionic.starter V/Capacitor/BluetoothLe: Notifying listeners for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:14.612 11398-11415/io.ionic.starter D/Capacitor/BluetoothLe: No listeners found for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:15.653 11398-11415/io.ionic.starter V/Capacitor/BluetoothLe: Notifying listeners for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616
2021-08-04 17:49:15.653 11398-11415/io.ionic.starter D/Capacitor/BluetoothLe: No listeners found for event notification|E8:EB:1B:53:D0:99|49535343-fe7d-4ae5-8fa9-9fafd205e455|49535343-1e4d-4bd9-ba61-23c647249616