We are facing one issue when reading characteristics from remote BLE device.
This issue happen in Android OS 5.0
and above.
Points are below to generate issue :
- Make one peripheral device with one service and one characteristics.
- Characteristics will have only read permission. Now set the value of this characteristics with more than 20 characters i.e. 20 bytes.
- Now let peripheral device broadcast itself with one service and one characteristics.
- Now launch any BLE scanner app from market and connect with this peripheral device.
- Once successfully connected with peripheral device just try to read characteristics.
- In this case it will not show any data and when debugging the app it show that it returns null data.
- The above same case not working in the Android OS 5.0 and above.
- Same case working in android 4.4.
So there is something change in Android OS 5.0 and above that internally disable readblob()
request that can read data having more that 20 characters.