I'm using two nRF52805 to get sensor values and send 2 sensor real-time values to my phone via BLE. Each nRF52805 BLE works well (Individually tested by nRF Connect App. It can receive BLE data individually).
I follow the <BluetoothLeGatt> example. My phone is HUAWEI Mate 10, which uses Android version 10 and supports BLE 4.2.
In my Android BLE App, after press the Connect Button on the 1st page, App will automatically connect to 2 BLE devices with the names "BC805M BLE ADC1" and "BC805M BLE ADC2".
It seems the App could connect with 2 BLE devices successfully. However, no data received (fail to subscribe characteristic notification). BluetoothGattCallback.onCharacteristicChanged() method is never fired. Therefore, the action never becomes "ACTION_DATA_AVAILABLE".
I understand the BLE communication is serial. Some people suggested using "onDescriptorWrite()" in BluetoothGattCallback(). However, I don't fully understand how to do it. I attached my Android Studio project in a zip file. It would be very appreciated if someone could find the issue.
6646.BluetoothLeGatt-master - 2 BLE Device.zip