listed gatt commands

This commit is contained in:
mila@ringwald.ch 2014-05-08 08:50:34 +00:00
parent 858f985fed
commit 90f3290fb6
2 changed files with 167 additions and 3 deletions

View File

@ -194,9 +194,24 @@ extern "C" {
#define GAP_LE_CONNECT 0x62
// GATT (Client) 0x70
#define GATT_START 0x70
#define GATT_STOP 0x71
#define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x72
#define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70
#define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71
#define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72
#define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73
#define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74
#define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75
#define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTOR 0x76
#define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77
#define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78
#define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79
#define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A
#define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B
#define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C
#define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D
#define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E
#define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F
#define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80
#define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81
//
#define IS_COMMAND(packet, command) (READ_BT_16(packet,0) == command.opcode)

View File

@ -765,5 +765,154 @@ const hci_cmd_t gatt_discover_primary_services_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_ALL_PRIMARY_SERVICES), "H"
};
/**
* @param handle
* @param uuid16
*/
const hci_cmd_t gatt_discover_primary_services_by_uuid16_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16), "H2"
};
/**
* @param handle
* @param uuid128
*/
const hci_cmd_t gatt_discover_primary_services_by_uuid128_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128), "HP"
};
/**
* @param handle
* @param service
*/
const hci_cmd_t gatt_find_included_services_for_service_cmd = {
OPCODE(OGF_BTSTACK, GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE), "HX"
};
/**
* @param handle
* @param service
*/
const hci_cmd_t gatt_discover_characteristics_for_service_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE), "HX"
};
/**
* @param handle
* @param service
* @param uuid128
*/
const hci_cmd_t gatt_discover_characteristics_for_service_by_uuid128_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128), "HXP"
};
/**
* @param handle
* @param characteristic
*/
const hci_cmd_t gatt_discover_characteristic_descriptors_cmd = {
OPCODE(OGF_BTSTACK, GATT_DISCOVER_CHARACTERISTIC_DESCRIPTOR), "HY"
};
/**
* @param handle
* @param characteristic
*/
const hci_cmd_t gatt_read_value_of_characteristic_cmd = {
OPCODE(OGF_BTSTACK, GATT_READ_VALUE_OF_CHARACTERISTIC), "HY"
};
/**
* @param handle
* @param characteristic
*/
const hci_cmd_t gatt_read_long_value_of_characteristic_cmd = {
OPCODE(OGF_BTSTACK, GATT_READ_LONG_VALUE_OF_CHARACTERISTIC), "HY"
};
/**
* @param handle
* @param characteristic
* @param data_length
* @param data
*/
const hci_cmd_t gatt_write_value_of_characteristic_without_response_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE), "HYLV"
};
/**
* @param handle
* @param characteristic
* @param data_length
* @param data
*/
const hci_cmd_t gatt_write_value_of_characteristic_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_VALUE_OF_CHARACTERISTIC), "HYLV"
};
/**
* @param handle
* @param characteristic
* @param data_length
* @param data
*/
const hci_cmd_t gatt_write_long_value_of_characteristic_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC), "HYLV"
};
/**
* @param handle
* @param characteristic
* @param data_length
* @param data
*/
const hci_cmd_t gatt_reliable_write_long_value_of_characteristic_cmd = {
OPCODE(OGF_BTSTACK, GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC), "HYLV"
};
/**
* @param handle
* @param descriptor
*/
const hci_cmd_t gatt_read_characteristic_descriptor_cmd = {
OPCODE(OGF_BTSTACK, GATT_READ_CHARACTERISTIC_DESCRIPTOR), "HZ"
};
/**
* @param handle
* @param descriptor
*/
const hci_cmd_t gatt_read_long_characteristic_descriptor_cmd = {
OPCODE(OGF_BTSTACK, GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR), "HZ"
};
/**
* @param handle
* @param descriptor
* @param data_length
* @param data
*/
const hci_cmd_t gatt_write_characteristic_descriptor_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_CHARACTERISTIC_DESCRIPTOR), "HZLV"
};
/**
* @param handle
* @param descriptor
* @param data_length
* @param data
*/
const hci_cmd_t gatt_write_long_characteristic_descriptor_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR), "HZLV"
};
/**
* @param handle
* @param characteristic
*/
const hci_cmd_t gatt_write_client_characteristic_configuration_cmd = {
OPCODE(OGF_BTSTACK, GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION), "HY2"
};
// register rfcomm service: @param channel(8), mtu (16), initial credits (8)
extern const hci_cmd_t rfcomm_register_service_with_initial_credits;