BLE. discoverAllCharacteristics() hangs

Thanks. So can you think why the device would continue to loop repeatedly calling readCharacteristicUUID128IfNeeded() before panicking 30 seconds later?

The background is that the discovered characteristic with 128-bits UUID from user’s perspective will be reported by the SoftDevice as a characteristic with shorted UUID, which means that this characteristic has a 128-bits UUID and user need to perform a read procedure to fetch the completed 128-bits UUID.

So after discovered all characteristics, the BLE HAL will traverse the discovered characteristic list to read completed 128-bits UUID for those characteristic with shorted UUID. Each time the readCharacteristicUUID128IfNeeded() will read completed 128-bits UUID for one characteristic. Once the 128-bits UUID is read, the processCharDiscEventFromThread() will be invoked. Then the readCharacteristicUUID128IfNeeded() will be invoked again. Thus the readCharacteristicUUID128IfNeeded() will be invoked repeatedly until all characteristics with shorted UUID are read for their 128-bits UUID.