Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GATT profile and UART service

I am new to developing a mobile app with bluetooth connection to peripheral device. I searched that GATT is the relevant profile used for bluetoothLE communication but our client recommended that we use UART service. Now I am confused as to 1. how these two things are related and 2. Do we have to opt for one of these, if so, what are the pros and cons of each. Thanks

like image 919
Samra Avatar asked Jun 23 '16 01:06

Samra


People also ask

Is GATT profile used for bluetoothle or UART service?

I searched that GATT is the relevant profile used for bluetoothLE communication but our client recommended that we use UART service. Now I am confused as to 1. how these two things are related and 2. Do we have to opt for one of these, if so, what are the pros and cons of each. Thanks Show activity on this post.

What are the GATT server’s attributes?

Therefore, a GATT server’s attributes are in fact a succession of service definitions, each one starting with a single attribute that marks the beginning of a service (aptly named a service declaration .) This attribute’s type and value format is strictly specified in GATT, as shown in Table 4-2. Table 4-2. Service Declaration attribute

What is the GATT protocol?

The GATT defines the format of services and their characteristics, and the procedures that are used to interface with these attributes such as service discovery, characteristic reads, characteristic writes, notifications, and indications. GATT takes on the same roles as the Attribute Protocol (ATT).

What is Generic Attribute Profile (GATT)?

The Generic Attribute Profile (GATT) establishes how data will be organized and exchanged over a Bluetooth ® Low Energy (BLE) connection. GATT uses the Attribute Protocol (ATT) as a transport mechanism, as well as a means of organizing your data into easily transmitted bits or attributes.


1 Answers

Legacy Bluetooth provides the serial port profile (SPP) - This is essentially a serial input/output stream over Bluetooth.

Bluetooth Low Energy provides a number of profiles, but the most commonly used is GATT. GATT exposes characteristics/attributes which are a little like variables that you can read from/write to. A read/write is limited to 20 bytes.

Many embedded BLE chipsets provide a "UART emulation" over BLE GATT. Here a pair of attributes are used; one for read and one for write.

The Central device writes bytes to the 'write' attribute and the embedded chip sends them out of a serial port on the chip.

Similarly, data that is written to the chip's serial port and sent to the central via a notification of new data in the 'read' attribute.

You don't say what platform your are developing on, but one important consideration is that use of SPP on iOS requires your hardware to be MFi certified by Apple, while BLE/GATT does not.

like image 60
Paulw11 Avatar answered Feb 08 '23 17:02

Paulw11