iOS BLE蓝牙 – 发送/接收HEX数据

前端之家收集整理的这篇文章主要介绍了iOS BLE蓝牙 – 发送/接收HEX数据前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在创建一个应该连接到自定义BLE设备的iOS应用程序.我需要iOS应用程序发送2个HEX命令,一个用于启用设备的一部分,另一个用于请求数据.

iOS中是否有任何方式发送/接收自定义HEX数据,除了使用服务&特点?

解决方法

不,这是不可能的,但其原因不是iOS,而是“服务”和“特征”只是BLE协议定义的一部分.

官方规格:
https://developer.bluetooth.org/TechnologyOverview/Pages/BLE.aspx

Generic Attribute Profile

The latest Bluetooth specification uses a service-based architecture
based on the attribute protocol (ATT). All communication in low energy
takes place over the Generic Attribute Profile (GATT). An application
or another profile uses the GATT profile so a client and server can
interact in a structured way.

The server contains a number of attributes,and the GATT Profile defines how to use the Attribute Protocol to discover,read,write and obtain indications. These features support a service-based architecture. The services are used as defined in the profile specifications. GATT enables you to expose service and characteristics defined in the profile specification.

原文链接:/iOS/331747.html

猜你在找的iOS相关文章