dotstack API Reference  1.10.37
Macros
Configuration

This module describes parameters used to configure ATT server layer. More...

Macros

#define ATT_MAX_CLIENTS
 Maximum number of clients. More...
 
#define ATT_MAX_FOUND_ATTRIBUTES
 Maximum number of attributes that can be returned in one multi-attribute response. More...
 
#define ATT_MAX_QUEUED_WRITE_BUFFER_SIZE   0
 Size of the buffer for storing queued writes. More...
 

Detailed Description

This module describes parameters used to configure ATT server layer.

dotstack is customized using a configuration file. The configuration file tailors the dotstack to the application being built. It has to have the structure shown below.

#include "cdbt/bt/bt_std.h"
// HCI and L2CAP must always be present
// SDP is required only if stack is running in dual mode. This is the default mode.
// To run the stack in single mode (i.e. only BLE is supported) a BT_BLE_SINGLE_MODE symbol
// must be defined:
// #define BT_BLE_SINGLE_MODE
// HCI configuration parameters
#define HCI_MAX_CMD_BUFFERS ...
#define HCI_MAX_DATA_BUFFERS ...
#define HCI_MAX_ACL_CONNECTIONS ...
#define HCI_RX_BUFFER_LEN ...
#define HCI_TX_BUFFER_LEN ...
#define HCI_L2CAP_BUFFER_LEN ...
#define HCI_MAX_CMD_PARAM_LEN ...
// L2CAP configuration parameters
#define L2CAP_MAX_CMD_BUFFERS ...
#define L2CAP_MAX_FRAME_BUFFERS ...
#define L2CAP_MAX_PSMS ...
#define L2CAP_MAX_CHANNELS ...
// SDP configuration parameters
#define SDP_MAX_SEARCH_RESULT_LEN ...
#define SDP_MAX_ATTRIBUTE_RESULT_LEN ...
// Depending on protocols and profiles used below goes configuration parameters
// for each used module. E.g., to use and configure ATT,
// the following values must be defined:
#define BT_INCLUDE_ATT // tells dotstack to compile in ATT support
#define ATT_MAX_CLIENTS ...
#define ATT_MAX_FOUND_ATTRIBUTES ...
#define ATT_MAX_QUEUED_WRITE_BUFFER_SIZE ...
#include "cdbt/bt/bt_oem_config.h"

Macro Definition Documentation

#define ATT_MAX_CLIENTS

Maximum number of clients.

This parameter defines the maximum number of clients that can be simultaneously connected to the server. If ATT is used only over LE this number must be set to 1. Any other numbers will be a waste of RAM because an LE slave (server) can have only one connection to a master (client) at any given moment.

#define ATT_MAX_FOUND_ATTRIBUTES

Maximum number of attributes that can be returned in one multi-attribute response.

This parameter defines the maximum number of attributes that can be returned in one multi-attribute response. The minimum value is 1. The maximum value is 255. This number must be set to as large value as possible (given there is enough RAM) to minimize the number of request needed by the client to find all requested attributes.

#define ATT_MAX_QUEUED_WRITE_BUFFER_SIZE   0

Size of the buffer for storing queued writes.

This parameter defines the Size of the buffer for storing queued writes. The minimum value is 0. The maximum value is 65535. If this is set to 0 queued writes will not be supported.