[英]How to send data through central mode to peripheral?
The Demo which you are following is the correct one for a beginner. 您要关注的演示是适合初学者的演示。 In this Demo, app is sending text data from TextView.
在此演示中,应用程序正在从TextView发送文本数据。 The text data is passed in octet form, in iOS it is considered as Data (.utf8).
文本数据以八位字节形式传递,在iOS中被视为数据(.utf8)。
Now, question is, which type of data you want to send from Central to Peripheral. 现在,问题是,您要从Central到Peripheral发送哪种类型的数据。
The General flow is: 1. Central will proximate peripheral so that other Bluetooth manager can scan it. 常规流程为:1.中心将靠近外围设备,以便其他Bluetooth管理器可以对其进行扫描。 2. Once anyone try to connect with that peripheral, then on successful connection, it will return available Services and Characteristics inside of those each services.
2.一旦有人尝试与该外围设备连接,然后成功连接,它将在每个服务内部返回可用的服务和特征。 3. Based on characteristic, you can write your own logic to send text, images, audio, video or anyother data from Central to Peripheral.
3.根据特性,您可以编写自己的逻辑以从中央到外围设备发送文本,图像,音频,视频或任何其他数据。
Just follow the Demo link which you are following. 只需点击您正在关注的演示链接即可。 Thanks.
谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.