We have a divice of Psoc 4BLE to provied "read', "notify" and "write without responce" services, and I am developing an IOS app to communicate with this device. My app can successful connect to the device but failed to "Notify" or "wirte message“ to the device. Anyone know what the problem is ?
When we tested this device with LightBlue (both IOS edition and Android edition) which is an popular tool to test BLE services, we found:
1. The LightBlue Android can connect and communicate with the device.
2. The LightBlue IOS can only connect to the device, but fail to communicate with the device. (The device cannot receive the notification request and message from LightBlue IOS).
When we tested this device with CySmart, both CySmart IOS and CySmart Android were worked. They can connect to the services and communication with them.
I guess the problem could be caused by Psoc 4BLE and CoreBlutooth (IOS BLE library).
PS: We have used another BLE device (which is provided by another company) before, and it worked on both LightBlue IOS and Andorid.
After a lot of experiments, I found the problem is caused by setting notification (which is "setNotifyValue: forCharateristic:" in IOS). No matter you use LightBlue IOS or CySmart IOS, once you have clicked on "Notify" button or "Subscribe" button, you won't be able to write anymore data to corresponding characteristic, and the connection will be ended in about 30 secs.
To discover the reason of above problem, I have done some tests, and I found setting notification action is failed on app side. After I have notified an characteristic by using "setNotifyValue:YES forCharacteristic:C", i found "C.isNotifying" always return "NO", which means the setting notification action is never completed on app side, and this could be reason why connection is ended after 30 secs.
With the same tests and experiments, all Andorid apps works fine on Psoc 4BLE. With the same tests and experiements, all apps (including ios apps and andorid apps) works fine on another BLE device.
Finally, I think this problem could be caused by the bad compatibility between IOS to Psoc 4BLE.
Do you have any idea with it? BTW, I will post my code on later.