I am facing some issue while reading data from bluetooth peripheral. We have a bluetooth device with the following gatt details.
<service uuid="service id" advertise="true">
<description>XXXX service</description>
<characteristic uuid="characteristic id" id="xgatt_data">
<description>Data</description>
<properties write="true" indicate="true" />
<value variable_length="true" length="20" type="user" />
</characteristic>
</service>
What i am doing is
- Search for the peripheral who is having "service id"
- Connect to the peripheral once found and keeping a strong reference to it.
- After connecting setting delegate and searching for all the services it providing
- loop all services and scan for characteristics once we discover service
- after i found desired characteristic i am enabling notification
- On button click i am writing data to characteristic
I am able to connect to the device. and i can send commands(data) to peripheral also. Once we send any command to device it will send some data in response. I can see logs at the device, it is sending some data back once it receive any command. But in my iOS device i am not able to read the data by using either notification or normal read functions. What i am missing here?