dotstack API Reference
1.10.37
|
This module describes parameters used to configure RFCOMM layer. More...
Macros | |
#define | RFCOMM_MAX_SESSIONS |
Maximum number of remote devices a local device can be connected to. More... | |
#define | RFCOMM_MAX_DLCS |
Maximum number of DLCs. More... | |
#define | RFCOMM_MAX_SERVER_CHANNELS |
Maximum number of Server channels. More... | |
#define | RFCOMM_INFO_LEN (HCI_L2CAP_BUFFER_LEN - RFCOMM_FRAME_HEADER_LEN - L2CAP_HEADER_LEN) |
Maximum size of the data portion of a UIH frame. More... | |
#define | RFCOMM_MAX_CMD_BUFFERS |
Maximum number of command buffers. More... | |
#define | RFCOMM_LOCAL_CREDIT |
The number of receive buffers. More... | |
#define | RFCOMM_ENABLE_MULTIDEVICE_CHANNELS BT_FALSE |
Enable multi-device server channels. More... | |
This module describes parameters used to configure RFCOMM 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.
#define RFCOMM_ENABLE_MULTIDEVICE_CHANNELS BT_FALSE |
Enable multi-device server channels.
Normally each server channel can be used only once. I.e. if device A connected to channel 1, device B cannot connect to channel 1 until device A disconnects. With this option it is possible to make channels accept connections from several devices at the same time. I.e., if RFCOMM_ENABLE_MULTIDEVICE_CHANNELS is TRUE both device A and device B can connect to channel 1 at the same time.
#define RFCOMM_INFO_LEN (HCI_L2CAP_BUFFER_LEN - RFCOMM_FRAME_HEADER_LEN - L2CAP_HEADER_LEN) |
Maximum size of the data portion of a UIH frame.
This parameter defines the maximum size of the data portion of a UIH frame. If CFC is used the actual length of the data portion will be 1 byte less. This value must be less than or equal to HCI_L2CAP_BUFFER_LEN - RFCOMM_FRAME_HEADER_LEN - L2CAP_HEADER_LEN.
#define RFCOMM_LOCAL_CREDIT |
The number of receive buffers.
This parameter defines the number of received UIH frames that can be stored on the local device. The flow control mechanism used in RFCOMM ensures that the remote side of the link always knows how many free buffers left on the local device. When the number of free buffers reaches 0, the transmitter stops sending data frames until the receiver frees some buffers. The RFCOMM layer does not actually allocate space for buffers. It uses RFCOMM_LOCAL_CREDIT to keep track of free buffers and report them to the remote side. Actual memory allocation is done in SPP layer.
#define RFCOMM_MAX_CMD_BUFFERS |
Maximum number of command buffers.
This parameter defines the maximum number of commands that can be sent at the same time. It is usually enough to reserve 2 buffers for each DLC excluding control DLC. Therefore, this value can be defined as
#define RFCOMM_MAX_CMD_BUFFERS (RFCOMM_MAX_DLCS - 1) * 2
#define RFCOMM_MAX_DLCS |
Maximum number of DLCs.
This parameter defines the maximum number of DLCs on each session. This value should be at least 2 because each session uses one DLC to convey multiplexer control messages. All other DLCs are used to emulate serial ports.
#define RFCOMM_MAX_SERVER_CHANNELS |
Maximum number of Server channels.
This parameter defines the maximum number of server channels exposed by the local device. This value should not exceed RFCOMM_MAX_DLCS - 1.
#define RFCOMM_MAX_SESSIONS |
Maximum number of remote devices a local device can be connected to.
This parameter defines the maximum number of remote devices a local device can have simultaneous connections to. This value should not exceed HCI_MAX_ACL_CONNECTIONS.