How to send RGB signal to BLE device using iPhone application?

一个人想着一个人 提交于 2019-12-07 12:38:28

You cannot simply create a CBMutableCharacteristic - you must discover the CBCharacteristic or retrieve it from the peripheral's characteristics property.

If you refer to the documentation you will see

CBMutableCharacteristic objects represent the characteristics of a local peripheral’s service (local peripheral devices are represented by CBPeripheralManager objects)

and

CBCharacteristic objects in particular represent the characteristics of a remote peripheral’s service (remote peripheral devices are represented by CBPeripheral objects)

You state in a comment that you are unable to discover the services and characteristics of your device - in this case I suggest you examine your discovery code or add it to your question.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!