dotstack API Reference  1.10.37
Macros

This module describes parameters used to configure AVDTP layer. More...

Macros

#define AVDTP_MAX_SEP
 Maximum number of SEPs that can be exposed by a local device. More...
 
#define AVDTP_MAX_STREAMS
 Maximum number of streams that can be exposed by a local device. More...
 
#define AVDTP_MAX_REMOTE_DEVICES
 Maximum number of remote devices a local device can be connected to. More...
 
#define AVDTP_MAX_CMD_BUFFERS
 Maximum number of command buffers. More...
 
#define AVDTP_MAX_TRANSPORT_CHANNELS
 Maximum number of transport channels. More...
 
#define AVDTP_MAX_TX_BUFFER_LEN   32
 Size of the transmit buffer. More...
 
#define AVDTP_MAX_CMD_PARAM_LEN   (AVDTP_MAX_TX_BUFFER_LEN - 2)
 Maximum length of control command parameters. More...
 
#define AVDTP_CODEC_CONFIG_BUFFER_LEN   16
 Size of the buffer used to store codec specific configuration. More...
 

Detailed Description

This module describes parameters used to configure AVDTP 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, L2CAP and SDP must always be present
// 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 AVDTP & A2DP (this one does not need configuration),
// the following values must be defined:
#define BT_INCLUDE_AVDTP // tells dotstack to compile in AVDTP support
#define AVDTP_MAX_SEP ...
#define AVDTP_MAX_STREAMS ...
#define AVDTP_MAX_REMOTE_DEVICES ...
#define AVDTP_MAX_CMD_BUFFERS ...
#define AVDTP_MAX_TRANSPORT_CHANNELS ...
#define AVDTP_MAX_TX_BUFFER_LEN ...
#define AVDTP_MAX_CMD_PARAM_LEN ...
#define AVDTP_CODEC_CONFIG_BUFFER_LEN ...
#include "cdbt/bt/bt_oem_config.h"

Macro Definition Documentation

#define AVDTP_CODEC_CONFIG_BUFFER_LEN   16

Size of the buffer used to store codec specific configuration.

Each codec uses unique configuration which can take different amount of memory. This parameter defines the size of the buffer for storing codec's configuration. The value of 16 is sufficient for SBC, AAC and MPEG1,2. If vendor specific codec is to be used this value may need to increased.

#define AVDTP_MAX_CMD_BUFFERS

Maximum number of command buffers.

This parameter defines the number of buffers reserved for sending commands to a remote device over its control channel. Each channel uses its own buffers so the total number of buffers is AVDTP_MAX_REMOTE_DEVICES * AVDTP_MAX_CMD_BUFFERS. The minimum value is 1. The maximum value is 255. 2 is usually sufficient.

#define AVDTP_MAX_CMD_PARAM_LEN   (AVDTP_MAX_TX_BUFFER_LEN - 2)

Maximum length of control command parameters.

This parameter defines the maximum length of all command parameters. The value should not exceed AVDTP_MAX_TX_BUFFER_LEN - 2 (command header).

#define AVDTP_MAX_REMOTE_DEVICES

Maximum number of remote devices a local device can be connected to.

This parameter defines the number of remote devices a local device can have simultaneous connections to (i.e. control channels). This value should not exceed AVDTP_MAX_STREAMS. For each remote device AVDTP creates one control channel regardless of the number of streams between the local and the remote devices. Assuming that the local devices wants to have only one channel with each remote device and if AVDTP_MAX_REMOTE_DEVICES > AVDTP_MAX_STREAMS all memory reserved for devices in excess of AVDTP_MAX_STREAMS will be wasted. The minimum value is 1. The maximum value is 255.

#define AVDTP_MAX_SEP

Maximum number of SEPs that can be exposed by a local device.

This parameter defines the number of SEPs an application can expose to remote devices. The minimum value is 1. The maximum value is 255.

#define AVDTP_MAX_STREAMS

Maximum number of streams that can be exposed by a local device.

This parameter defines the number of streams an application can open between local and remote devices. This value can be different from AVDTP_MAX_SEP but should not exceed it. Since each SEP can only be used once the local device can only have as much streams as there are SEPs. If AVDTP_MAX_STREAMS > AVDTP_MAX_SEP all memory reserved for streams in excess of AVDTP_MAX_SEP will be wasted. The minimum value is 1. The maximum value is 255.

#define AVDTP_MAX_TRANSPORT_CHANNELS

Maximum number of transport channels.

Depending on the SEP capabilities (multiplexing, recovery, reporting) each stream may need up to 3 transport channels. E.g., if multiplexing is not supported and recovery and reporting are supported a stream will use 3 transport channels - 1 for media transport session, 1 for recovery transport session and 1 for reporting transport session. If multiplexing is not supported and only reporting is supported the stream will use 2 transport channels - 1 for media transport session and 1 for reporting transport session. If multiplexing is supported the stream will need only 1 transport channel for all supported transport session. With multiplexing even different streams can share the same transport channel. dotstack currently does not support multiplexing, recovery and reporting. So each stream needs its own transport channel for it media transport session. Hence, AVDTP_MAX_TRANSPORT_CHANNELS must be equal to AVDTP_MAX_STREAMS

#define AVDTP_MAX_TX_BUFFER_LEN   32

Size of the transmit buffer.

This parameter defines the size of the buffer used to send AVDTP control commands to L2CAP layer. Each control channel has it own buffer so the total amount of memory allocated for these buffers is AVDTP_MAX_TX_BUFFER_LEN) * AVDTP_MAX_REMOTE_DEVICES. The minimum value is 1. The maximum value is 255. The value of 32 is usually sufficient.