# GATT configuration parameters
Source: [https://docs.qualcomm.com/doc/80-70017-13/topic/gatt_config_params.html](https://docs.qualcomm.com/doc/80-70017-13/topic/gatt_config_params.html)
To configure the GATT server and client functions, use the server, client, and scan
parameters.
## GATT server configuration parameters
The two types of server configuration parameters used to [perform Bluetooth
Low Energy GATT server functions](https://docs.qualcomm.com/doc/80-70017-13/topic/perform_ble_gatt_server_functions.html) are: advertiser and server parameters.
These configuration parameters are handled through
`AdvertiserConfigFile.txt` and
`ServerConfigFile.txt` files, respectively.
**`AdvertiserConfigFile.txt`**
The following table lists the possible values of each advertisement parameter in the
`AdvertiserConfigFile.txt` file.
| Parameters | Values |
| --- | --- |
| `TxPower` | **Legacy:**
0:
ADVERTISE_TX_POWER_ULTRA_LOW(-21)
1: ADVERTISE_TX_POWER_LOW(-15)
2: ADVERTISE_TX_POWER_MEDIUM(-7)
3: ADVERTISE_TX_POWER_HIGH(1)
**Extended:**
0: TX_POWER_ULTRA_LOW =-21
1: TX_POWER_LOW =-15
2: TX_POWER_MEDIUM =-7
3: TX_POWER_HIGH = 1
|
| `LegacyFlag` |
0: Use extended advertiser
1: Use legacy advertiser
|
| `PeriodicFlag` |
0: Disable periodic advertiser
1: Enable periodic advertiser
|
| `ConnectableFlag` |
0: Enable non-connectable
advertiser
1: Enable connectable advertiser
|
| `ScannableFlag` |
0: Enable non-scannable advertiser
1: Enable scannable advertiser
This value is applicable only to the extended
advertisers. For the legacy advertisers, always set
it to true.
|
| `AnonymousFlag` |
0: Use the advertiser address in all
PDUs
1: Do not use the advertiser address in
PDUs
|
| `IncludePower` |
0: Do not include Tx power in the
extended header
1: Include Tx power in the extended
header
|
| `PrimaryPhy` |
1: 1 M-PHY
3: Low Energy (LE) coded PHY
|
| `SecondaryPhy` |
1: 1 M-PHY
2: 2 M-PHY
3: LE coded PHY
|
| `Interval` |
160: Minimum advertisement interval
(100 ms)
16777215: Maximum advertisement
interval (10,485 s)
|
| `TimeOutLegacy` |
0: Minimum possible value
180000: Maximum possible timeout value
in ms
|
| `AdvertiseMode` |
0: Low-power mode
1: Balanced mode
2: Low latency mode (used for
legacy)
The advertisement interval is selected based on the
advertiser mode as follows:
- Low-power mode: 1 s advertisement interval
- Balanced mode: 250 ms advertisement interval
- Low latency mode: 100 ms advertisement interval
|
| `BLEBtName` | The name to be displayed for that particular advertiser
set. |
The following snippet shows an example of an advertisement
set:
*******************AdvertisingSet1***************
TxPower:1
LegacyFlag:1
PeriodicFlag:0
ConnectableFlag:1
ScannableFlag:1
AnonymousFlag:0
IncludePower:1
PrimaryPhy:1
SecondaryPhy:1
Interval: 320
TimeOutLegacy:0
AdvertiseMode:1
BLEBtName:Adv1 Copy to clipboard
**`ServerConfigFile.txt`**
The following table lists the possible values of each service parameter in the
`ServerConfigFile.txt` file.
| Parameter | Description |
| --- | --- |
| `service uuid` | The service ID. A server can have many services. |
| `characteristic uuid` | The ID of the characteristic. A service can have many
characteristics. A characteristic can have properties and
permissions. |
| `characteristic properties` | The properties of the characteristic.
Combine the following characteristic properties with a logical OR
argument, as
required:
PROPERTY_BROADCAST = 0x01;
PROPERTY_READ = 0x02;
PROPERTY_WRITE_NO_RESPONSE = 0x04;
PROPERTY_WRITE = 0x08;
PROPERTY_NOTIFY = 0x10;
PROPERTY_INDICATE = 0x20;
PROPERTY_SIGNED_WRITE = 0x40;
PROPERTY_EXTENDED_PROPS = 0x80;Copy to clipboard |
| `characteristic permissions` | The permissions of the characteristic.
Combine the following characteristic permissions with a logical
OR argument, as required:
PERMISSION_READ = 0x01;
PERMISSION_READ_ENCRYPTED = 0x02;
PERMISSION_READ_ENCRYPTED_MITM = 0x04;
PERMISSION_WRITE = 0x10;
PERMISSION_WRITE_ENCRYPTED = 0x20;
PERMISSION_WRITE_ENCRYPTED_MITM = 0x40;
PERMISSION_WRITE_SIGNED = 0x80;
PERMISSION_WRITE_SIGNED_MITM = 0x100;Copy to clipboard |
| `descriptor uuid` | The ID of the descriptor. A characteristic can have many
descriptors. A descriptor can have permissions. |
| `descriptor permissions` | The permissions of the descriptor. |
The following snippet shows an example of a service in the GATT
server.
**************Server1*************
Service1:[service uuid],[characteristic uuid],[characteristic properties],[characteristic permissions],[descriptor uuid],[descriptor permissions]
Service1:00001200-0000-1000-8000-00805f9b34fb, 00001101-0000-1000-8000-00805f9b34fb,26,31,00002a06-0000-1000-8000-00805f9b34fb,17
ManufacturerId:0
ManufacturerData:AAAA
**************End of service*************Copy to clipboard
## GATT client configuration parameters
The following table lists the connection parameters used to configure the GATT
client.
| Parameter | Values | Notes |
| --- | --- | --- |
| `isAuto` |
0: Connects directly
1: Connects automatically as soon as a
remote device is available
| If this parameter is set to `1`, ensure that the
devices are bonded for auto connection. |
| `isOpportunistic` |
0: Connects directly
1: Provides the handle if it is already
connected based on the address and transport
| If this parameter is set to `1`, it does not start
the connection if it is not already present. |
| `Tx_Phy` |
1: 1 M-PHY
2: 2 M-PHY
4: LE coded PHY
7: All PHYs
| – |
| `Rx_Phy` |
1: 1 M-PHY
2: 2 M-PHY
4: LE coded PHY
7: All PHYs
| – |
| `Phy_Opt:00` |
0: Host preferred coding scheme
1: Use S = 2 (500 Kbps) coding scheme
2: Use S = 8 (125 Kbps) coding scheme. Use
it only when the PHY is LE coded.
| – |
| `Mtu_Size` |
- The minimum value is
23.
- The maximum value is
512.
| – |
## Scan settings
The following table lists the scan settings used to configure the GATT client.
| Scan types | Values | Notes |
| --- | --- | --- |
| `1: Scan_mode` |
-1: Opportunistic mode
0: Low-power mode
1: Balanced mode
2: Low latency mode
**Regular scan:**
0: Scan window (512 ms); scan interval
(5120 ms)
1: Scan window (1024 ms); scan interval
(4096 ms)
2: Scan window (4096 ms); scan interval
(4096 ms)
**Batch scan:**
0: Scan window (1500 ms); scan interval
(150,000 ms)
1: Scan window (1500 ms); scan interval
(15,000 ms)
2: Scan window (1500 ms); scan interval
(5000 ms)
| – |
| `2: CallbackType` |
1: Initiates a callback to all the matched
advertisements
2: Initiates a callback to the first
matched advertisement
4: Initiates a callback when a previously
detected device stops sending advertisements.
| – |
| `3: ResultType` |
0: Provides full scan results that have the
device, RSSI, advertising data, scan response and, scan
timestamps.
1: Provides scan results that have the
device, RSSI, and scan timestamps.
| – |
| `4: ScanPhy` |
1: 1 M-PHY
3: LE coded PHY. Use it for extended
scanning only.
255: All supported PHYs
| Currently, it is hard coded to 255 in the application
code. |
| `5: Legacy` |
True: Legacy scanning
False: Extended scanning
| – |
| `6: ReportDelay` |
0: Deliver reports immediately
>0: Accumulate scan results and deliver
them after the delay mentioned (in ms) or if buffers are
full (batch scan).
| – |
| `7: MatchMode` | | – |
| `8: NumOfAdvMatches` |
1: Matches one advertisement per filter
2: Matches few advertisements according to
availability of hardware resources
3: Matches as many advertisements as the
hardware allows
| – |
**Parent Topic:** [General Attribute Profile](https://docs.qualcomm.com/doc/80-70017-13/topic/set_up_ble_gatt.html)
Last Published: Dec 26, 2024
[Previous Topic
Perform Bluetooth Low Energy GATT client functions](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/perform_ble_gatt_client_functions.md) [Next Topic
Advanced Audio Distribution Profile](https://docs.qualcomm.com/bundle/publicresource/80-70017-13/topics/set-up-a2dp.md)