我可以仅使用 GATT 特性读取数据吗?还是我还需要 GATT 服务?

Can I read data using only GATT characteristics or do I need a GATT service too?

是否可以只向 BLE 设备添加一个 GATT 特性并从蓝牙接收器读取,或者我是否需要向 BLE 设备添加 GATT 服务才能从设备读取?除了模拟输出 GATT 特性之外,我是否需要 GATT 服务来简单地读取模拟输出?最后,我只想从 arduino uno 上的缓冲区读取 16 位字节并通过蓝牙发送它们。

当然你也需要服务。服务是特性的容器。

The Generic Attributes (GATT) define a hierarchical data structure that is exposed to connected Bluetooth Low Energy (LE) devices. The GATT profiles describe a use case, roles and general behaviors based on the GATT functionality. Services are collections of characteristics and relationships to other services that encapsulate the behavior of part of a device. This also includes hierarchy of services, characteristics and attributes used in the attribute server. On top of the GATT hierarchy is a profile, which is composed of one or more services necessary to fulfill a use case. A service is composed of characteristics or references to other services. A characteristic consists of a type (represented by a UUID), a value, a set of properties indicating the operations the characteristic supports and a set of permissions relating to security. It may also include one or more descriptors—metadata or configuration flags relating to the owning characteristic. GATT defines client (BLE Central) and server (BLE Peripheral) roles. The GATT server stores the data transported over the air to the GATT client and accepts requests, commands and confirmations from the GATT client. The GATT server sends responses to requests and sends indications and notifications asynchronously to the GATT client when specified events occur on the GATT server. GATT also specifies the format of data contained on the GATT server.