ContentsIndex
PreviousUpNext
Bluetooth Low Energy
Topics | Functions | Macros | Structs, Records, Enums | Types
Description

This API provides Bluetooth GATT functionality to enable communication with Bluetooth 4.0 devices.

Introduction

LinkIt ONE provides built-in Bluetooth 4.0 Generic Attribute Profile(GATT) to transmit arbitrary data between devices. The GATT profile is a general specification for sending and receiving short pieces of data known as "attributes" over a Bluetooth 4.0 link. All current Bluetooth Low Energy application profiles are based on GATT. 

All the APIs in the GATT module are asynchronous, which means the functions are mere a request passing to underlying framework for execution. The execution results are then passed back from callback functions. Therefore, you can initialize the GATT server and client module by registering a set of callback functions.

Limitation

This API doesn't support multiple connections - only one-to-one connection at a time.

Functions
Function 
Description 
Send connect remote device to GATT 
De-register confirm callback 
De-registers a previous request for notifications/indications. 
Send disconnect remote device to GATT 
Send a command to server to execute a prepared write operation. 
Enumerates characteristics for a given service. Set start_characteristic_uuid to NULL to get the first characteristic. 
Enumerates descriptors for a given characteristic. Set start_descriptor_id to NULL to get the first descriptor. 
Determines the type of the remote device (LE, BR/EDR, Dual-mode) 
Enumerates included services for a given parent service. Set start_include_service_id to NULL to get the first included service. The result is passed back from callback vm_bt_gatt_get_included_service_callback. After receiving the included service UUID, call vm_bt_gatt_client_get_included_service again and set include_svc_uuid to the service UUID to query the next included service in the parent service. 
Sends listen request to listen connect indicate during disconnected state 
Read characteristic value, can be larger than MTU. 
Read characteristic descriptor value. 
Requests the RSSI for a given remote device. The result is passed from vm_bt_gatt_read_remote_rssi_callback
Registers a GATT client application with the stack. The resulting client context is passed from vm_bt_gatt_register_client_callback
Register to listen the notification or indication of a certain characteristic from a connected server 
Starts or stops LE device scanning. 
Enumerates all GATT services on a connected device. Optionally, the results can be filtered for a given UUID. 
Write characteristic value, can be larger than MTU. 
Write characteristic descriptor value. 
Adds a characteristic to a service. 
Adds a descriptor to a given service. 
Assign an included service to it's parent service. To include multiple services to a parent service, call this function multiple times. 
Creates a new service. The result and corresponding service handle is passed to vm_bt_gatt_service_added_callback for each services created. Therefore, vm_bt_gatt_service_added_callback will be invoked 5 times if num_handles is set to 5. 
Connect Request 
Deletes a local service. 
De-register profile from GATT 
Disconnect request 
Send listen request to listen connect indicate during disconnect state. 
Queries tx power of local device. For Proximity profile. (Songmin Liao) 
Registers a GATT server application with the stack. 
Notify/Indicate data to Client 
Send response to client for write request 
Configures server advertisement behavior and packet data. 
Start service(add service to ATT database) 
Stops a local service. 
Macros
Structs, Records, Enums
Struct, Record, Enum 
Description 
GATT address 
GATT attribute UUID 
GATT attribute value 
GATT service callback function structure 
GATT client characteristic structure 
GATT client descriptor structure 
GATT connection handle structure 
GATT service callback function structure 
GATT Service 
Bluetooth UUID 
Types
Type 
Description 
GATT characteristic properties. These are bit flags 
Callback invoked when a characteristic has been added to a service 
authentication requirement 
GATT client device types 
GATT client write types 
Connect confirm callback 
GATT connection handle 
GATT context handle 
Callback invoked when a descriptor has been added to a characteristic 
GATT execute prepared write callback. 
Get characteristic confirm callback 
GATT descriptor enumeration result callback. 
Callback invoked in response to get_device_type. 
GATT included service enumeration result callback. 
Callback indicating that an included service has been added to a service 
Listen confirm callback 
Remote device notification callback, invoked when a remote device sends a notification or indication that a client has registered. 
GATT characteristic permission 
Read characteristic value confirm callback 
Read characteristic descriptor value confirm callback 
Callback invoked in response to read_remote_rssi. 
Callback triggered in response to read_tx_power 
Callback invoked in response to register. 
Register notification callback 
The callback for vm_bt_gatt_server_register
Callback invoked when a previously prepared write is to be executed 
Client read characteristic request indication 
Client write characteristic request indication 
Send response confirm callback 
Callback for scan results. 
Search complete 
Indicates the profile when finding one primary service, the profile can save it in its own field 
Callback invoked in response to create_service 
Callback triggered when a service has been deleted 
Start service callback 
Callback invoked in response to stop_service 
Callback triggered in response to set_advertisement_data. 
Write characteristic value confirm callback 
Read characteristic descriptor value confirm callback 
Links
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.