![]() |
MT2523 API Reference
LinkIt SDK v4
|
This section defines the macros for the SPP. More...
This section defines the macros for the SPP.
Macros | |
| #define | BT_SPP_INVALID_HANDLE 0x00000000 |
| An invalid value for the SPP handle. | |
| #define | BT_SPP_SDP_ATTRIBUTE_UUID_LENGTH BT_SDP_ATTRIBUTE_HEADER_8BIT(17) |
| Attribute value length of the SPP service class ID list. | |
| #define | BT_SPP_SDP_ATTRIBUTE_UUID BT_SDP_UUID_128BIT |
| Attribute value of the SPP service class ID list. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESCRIPTOR(server_id) |
| Attribute value of the SPP protocol descriptor list. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_PUBLIC_BROWSE_GROUP |
| Attribute value of the SPP Public Browse Group. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_LANGUAGE |
| Attribute value of the SPP language base. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_SIZE_OF_SERVICE_NAME(size) BT_SDP_TEXT_8BIT(size) |
| The SPP service name's size. | |
| #define | BT_SPP_SDP_ATTRIBUTE_SERVICE_CLASS_ID_LIST(uuid_array) BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_SERVICE_CLASS_ID_LIST, uuid_array) |
| The SPP service class ID list attribute. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESC_LIST(protocol_descriptor_array) BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_PROTOCOL_DESC_LIST, protocol_descriptor_array) |
| The SPP protocol descriptor list attribute. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_BROWSE_GROUP_LIST(browse_group_array) BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_BROWSE_GROUP_LIST, browse_group_array) |
| The SPP Public Browse Group attribute. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_LANGUAGE_BASE_LIST(language_array) BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_LANG_BASE_ID_LIST, language_array) |
| The SPP language base ID list attribute. More... | |
| #define | BT_SPP_SDP_ATTRIBUTE_SERVICE_NAME(name_array) BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_SERVICE_NAME + 0x0100, name_array) |
| The SPP service name attribute. More... | |
| #define | BT_SPP_CONNECT_IND (BT_MODULE_SPP | 0x0000) |
| The SPP event definitions. More... | |
| #define | BT_SPP_CONNECT_CNF (BT_MODULE_SPP | 0x0001) |
| The result of a connect attempt initiated by a local or remote device is available. More... | |
| #define | BT_SPP_DISCONNECT_IND (BT_MODULE_SPP | 0x0002) |
| A disconnect attempt is initiated by a local or remote device or a link loss occurred. More... | |
| #define | BT_SPP_DATA_RECEIVED_IND (BT_MODULE_SPP | 0x0003) |
| Data was received from the remote device. More... | |
| #define | BT_SPP_READY_TO_SEND_IND (BT_MODULE_SPP | 0x0004) |
| The Bluetooth TX buffer has free space for sending data. More... | |
| #define | BT_STATUS_SPP_TX_NOT_AVAILABLE (BT_MODULE_SPP |0xE0) |
| Define for SPP failed status. More... | |
| #define | BT_SPP_SERVER_ID_START 0x06 |
| This enumeration defines the SPP server ID as an input parameter assigned to BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESCRIPTOR. More... | |
| #define | BT_SPP_SERVER_ID_END 0x1E |
| End of the SPP server ID. More... | |
| #define BT_SPP_CONNECT_CNF (BT_MODULE_SPP | 0x0001) |
The result of a connect attempt initiated by a local or remote device is available.
The structure for this event is defined as bt_spp_connect_cnf_t.
| #define BT_SPP_CONNECT_IND (BT_MODULE_SPP | 0x0000) |
The SPP event definitions.
A connect attempt is initiated from a remote device. Call the function bt_spp_connect_response() to accept or reject the attempt. The structure for this event is defined as bt_spp_connect_ind_t.
| #define BT_SPP_DATA_RECEIVED_IND (BT_MODULE_SPP | 0x0003) |
Data was received from the remote device.
The "packet" and "pakcet_length" fields describe the received data. The structure for this event is defined as bt_spp_data_received_ind_t.
| #define BT_SPP_DISCONNECT_IND (BT_MODULE_SPP | 0x0002) |
A disconnect attempt is initiated by a local or remote device or a link loss occurred.
The structure for this event is defined as bt_spp_disconnect_ind_t.
| #define BT_SPP_READY_TO_SEND_IND (BT_MODULE_SPP | 0x0004) |
The Bluetooth TX buffer has free space for sending data.
Call the function bt_spp_send() to send the application data. The structure for this event is defined as bt_spp_ready_to_send_ind_t.
| #define BT_SPP_SDP_ATTRIBUTE_BROWSE_GROUP_LIST | ( | browse_group_array | ) | BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_BROWSE_GROUP_LIST, browse_group_array) |
The SPP Public Browse Group attribute.
| [in] | browse_group_array | is an array to hold the BT_SPP_SDP_ATTRIBUTE_PUBLIC_BROWSE_GROUP. |
| #define BT_SPP_SDP_ATTRIBUTE_LANGUAGE |
Attribute value of the SPP language base.
| #define BT_SPP_SDP_ATTRIBUTE_LANGUAGE_BASE_LIST | ( | language_array | ) | BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_LANG_BASE_ID_LIST, language_array) |
The SPP language base ID list attribute.
| [in] | language_array | is an array to hold the BT_SPP_SDP_ATTRIBUTE_LANGUAGE. |
| #define BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESC_LIST | ( | protocol_descriptor_array | ) | BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_PROTOCOL_DESC_LIST, protocol_descriptor_array) |
The SPP protocol descriptor list attribute.
| [in] | protocol_descriptor_array | is an array to hold the BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESCRIPTOR. |
| #define BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESCRIPTOR | ( | server_id | ) |
Attribute value of the SPP protocol descriptor list.
| [in] | server_id | is a uint8 RFCOMM channel number between 0x06 and 0x1E. |
| #define BT_SPP_SDP_ATTRIBUTE_PUBLIC_BROWSE_GROUP |
Attribute value of the SPP Public Browse Group.
Any SDP attribute structure can include this attribute to add itself to the root level of the Public Browse Group.
| #define BT_SPP_SDP_ATTRIBUTE_SERVICE_CLASS_ID_LIST | ( | uuid_array | ) | BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_SERVICE_CLASS_ID_LIST, uuid_array) |
The SPP service class ID list attribute.
| [in] | uuid_array | is an array to hold the BT_SPP_SDP_ATTRIBUTE_UUID. |
| #define BT_SPP_SDP_ATTRIBUTE_SERVICE_NAME | ( | name_array | ) | BT_SDP_ATTRIBUTE(BT_SDP_ATTRIBUTE_ID_SERVICE_NAME + 0x0100, name_array) |
The SPP service name attribute.
| [in] | name_array | is an array including the size of name(BT_SPP_SDP_ATTRIBUTE_SIZE_OF_SERVICE_NAME) and its text or string name. |
| #define BT_SPP_SDP_ATTRIBUTE_UUID BT_SDP_UUID_128BIT |
Attribute value of the SPP service class ID list.
| [in] | uuid128 | is a 128-bit UUID of the SPP server. |
| #define BT_SPP_SERVER_ID_END 0x1E |
End of the SPP server ID.
| #define BT_SPP_SERVER_ID_START 0x06 |
This enumeration defines the SPP server ID as an input parameter assigned to BT_SPP_SDP_ATTRIBUTE_PROTOCOL_DESCRIPTOR.
If multiple SPP SDP records exist, there must be a different server ID in each record.Beginning of the SPP server ID.
| #define BT_STATUS_SPP_TX_NOT_AVAILABLE (BT_MODULE_SPP |0xE0) |
Define for SPP failed status.
The error code after calling the function bt_spp_send() to send the application data.