![]() |
WL865E4-P
36.07.001
|
This section describes the M2MB APIs for BLE functionality.. More...
This section describes the M2MB APIs for BLE functionality..
BLE stands for Bluetooth Low Energy(Bluetooth LE,and marketed as Bluetooth Smart). BLE is a form of wireless communication designed specially for short range communication. BLE is very similar to Wi-Fi in the sense that it allows devices to communicate with each other.However, BLE is meant for situations where battery life is preferred over high data transfer speeds.
#define ASSIGN_HOST_WORD_TO_LITTLE_ENDIAN_UNALIGNED_WORD | ( | _x, | |
_y | |||
) |
The following MACRO is a utility MACRO that exists to aid in the
Comparison of two M2MB_BLE_BD_ADDR_T variables.This MACRO only
returns whether the two M2MB_BLE_BD_ADDR_T variables are equal
(MACRO returns boolean result) NOT less than/greater than. The
two parameters to this MACRO are both of type M2MB_BLE_BD_ADDR_T
and represent the M2MB_BLE_BD_ADDR_T variables to compare.
Definition at line 258 of file m2mb_ble_driver.h.
#define BLE_SERVICE_FLAGS (M2MB_BLE_GATT_SERVICE_FLAGS_LE_SERVICE) |
The following persist device handle
Definition at line 292 of file m2mb_ble_driver.h.
#define DEVICE_INFO_FLAGS_SERVICE_DISCOVERY_OUTSTANDING 0x08 |
Definition at line 3398 of file m2mb_ble_driver.h.
#define M2MB_BLE_ADVERTISING_DATA_MAXIMUM_SIZE 31 |
The following type defines the buffer that is used to write or
read the advertising data to be advertised by the local device
(Version 4.0 + LE).The size of this buffer is always fixed.
Definition at line 592 of file m2mb_ble_driver.h.
#define M2MB_BLE_ASSIGN_BD_ADDR | ( | _dest, | |
_a, | |||
_b, | |||
_c, | |||
_d, | |||
_e, | |||
_f | |||
) |
The following defines the valid length of the GATT Client Characteristic Configuration descriptor.
Definition at line 192 of file m2mb_ble_driver.h.
#define M2MB_BLE_ASSIGN_BLUETOOTH_UUID_16 | ( | _dest, | |
_a, | |||
_b | |||
) |
The following MACRO is a utility MACRO that exists to aid in the
Comparison of two M2MB_BLE_UUID_16_T variables.This MACRO only
returns whether the two M2MB_BLE_UUID_16_T variables are equal
(MACRO returns boolean result) NOT less than/greater than. The
first parameter the the M2MB_BLE_UUID_16_T variable.The next two are the individual byte values to do the comparison with.The
bytes are NOT in Little Endian Format.
Definition at line 3706 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_FOUND 0x0A |
Definition at line 137 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_LONG 0x0B |
Definition at line 138 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHENTICATION 0x05 |
Definition at line 132 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHORIZATION 0x08 |
Definition at line 135 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION 0x0F |
Definition at line 142 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE 0x0C |
Definition at line 139 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_RESOURCES 0x11 |
The following define the valid values (bit mask) for ble parameters
Definition at line 144 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_ATTRIBUTE_VALUE_LENGTH 0x0D |
Definition at line 140 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_HANDLE 0x01 |
Definition at line 128 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_OFFSET 0x07 |
Definition at line 134 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_PDU 0x04 |
Definition at line 131 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_PREPARE_QUEUE_FULL 0x09 |
Definition at line 136 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_READ_NOT_PERMITTED 0x02 |
Definition at line 129 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_REQUEST_NOT_SUPPORTED 0x06 |
Definition at line 133 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_UNLIKELY_ERROR 0x0E |
Definition at line 141 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_UNSUPPORTED_GROUP_TYPE 0x10 |
Definition at line 143 of file m2mb_ble_driver.h.
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_WRITE_NOT_PERMITTED 0x03 |
Definition at line 130 of file m2mb_ble_driver.h.
#define M2MB_BLE_BTPS_STRUCTURE_OFFSET | ( | _x, | |
_y | |||
) | ((unsigned int)&(((_x *)0)->_y)) |
The following MACRO is a utility MACRO that exists to assign the
individual Byte values into the specified UUID variable. The
Bytes are NOT in Little Endian Format, however they ARE assigned
to the UUID variable in Little Endian Format. The first parameter is the UUID variable (of type M2MB_BLE_UUID_16_T) to assign, and
the next 2 parameters are the Individual UUID Byte values to
assign to the UUID variable.
Definition at line 3694 of file m2mb_ble_driver.h.
#define M2MB_BLE_COMPARE_BD_ADDR | ( | _x, | |
_y | |||
) | (((_x).BD_ADDR0 == (_y).BD_ADDR0) && ((_x).BD_ADDR1 == (_y).BD_ADDR1) && ((_x).BD_ADDR2 == (_y).BD_ADDR2) && ((_x).BD_ADDR3 == (_y).BD_ADDR3) && ((_x).BD_ADDR4 == (_y).BD_ADDR4) && ((_x).BD_ADDR5 == (_y).BD_ADDR5)) |
The following MACRO is a utility MACRO that exists to aid in the
Comparison of a M2MB_BLE_BD_ADDR_T variables to the NULL BD_ADDR. This MACRO only returns whether the the M2MB_BLE_BD_ADDR_T
variable is equal to the NULL BD_ADDR (MACRO returns boolean
result) NOT less than/greater than. The parameter to this MACRO
is the M2MB_BLE_BD_ADDR_T structure to compare to the NULL
BD_ADDR.
Definition at line 277 of file m2mb_ble_driver.h.
#define M2MB_BLE_COMPARE_BLUETOOTH_UUID_128_TO_CONSTANT | ( | _x, | |
_a, | |||
_b, | |||
_c, | |||
_d, | |||
_e, | |||
_f, | |||
_g, | |||
_h, | |||
_i, | |||
_j, | |||
_k, | |||
_l, | |||
_m, | |||
_n, | |||
_o, | |||
_p | |||
) |
Structure that represents a container structure for Passkey response to the user.
Definition at line 3743 of file m2mb_ble_driver.h.
#define M2MB_BLE_COMPARE_BLUETOOTH_UUID_16_TO_CONSTANT | ( | _x, | |
_a, | |||
_b | |||
) |
The following MACRO is a utility MACRO that exists to aid in the
Comparison of two M2MB_BLE_UUID_128_T variables. This MACRO only returns whether the two M2MB_BLE_UUID_128_T variables are equal
(MACRO returns boolean result) NOT less than/greater than.The
first parameter this MACRO is of type M2MB_BLE_UUID_128_T
represents the M2MB_BLE_UUID_128_T variable to compare. The next parameters are the constant UUID bytes to do the comparison with. The individual bytes are NOT in Little Endian Format.
Definition at line 3724 of file m2mb_ble_driver.h.
#define M2MB_BLE_COMPARE_NULL_BD_ADDR | ( | _x | ) | (((_x).BD_ADDR0 == 0x00) && ((_x).BD_ADDR1 == 0x00) && ((_x).BD_ADDR2 == 0x00) && ((_x).BD_ADDR3 == 0x00) && ((_x).BD_ADDR4 == 0x00) && ((_x).BD_ADDR5 == 0x00)) |
The following bit-masks define the sevice flags
Definition at line 287 of file m2mb_ble_driver.h.
#define M2MB_BLE_DATA_BUFFER_LENGTH 517 |
BLE Length of data buffer
Definition at line 54 of file m2mb_ble_driver.h.
#define M2MB_BLE_DEVICE_NAME_SIZE 32 |
BLE device name max size
Definition at line 58 of file m2mb_ble_driver.h.
#define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_BLUETOOTH_SIG 0x01 |
Definition at line 174 of file m2mb_ble_driver.h.
#define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_USB_IMPLEMENTORS_FORUM 0x02 |
Definition at line 175 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_BELT_HEART_RATE_SENSOR 833 |
Definition at line 82 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_BLOOD_PRESSURE_ARM 897 |
Definition at line 84 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_BLOOD_PRESSURE_WRIST 898 |
Definition at line 85 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_CYCLING_CADENCE_SENSOR 1155 |
Definition at line 103 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_CYCLING_CYCLING_COMPUTER 1153 |
Definition at line 101 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_CYCLING_POWER_SENSOR 1156 |
Definition at line 104 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_CYCLING_SPEED_AND_CADENCE_SENSOR 1157 |
Definition at line 105 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_CYCLING_SPEED_SENSOR 1154 |
Definition at line 102 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_BARCODE_SCANNER 704 |
Definition at line 78 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_BLOOD_PRESSURE 896 |
Definition at line 83 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_CLOCK 256 |
Definition at line 71 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_COMPUTER 128 |
Definition at line 68 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_CYCLING 1152 |
Definition at line 100 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_DISPLAY 320 |
Definition at line 72 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_EYE_GLASSES 448 |
Definition at line 74 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_GENERIC_REMOTE_CONTROL 384 |
Definition at line 73 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_GLUCOSE_METER 1024 |
Definition at line 95 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_HEART_RATE_SENSOR 832 |
Definition at line 81 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_KEYRING 576 |
Definition at line 76 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_MEDIA_PLAYER 640 |
Definition at line 77 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_OUTDOOR_SPORTS_ACTIVITY 5184 |
Definition at line 110 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_PHONE 64 |
Definition at line 67 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_PULSE_OXIMETER 3136 |
Definition at line 106 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_RUNNING_WALKING_SENSOR 1088 |
Definition at line 96 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_TAG 512 |
Definition at line 75 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_THERMOMETER 768 |
Definition at line 79 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_WATCH 192 |
Definition at line 69 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_GENERIC_WEIGHT_SCALE 3200 |
Definition at line 109 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_BARCODE_SCANNER 968 |
Definition at line 94 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_CARD_READER 966 |
Definition at line 92 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_DIGITAL_PEN 967 |
Definition at line 93 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_DIGITIZER_TABLET 965 |
Definition at line 91 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_GAMEPAD 964 |
Definition at line 90 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_JOYSTICK 963 |
Definition at line 89 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_KEYBOARD 961 |
Definition at line 87 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HID_MOUSE 962 |
Definition at line 88 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_HUMAN_INTERFACE_DEVICE 960 |
Definition at line 86 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_OUTDOOR_SPORTS_ACTIVITY_LOCATION_AND_NAVIGATION_DISPLAY_DEVICE 5186 |
Definition at line 112 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_OUTDOOR_SPORTS_ACTIVITY_LOCATION_AND_NAVIGATION_POD 5188 |
The following define the valid values (bit mask) for Device info
Definition at line 114 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_OUTDOOR_SPORTS_ACTIVITY_LOCATION_DISPLAY_DEVICE 5185 |
Definition at line 111 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_OUTDOOR_SPORTS_ACTIVITY_LOCATION_POD 5187 |
Definition at line 113 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_PULSE_OXIMETER_FINGERTIP 3137 |
Definition at line 107 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_PULSE_OXIMETER_WRIST_WORN 3138 |
Definition at line 108 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_RUNNING_WALKING_SENSOR_IN_SHOE 1089 |
Definition at line 97 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_RUNNING_WALKING_SENSOR_ON_HIP 1091 |
Definition at line 99 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_RUNNING_WALKING_SENSOR_ON_SHOE 1090 |
Definition at line 98 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_SPORTS_WATCH 193 |
Definition at line 70 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_THERMOMETER_EAR 769 |
Definition at line 80 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_DEVICE_APPEARANCE_VALUE_UNKNOWN 0 |
Definition at line 66 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_FLAGS_KEYPRESS_NOTIFICATIONS 0x00000001 |
Indicates support for Secure Connections Pairing.
Definition at line 232 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_FLAGS_LOCAL_OOB_DATA_VALID 0x00000010 |
The following constants represent the defined flag bit-mask values. Initialize GATT to support LE.
Definition at line 240 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_FLAGS_MITM_REQUESTED 0x00000004 |
Indicates that out of band data is present for other device.
Definition at line 236 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_FLAGS_OOB_DATA_PRESENT 0x00000008 |
Indicates if LocalOOBData member of M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_T structure is valid.
Definition at line 238 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_FLAGS_SECURE_CONNECTIONS 0x00000002 |
Indicates request for Man in the Middle protection.
Definition at line 234 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_SIZE (sizeof(M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_T)) |
HCI type and structure The following type declaration represents the structure of all Data that is needed to open an HCI Port. The following Type Declaration defines the currently supported
Physical Bluetooth HCI Device Interfaces that are supported by
the HCI Packet Driver.
Definition at line 3181 of file m2mb_ble_driver.h.
#define M2MB_BLE_GAP_MAXIMUM_DEVICE_NAME_LENGTH 248 |
All the structure and prototype for central device support
Definition at line 3395 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_ATTRIBUTE_FLAGS_HIDDEN 0x04 |
GATT attribute is hidden. GATT attribute is readable and writable.
Definition at line 222 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_ATTRIBUTE_FLAGS_READABLE 0x01 |
GATT attribute is readable.
Definition at line 220 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_ATTRIBUTE_FLAGS_READABLE_WRITABLE (M2MB_BLE_GATT_ATTRIBUTE_FLAGS_READABLE|M2MB_BLE_GATT_ATTRIBUTE_FLAGS_WRITABLE) |
The following bit-masks define the allowable flags that may be specified in the Service_Flags parameter.
Definition at line 224 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_ATTRIBUTE_FLAGS_WRITABLE 0x02 |
GATT attribute is writable.
Definition at line 221 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_AUTHENTICATED_SIGNED_WRITES 0x40 |
Definition at line 158 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_BROADCAST 0x01 |
Definition at line 152 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_EXTENDED_PROPERTIES 0x80 |
The following define GATT Client Configuration Characteristic Definitions
Definition at line 159 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_INDICATE 0x20 |
Definition at line 157 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_NOTIFY 0x10 |
Definition at line 156 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_READ 0x02 |
Definition at line 153 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE 0x08 |
Definition at line 155 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE_WITHOUT_RESPONSE 0x04 |
Definition at line 154 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CLIENT_CHARACTERISTIC_CONFIGURATION_BLUETOOTH_UUID_CONSTANT { 0x02, 0x29 } |
The following values define the valid values that the Vendor ID Source field of the DIS PNP characteristic may contain.
Definition at line 168 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CLIENT_CHARACTERISTIC_CONFIGURATION_LENGTH (M2MB_BLE_NON_ALIGNED_WORD_SIZE) |
The following bit masks define that allowable flags that may be specified in the Attribute_Flags member of the M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T structure.
Definition at line 215 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CLIENT_CONFIGURATION_CHARACTERISTIC_INDICATE_ENABLE 0x0002 |
The following defines the GATT Client Characteristic Configuration UUID that is used when building the service tables.
Definition at line 163 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_CLIENT_CONFIGURATION_CHARACTERISTIC_NOTIFY_ENABLE 0x0001 |
Definition at line 162 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_INITIALIZATION_FLAGS_DISABLE_SERVICE_CHANGED_CHARACTERISTIC 0x00000004L |
Read unaligned BYTE little endian
Definition at line 249 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_INITIALIZATION_FLAGS_SUPPORT_LE 0x00000001L |
Disable the Service Changed Characteristic when GATT is initialized.
Definition at line 246 of file m2mb_ble_driver.h.
#define M2MB_BLE_GATT_SERVICE_FLAGS_LE_SERVICE 0x01 |
Initialize GATT service to support LE Indicates capability of sending keypress notifications.
Definition at line 229 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAX_PAIRED_DEVICES 7 |
Maxmium paired devices allowed Generic event types and structures Structure that contains the attribute handles that will need to be cached by a client in order to only do service discovery once.
Definition at line 297 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_ADVERITISING_HANDLE 0xEF |
Minimum extended scan interval. This is specified in milli-seconds.
Definition at line 3458 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_ADVERTISING_INTERVAL 10240 |
Minimum allowable advertising interval if non-connectable advertising is being used.
Definition at line 3430 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_EXTENDED_ADVERTISING_DURATION 655350 |
Minimum extended scan duration. This is specified in milli-seconds.
Definition at line 3482 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_EXTENDED_SCAN_DURATION 655350 |
Minimum extended scan period. This is specified in milli-seconds.
Definition at line 3490 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_EXTENDED_SCAN_INTERVAL 40959 |
Minimum extended scan window. This is specified in milli-seconds.
Definition at line 3466 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_EXTENDED_SCAN_PERIOD 83884800 |
Minimum allowable connection interval (min) that may be specified (in milliseconds).
Definition at line 3498 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_EXTENDED_SCAN_WINDOW 40959 |
Minimum extended advertising duration. This is specified in milli-seconds.
Definition at line 3474 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_LE_SCAN_INTERVAL 10240 |
Minimum allowable LE scan window (in milliseconds) that can be used with the qapi_BLE_GAP_LE_Perform_Scan() function.
Definition at line 3408 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_LE_SCAN_WINDOW 10240 |
Minimum allowable scan length (in seconds) for limited discoverable mode scans.
Definition at line 3416 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_MAXIMUM_CONNECTION_INTERVAL 4000 |
Structure that represents the container structure for holding all the GATT service discovery event data.
Definition at line 3514 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_MINIMUM_CONNECTION_INTERVAL 4000 |
Minimum allowable connection interval (max) that may be specified (in milliseconds).
Definition at line 3506 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_PERIODIC_ADVERTISING_INTERVAL 81919 |
Minimum advertising handle that may be specified with the extended advertising API's.
Definition at line 3450 of file m2mb_ble_driver.h.
#define M2MB_BLE_MAXIMUM_PRIMARY_ADVERTISING_INTERVAL 10485759 |
Minimum periodic advertising interval value that may be used with periodic advertising.
Definition at line 3442 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_ADVERITISING_HANDLE 0 |
Maximum advertising handle that may be specified with the extended advertising API's.
Definition at line 3454 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_ADVERTISING_INTERVAL 20 |
Maximum allowable advertising interval.
Definition at line 3427 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_EXTENDED_ADVERTISING_DURATION 0 |
Maximum extended advertising duration. This is specified in milli-seconds.
Definition at line 3478 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_EXTENDED_SCAN_DURATION 10 |
Maximum extended scan duration. This is specified in milli-seconds.
Definition at line 3486 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_EXTENDED_SCAN_INTERVAL 3 |
Maximum extended scan interval. This is specified in milli-seconds.
Definition at line 3462 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_EXTENDED_SCAN_PERIOD 1280 |
Maximum extended scan period. This is specified in milli-seconds.
Definition at line 3494 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_EXTENDED_SCAN_WINDOW 3 |
Maximum extended scan window. This is specified in milli-seconds.
Definition at line 3470 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_GENERAL_DISCOVERABLE_SCAN_LENGTH 11 |
Minimum allowable advertising interval.
Definition at line 3424 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_LE_SCAN_INTERVAL 3 |
< Minimum allowable LE scan interval (in milliseconds) that can be used with the qapi_BLE_GAP_LE_Perform_Scan() function. Maximum allowable LE scan interval (in milliseconds) that can be used with the qapi_BLE_GAP_LE_Perform_Scan() function.
Definition at line 3404 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_LE_SCAN_WINDOW 3 |
Maximum allowable LE scan window (in milliseconds) that can be used with the qapi_BLE_GAP_LE_Perform_Scan() function.
Definition at line 3412 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_LIMITED_DISCOVERABLE_SCAN_LENGTH 11 |
Minimum allowable scan length (in seconds) for general discoverable mode scans.
Definition at line 3420 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_MAXIMUM_CONNECTION_INTERVAL 8 |
Maximum allowable connection interval (max) that may be specified (in milliseconds).
Definition at line 3510 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_MINIMUM_CONNECTION_INTERVAL 8 |
Maximum allowable connection interval (min) that may be specified (in milliseconds).
Definition at line 3502 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_NONCONNECTABLE_ADVERTISING_INTERVAL 100 |
Minimum primary advertising interval value that may be used with extended advertising.
Definition at line 3434 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_PERIODIC_ADVERTISING_INTERVAL 8 |
Maximum periodic advertising interval value that may be used with periodic advertising.
Definition at line 3446 of file m2mb_ble_driver.h.
#define M2MB_BLE_MINIMUM_PRIMARY_ADVERTISING_INTERVAL 20 |
Maximum primary advertising interval value that may be used with extended advertising.
Definition at line 3438 of file m2mb_ble_driver.h.
#define M2MB_BLE_NON_ALIGNED_WORD_SIZE (sizeof(M2MB_BLE_NONALIGNEDWORD_T)) |
The following MACRO is a utility MACRO that exists to assign the
individual Byte values into the specified BD_ADDR variable. The
Bytes are NOT in Little Endian Format, however, they are assigned to the BD_ADDR variable in Little Endian Format. The first
parameter is the BD_ADDR variable (of type qapi_BLE_BD_ADDR_t) to assign, and the next six parameters are the Individual BD_ADDR
Byte values to assign to the variable.
Definition at line 182 of file m2mb_ble_driver.h.
#define M2MB_BLE_PARAMETERS_FLAGS_ADVERTISING_PARAMETERS_VALID 0x00000001 |
Definition at line 147 of file m2mb_ble_driver.h.
#define M2MB_BLE_PARAMETERS_FLAGS_CONNECTION_PARAMETERS_VALID 0x00000004 |
The following define GATT Characteristic Properties Definitions
Definition at line 149 of file m2mb_ble_driver.h.
#define M2MB_BLE_PARAMETERS_FLAGS_SCAN_PARAMETERS_VALID 0x00000002 |
Definition at line 148 of file m2mb_ble_driver.h.
#define M2MB_BLE_PASSKEY 123456 |
BLE fixed passkey value
Definition at line 56 of file m2mb_ble_driver.h.
#define M2MB_BLE_PERSISTENT_DATA_SIZE | ( | _x | ) | (M2MB_BLE_BTPS_STRUCTURE_OFFSET(M2MB_BLE_PERSISTENT_DATA_T, RemoteDevices) + (M2MB_BLE_PERSISTENT_REMOTE_DEVICE_DATA_SIZE * (_x))) |
Definition at line 3822 of file m2mb_ble_driver.h.
#define M2MB_BLE_PERSISTENT_REMOTE_DEVICE_DATA_FLAG_IDENTITY_VALID 0x02 |
Structure that represents a container structure for persistent data for bonding.
Definition at line 3806 of file m2mb_ble_driver.h.
#define M2MB_BLE_PERSISTENT_REMOTE_DEVICE_DATA_FLAG_LTK_VALID 0x01 |
persistent remote device data IRDK valid flag.
Definition at line 3804 of file m2mb_ble_driver.h.
#define M2MB_BLE_PERSISTENT_REMOTE_DEVICE_DATA_SIZE (sizeof(M2MB_BLE_PERSISTENT_DEVICE_REMOTE_DATA_T)) |
persistent remote device data LTK valid flag.
Definition at line 3802 of file m2mb_ble_driver.h.
#define M2MB_BLE_SCAN_RESPONSE_DATA_MAXIMUM_SIZE 31 |
The following type defines the buffer that is used to write or
read the scan response data to be advertised by the local device
(Version 4.0 + LE).The size of this buffer is always fixed.
Definition at line 609 of file m2mb_ble_driver.h.
#define M2MB_DEFAULT_MITM_PROTECTION TRUE |
BLE default value of MITM protection
Definition at line 61 of file m2mb_ble_driver.h.
#define M2MB_DEFAULT_OOBDATAPRESENT FALSE |
BLE default value of OOB data
Definition at line 60 of file m2mb_ble_driver.h.
#define M2MB_DEFAULT_SECURE_CONNECTIONS TRUE |
BLE default value of secure connection The following define the value GAP Device Appearance Values.
Definition at line 62 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_ADDED_TO_RESOLVING_LIST 0x40 |
The following constants represent the defined Attribute Protocol. Error Codes that are defined by the protocol itself.
Definition at line 123 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_ADDED_TO_WHITE_LIST 0x20 |
Definition at line 122 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_BLE_CLIENT 0x04 |
Definition at line 119 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_BLE_SERVER 0x02 |
Definition at line 118 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_IRK_VALID 0x10 |
Definition at line 121 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_LTK_VALID 0x01 |
Definition at line 117 of file m2mb_ble_driver.h.
#define M2MB_DEVICE_INFO_FLAGS_SERVICE_DISCOVERY_OUTSTANDING 0x08 |
Definition at line 120 of file m2mb_ble_driver.h.
#define M2MB_SSL_FAILURE -1 |
Macro for Generic failure
Definition at line 51 of file m2mb_ble_driver.h.
#define M2MB_SSL_FAILURE -1 |
Macro for Generic failure
Definition at line 51 of file m2mb_ble_driver.h.
#define READ_UNALIGNED_BYTE_LITTLE_ENDIAN | ( | _x | ) | (((UINT8 *)(_x))[0]) |
Read unaligned WORD little endian
Definition at line 252 of file m2mb_ble_driver.h.
#define READ_UNALIGNED_WORD_LITTLE_ENDIAN | ( | _x | ) | ((UINT16)((((UINT16)(((UINT8 *)(_x))[1])) << 8) | ((UINT16)(((UINT8 *)(_x))[0])))) |
Assign Host WORD to unaligned WORD little endian
Definition at line 255 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE__ADVERTISING_DATA M2MB_BLE_ADVERTISING_DATA_T |
The following define determines the maximum fixed size that is
used to define the Scan Response Data that can be sent/received in scanning packets for a device.
The following type declaration represents the structure of LE feature Type
typedef struct M2MB_BLE_BD_ADDR_S M2MB_BLE_BD_ADDR_T |
The following type declaration represents the structure of a single Secure Connections Confirmation, C used for OOB mechanism of LE Secure Connections (Version 4.2).
typedef struct M2MB_BLE_CLIENT_INFO M2MB_BLE_CLIENT_INFO_T |
The following structure represents the information we will store on a Discovered GAP Service.
typedef struct M2MB_BLE_DATA_BUFF M2MB_BLE_DATA_BUFF_T |
The following type declaration represents the structure of a single Bluetooth Board Address.
typedef struct M2MB_BLE_DEVICE_INFO M2MB_BLE_DEVICE_INFO_T |
Structure that represents all the data contained in the DIS PNP ID value.
typedef struct M2MB_BLE_DIS_PNP_ID_DATA M2MB_BLE_DIS_PNP_ID_DATA_T |
Structure that represents all the default initialization required to open BLE stack.
typedef struct M2MB_BLE_ENCRYPTION_KEY M2MB_BLE_ENCRYPTION_KEY_T |
The following type declaration represents the structure of a single Long Term Key (Version 4.0 + LE).
Structure that represents all the entries in an Advertising Data Structure.
Structure that represents container structure that is used to represent all the entries in an LE Advertising Report data field.
Structure that represents the type of advertising parameters that may be passed into the connection create() function.
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_ADVERTISING_REPORT_E event. The structure is used to return Advertising Reports returned from multiple devices.
typedef struct M2MB_BLE_GAP_LE_ADVERTISING_REPORT_EVENT_DATA M2MB_BLE_GAP_LE_ADVERTISING_REPORT_EVENT_DATA_T |
This structure is a container that is used to represent all the entries in a LE Direct Advertising Report data field.
typedef struct M2MB_BLE_GAP_LE_ADVERTISING_SET_TERMINATED_EVENT_DATA M2MB_BLE_GAP_LE_ADVERTISING_SET_TERMINATED_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_SCAN_REQUEST_RECEIVED_E vent that is sent by the controller to indicate that a scan request has been received.This event will only received if a scan response is received and the advertising set it is received for requested these events.
typedef struct M2MB_BLE_GAP_LE_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED_EVENT_DATA M2MB_BLE_GAP_LE_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_DATA_LENGTH_CHANGE_E event.
typedef struct M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_CONNECTION_PARAMETER_UPDATE_REQUEST_E event. All members of this structure are specified in milliseconds except Slave_Latency, which is specified in the number of connection events.
typedef struct M2MB_BLE_GAP_LE_AUTHENTICATION_RESPONSE_INFORMATION M2MB_BLE_GAP_LE_AUTHENTICATION_RESPONSE_INFORMATION_T |
GAP LE extended pairing capabilities seize.
typedef struct M2MB_BLE_GAP_LE_CHANNEL_SELECTION_ALGORITHM_UPDATE_EVENT_DATA M2MB_BLE_GAP_LE_CHANNEL_SELECTION_ALGORITHM_UPDATE_EVENT_DATA_T |
This structure is a container structure that holds all GAP LE Event Data.
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_EXTENDED_CONFIRMATION_REQUEST_E.
typedef struct M2MB_BLE_GAP_LE_CONNECTABILITY_PARAMETERS M2MB_BLE_GAP_LE_CONNECTABILITY_PARAMETERS_T |
Structure that represents the type of advertising parameters that may be passed into the set advertise enable() function.
typedef struct M2MB_BLE_GAP_LE_CONNECTION_COMPLETE_EVENT_DATA M2MB_BLE_GAP_LE_CONNECTION_COMPLETE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_DISCONNECTION_COMPLETE_E event.
typedef struct M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATE_REQUEST_EVENT_DATA M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATE_REQUEST_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_CONNECTION_PARAMETER_UPDATE_RESPONSE_E event..
typedef struct M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATE_RESPONSE_EVENT_DATA M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATE_RESPONSE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_CONNECTION_PARAMETER_UPDATED_E event.
typedef struct M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATED_EVENT_DATA M2MB_BLE_GAP_LE_CONNECTION_PARAMETER_UPDATED_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED_E event.
Structure that represents the GAP LE Remote Features Response Event Data that is returned from the read remote features() function in the M2MB_BLE_ET_LE_REMOTE_FEATURES_E GAP LE Event.
typedef struct M2MB_BLE_GAP_LE_CURRENT_CONNECTION_PARAMETERS M2MB_BLE_GAP_LE_CURRENT_CONNECTION_PARAMETERS_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_CONNECTION_COMPLETE_E event.
typedef struct M2MB_BLE_GAP_LE_DATA_LENGTH_CHANGE_EVENT_DATA M2MB_BLE_GAP_LE_DATA_LENGTH_CHANGE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_PHY_UPDATE_COMPLETE_E event.
typedef struct M2MB_BLE_GAP_LE_DIRECT_ADVERTISING_REPORT_DATA M2MB_BLE_GAP_LE_DIRECT_ADVERTISING_REPORT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_DIRECT_ADVERTISING_REPORT_E event.
typedef struct M2MB_BLE_GAP_LE_DIRECT_ADVERTISING_REPORT_EVENT_DATA M2MB_BLE_GAP_LE_DIRECT_ADVERTISING_REPORT_EVENT_DATA_T |
This structure is a container structure for all connection parameters that are present for all LE connections.
typedef struct M2MB_BLE_GAP_LE_DISCONNECTION_COMPLETE_EVENT_DATA M2MB_BLE_GAP_LE_DISCONNECTION_COMPLETE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_ENCRYPTION_CHANGE_E event.
typedef struct M2MB_BLE_GAP_LE_ENCRYPTION_CHANGE_EVENT_DATA M2MB_BLE_GAP_LE_ENCRYPTION_CHANGE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_ENCRYPTION_REFRESH_COMPLETE_E event.
Structure that represents the structure of data that is used to specify the current identity information.
typedef struct M2MB_BLE_GAP_LE_ENCRYPTION_REFRESH_COMPLETE_EVENT_DATA M2MB_BLE_GAP_LE_ENCRYPTION_REFRESH_COMPLETE_EVENT_DATA_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_LONG_TERM_KEY_REQUEST_E.
typedef struct M2MB_BLE_GAP_LE_ENCRYPTION_REQUEST_INFORMATION M2MB_BLE_GAP_LE_ENCRYPTION_REQUEST_INFORMATION_T |
Structure that represents the structure of data that is used to specify the current encryption information..
typedef VOID(* M2MB_BLE_GAP_LE_EVENT_CB_T) (UINT32 BluetoothStackID, M2MB_BLE_GAP_LE_EVENT_DATA_T *GAP_LE_Event_Data, UINT32 CallbackParameter) |
Declared type that represents the Prototype Function for the GAP LE event callback.
This function is called whenever a callback has been registered for the specified GAP LE action that is associated with the specified Bluetooth Stack ID. This function passes to the caller the Bluetooth Stack ID, the GAP LE event data of the specified event, and the GAP LE event callback parameter that was specified when this callback was installed.
The caller should use the contents of the GAP LE event data only in the context of this callback. If the caller requires the data for a longer period of time, the callback function must copy the data into another data buffer.
This function is guaranteed not to be invoked more than once simultaneously for the specified installed callback (i.e., this function does not have be reentrant). It should be noted, however, that if the same callback is installed more than once, then the callbacks will be called serially. Because of this, the processing in this function should be as efficient as possible.
It should also be noted that this function is called in the thread context of a thread that the user does not own. Therefore, processing in this function should be as efficient as possible (this argument holds anyway because other GAP LE events will not be processed while this function call is outstanding).
This function must not block and wait for events that can only be satisfied by receiving other GAP LE events. A deadlock will occur because no GAP LE event callbacks will be issued while this function is currently outstanding.
[in] | BluetoothStackID | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | GAP_LE_Event_Data | Pointer to the passed GAP LE Event data. |
[in] | CallbackParameter | User-defined parameter (e.g., tag value) that was defined in the callback registration. |
VOID m2mb_ble_gap_event_cb(UINT32 bluetoothStackId, M2MB_BLE_GAP_LE_EVENT_DATA_T *GAP_LE_Event_Data, UINT32 CallbackParameter);
Definition at line 4147 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_GAP_LE_EVENT_DATA M2MB_BLE_GAP_LE_EVENT_DATA_T |
Structure that represents the structure of data that is used to specify the LTK and key size.
typedef struct M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_REPORT_DATA M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_REPORT_DATA_T |
Structure that represents the data returned in a GAP M2MB_BLE_ET_LE_EXTENDED_ADVERTISING_REPORT_E event.The structure is used to return Extended_Advertising Reports returned from multiple devices..
typedef struct M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_REPORT_EVENT_DATA M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_REPORT_EVENT_DATA_T |
Structure that represents the information returned in an M2MB_BLE_ET_LE_ADVERTISING_SET_TERMINATED_E event that is sent by the controller to indicate that advertising for the specified advertising set has terminated..
typedef struct M2MB_BLE_GAP_LE_EXTENDED_CONFIRMATION_REQUEST M2MB_BLE_GAP_LE_EXTENDED_CONFIRMATION_REQUEST_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_EXTENDED_OUT_OF_BAND_INFORMATION_E.
typedef struct M2MB_BLE_GAP_LE_EXTENDED_CONNECTION_PARAMETERS M2MB_BLE_GAP_LE_EXTENDED_CONNECTION_PARAMETERS_T |
Structure that represents the parameters that are used when scanning for a particular PHY. The Scan_Interval and Scan_Window (specified in milli-seconds) must satisfy the following equation: Scan_Window <= Scan_Interval if Scan_Window == Scan_Interval, LE Scanning will be performed continuously.
typedef struct M2MB_BLE_GAP_LE_EXTENDED_KEY_DISTRIBUTION M2MB_BLE_GAP_LE_EXTENDED_KEY_DISTRIBUTION_T |
Structure that represents the information that is requested in a M2MB_BLE_LAT_PAIRING_REQUEST_E of the M2MB_BLE_ET_LE_AUTHENTICATION_E event
typedef struct M2MB_BLE_GAP_LE_EXTENDED_OUT_OF_BAND_INFORMATION M2MB_BLE_GAP_LE_EXTENDED_OUT_OF_BAND_INFORMATION_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_PAIRING_STATUS_E.
typedef struct M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the M2MB_LE_AUTHENTICATION_EVENT_Type of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_SECURITY_REQUEST_E.
typedef struct M2MB_BLE_GAP_LE_EXTENDED_SCANNING_PHY_PARAMETERS M2MB_BLE_GAP_LE_EXTENDED_SCANNING_PHY_PARAMETERS_T |
The following MACRO is a utility MACRO that exists to calculate
the offset position of a particular structure member from the
start of the structure. This MACRO accepts as the first parameter, the physical name of the structure (the type name, NOT the
variable name). The second parameter to this MACRO represents the actual structure member that the offset is to be determined. This MACRO returns an unsigned integer that represents the offset (in
bytes) of the structure member.
Structure that represents the structure of data that is used to specify the current signing information..
Structure that represents the extended Initiator and Responder Key Distribution fields in the M2MB_BLE_GAP_LE_EXTENDED_PAIRING_CAPABILITIES_T structure
Structure that represents the Initiator and Responder Key Distribution fields in the M2MB_BLE_GAP_LE_PAIRING_CAPABILITIES_T structure.
typedef struct M2MB_BLE_GAP_LE_LONG_TERM_KEY_INFORMATION M2MB_BLE_GAP_LE_LONG_TERM_KEY_INFORMATION_T |
Structure that represents the structure of data that is used to specify the Out Of Band Information when pairing.
typedef struct M2MB_BLE_GAP_LE_MASTER_SECURITY_INFORMATION M2MB_BLE_GAP_LE_MASTER_SECURITY_INFORMATION_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_CONNECTION_PARAMETER_UPDATE_REQUEST_E event. All members of this structure are specified in milliseconds except Slave_Latency, which is specified in the number of connection events.
typedef struct M2MB_BLE_GAP_LE_OOB_DATA M2MB_BLE_GAP_LE_OOB_DATA_T |
Type declaration that represents the structure of information stored in the M2MB_BLE_GAP_LE_SECURITY_INFORMATION_T structure.
Structure that represents the structure of data that is used to specify the Secure Connections Out Of Band Information when pairing (Version 4.2).
typedef struct M2MB_BLE_GAP_LE_PAIRING_STATUS M2MB_BLE_GAP_LE_PAIRING_STATUS_T |
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_ENCRYPTION_INFORMATION_E.
typedef struct M2MB_BLE_GAP_LE_PARAM M2MB_BLE_GAP_LE_PARAM_T |
Structure that represents the type of connectability parameters that may be passed into the advertise enable() function. The Direct_Address_Type and Direct_Address fields are only used if the Connectability_Mode field is set to M2MB_BLE_LCM_DIRECT_CONNECTABLE_E or M2MB_BLE_LCM_LOW_DUTY_CYCLE_DIRECT_CONNECTABLE_E.
typedef struct M2MB_BLE_GAP_LE_PHY_UPDATE_COMPLETE_EVENT_DATA M2MB_BLE_GAP_LE_PHY_UPDATE_COMPLETE_EVENT_DATA_T |
Structure that represents a container structure that is used to represent all the entries in an LE Extended Advertising Report Data Field This structure is used so that all fields are easy to parse and access (i.e. there are no MACRO's required to access variable length records).
The Raw_Report_Length and Raw_Report_Data members contain the length (in bytes) of the actual report received, as well as a pointer to the actual bytes present in the report, respectively.
If the Data_Status member is set to M2MB_BLE_DS_INCOMPLETE_DATA_PENDING_E then more advertising reports will be received with additional data from the advertiser. If the Data_Status member is set to dsIncomplete_DataTruncated then the data received is not all of the data advertised, however no more events are pending for this advertiser. The following enumerated types may be returned with the Address_Type member:
The M2MB_BLE_LAT_PUBLIC_IDENTITY_E and M2MB_BLE_LAT_RANDOM_IDENTITY_E types will only be returned if the address resolution in the controller has been enabled. The Periodic_Advertising_Interval member is specified in milliseconds. The Direct_Address_Type and Direct_BD_ADDR members are only valid if the M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_EVENT_TYPE_DIRECTED bit is set in the Event_Type_Flags member. The Secondary_PHY member is only valid if the M2MB_BLE_GAP_LE_EXTENDED_ADVERTISING_EVENT_TYPE_SECONDARY_PHY_ VALID bit is set in the Event_Type_Flags.
typedef struct M2MB_BLE_GAP_LE_REMOTE_FEATURES_EVENT_DATA M2MB_BLE_GAP_LE_REMOTE_FEATURES_EVENT_DATA_T |
Structure that represents an individual Advertising Report Structure Entry that is present in an LE Advertising Report.
Structure that represents the data structure for GAP LE parameters.
typedef struct M2MB_BLE_GAP_LE_SCAN_REQUEST_RECEIVED_EVENT_DATA M2MB_BLE_GAP_LE_SCAN_REQUEST_RECEIVED_EVENT_DATA_T |
Enumeration of the channel selection algorithms that may be used to determine the hopping frequencies for an LE Data Connection.
typedef struct M2MB_BLE_GAP_LE_SECURE_CONNECTIONS_OOB_DATA M2MB_BLE_GAP_LE_SECURE_CONNECTIONS_OOB_DATA_T |
Structure that represents the structure of data that is used to specify the Secure Connections Out Of Band Information when pairing (Version 4.2).
typedef struct M2MB_BLE_GAP_LE_SECURITY_ESTABLISHMENT_COMPLETE M2MB_BLE_GAP_LE_SECURITY_ESTABLISHMENT_COMPLETE_T |
Structure that represents the data that can be returned in the GAP LE Authentication Callback.
Structure that represents the GAP Authentication response information.
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_CONFIRMATION_REQUEST_E. The DisplayPasskey member is only valid when RequestType is M2MB_BLE_CRT_DISPLAY_E, and this member should be display to the user to allow the remote device to enter it. The DisplayPasskey member is between 000,000 and 999,999 and all digits must be displayed, including leading zeros.
Structure that represents the data returned in a GAP LE M2MB_BLE_ET_LE_AUTHENTICATION_E event when the GAP_LE_AUTHENTICATION_EVENT_TYPE of the M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T structure is set to M2MB_BLE_LAT_SECURITY_ESTABLISHMENT_COMPLETE_E.
typedef struct M2MB_BLE_GAP_LE_SLAVE_SECURITY_INFORMATION M2MB_BLE_GAP_LE_SLAVE_SECURITY_INFORMATION_T |
Type declaration that represents the structure of information stored in the M2MB_BLE_GAP_LE_SECURITY_INFORMATION_T structure.
Structure that represents the data structure for a Resolving List entry that is used with the Resolving List Management functions in this module.
typedef VOID(* M2MB_BLE_GAP_PAIR_STATUS_USER_CB_T) (VOID *ctx, UINT32 eventType, M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T *authInfo) |
Declared type that represents the Prototype Function for the pairing status user callback.
This function is called whenever a callback has been registered for the specified pairing status event data.
[in] | ctx | User defined callback context. |
[in] | eventType | It is authentication type based event. |
[in] | authInfo | Authentication information data. |
m2mb_ble_pairing_status_read_cb(VOID *cbCtx,UINT32 eventType,M2MB_BLE_GAP_LE_AUTHENTICATION_EVENT_DATA_T *authInfo);
Definition at line 5840 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_GAPS_CLIENT_INFO M2MB_BLE_GAPS_CLIENT_INFO_T |
The following structure represents the bytes sent from the BLE devices.
The following structure represents the data buffer
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_PRIMARY_SERVICE_16_E.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DECLARATION_128_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_DECLARATION_128_ENTRY_T |
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_DECLARATION_128_E.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DECLARATION_16_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_DECLARATION_16_ENTRY_T |
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_VALUE_16_E.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTION_INFORMATION M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTION_INFORMATION_T |
Structure that represents the information that is returned about a discovered GATT Characteristic.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_128_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_128_ENTRY_T |
Structure that represents the container structure for holding all the GATT server event data.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_16_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_16_ENTRY_T |
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_PRIMARY_SERVICE_128_E.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_RESPONSE_DATA M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_RESPONSE_DATA_T |
Structure that represents the container structure for holding all the GATT client event data.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_DESCRIPTOR_ENTRY_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_CHARACTERISTIC_DESCRIPTOR_DISCOVERY_RESPONSE_E event.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_DISCOVERY_RESPONSE_DATA M2MB_BLE_GATT_CHARACTERISTIC_DISCOVERY_RESPONSE_DATA_T |
Structure that represents the data that is in a characteristic descriptor discovery event entry.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_CHARACTERISTIC_DISCOVERY_RESPONSE_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVICE_DISCOVERY_INDICATION_E event.
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_VALUE_128_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_VALUE_128_ENTRY_T |
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_DESCRIPTOR_128_E..
typedef struct M2MB_BLE_GATT_CHARACTERISTIC_VALUE_16_ENTRY M2MB_BLE_GATT_CHARACTERISTIC_VALUE_16_ENTRY_T |
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_DESCRIPTOR_16_E.
Structure that represents the data that is contained in a characteristic entry.
typedef VOID(* M2MB_BLE_GATT_CLIENT_EVENT_CB_T) (UINT32 BluetoothStackID, M2MB_BLE_GATT_CLIENT_EVENT_DATA_T *GATT_Client_Event_Data, UINT32 cbParam) |
The following function is for an GATT Client Event Callback.
This function will be called whenever a GATT Response is received for a request that was made when this function was registered. This
function passes to the caller the GATT Client Event Data that
occurred and the GATT Client Event Callback Parameter that was
specified when this Callback was installed. The caller is free to use the contents of the GATT Client Event Data ONLY in the context of this callback. If the caller requires the Data for a longer
period of time, then the callback function MUST copy the data into another Data Buffer. This function is guaranteed NOT to be
invoked more than once simultaneously for the specified installed callback (i.e. this function DOES NOT have be reentrant). It
Needs to be noted however, that if the same Callback is installed more than once, then the callbacks will be called serially.
Because of this, the processing in this function should be as
efficient as possible. It should also be noted that this function is called in the Thread Context of a Thread that the User does NOT own. Therefore, processing in this function should be as
efficient as possible (this argument holds anyway because another GATT Event (Server/Client or Connection) will not be processed
while this function call is outstanding).
[in] | BluetoothStackID | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | GATT_Client_Event_Data | Pointer to the passed GATT client Event data. |
[in] | CallbackParameter | User-defined parameter (e.g., tag value) that was defined in the callback registration. |
m2mb_ble_gatt_client_event_cb_gaps(UINT32 bluetoothStackId, M2MB_BLE_GATT_CLIENT_EVENT_DATA_T *GATT_Client_Event_Data, UINT32 CallbackParameter);
Definition at line 4883 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_GATT_CLIENT_EVENT_DATA M2MB_BLE_GATT_CLIENT_EVENT_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_CONNECTION_REQUEST_E event.
typedef struct M2MB_BLE_GATT_CONFIRMATION_DATA M2MB_BLE_GATT_CONFIRMATION_DATA_T |
Structure that represents the format of an attribute entry for a GATT Service.
typedef VOID(* M2MB_BLE_GATT_CONNECT_USER_CB_T) (VOID *ctx, UINT32 eventType, M2MB_BLE_DEVICE_INFO_T *deviceInfo) |
This declared type represents the prototype function for a connection event user callback.
The caller should use the contents of the device info Data only in the context of this callback.
[in] | ctx | User defined callback context. |
[in] | eventType | It is connection based event. |
[in] | deviceInfo | Pointer to structure filled with device information details. |
m2mb_ble_conn_gatt_connection_cb(VOID *cbCtx,UINT32 eventType,M2MB_BLE_DEVICE_INFO_T *deviceInfo);
Definition at line 5411 of file m2mb_ble_driver.h.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_READ_REQUEST_E event.
typedef struct M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CCCD_READ_DATA M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CCCD_READ_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVICE_CHANGED_CCCD_UPDATE_E event.
typedef struct M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CCCD_UPDATE_DATA M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CCCD_UPDATE_DATA_T |
Structure that represents the container structure for holding all the GATT connection event data.
typedef struct M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CONFIRMATION_DATA M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_CONFIRMATION_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVICE_CHANGED_CCCD_READ_REQUEST_E event.
typedef struct M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_READ_DATA M2MB_BLE_GATT_CONNECTION_SERVICE_CHANGED_READ_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVICE_CHANGED_CONFIRMATION_E event.
typedef struct M2MB_BLE_GATT_CONNECTION_SERVICE_DATABASE_UPDATE_DATA M2MB_BLE_GATT_CONNECTION_SERVICE_DATABASE_UPDATE_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVICE_CHANGED_READ_REQUEST_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVER_NOTIFICATION_E event.
typedef struct M2MB_BLE_GATT_DEVICE_CONFIRMATION_REQUEST_DATA M2MB_BLE_GATT_DEVICE_CONFIRMATION_REQUEST_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_DISCONNECTION_E event.
typedef struct M2MB_BLE_GATT_DEVICE_CONNECTION_CONFIRMATION_DATA M2MB_BLE_GATT_DEVICE_CONNECTION_CONFIRMATION_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_CONFIRMATION_REQUEST_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_CONNECTION_CONFIRMATION_E event.
typedef struct M2MB_BLE_GATT_DEVICE_CONNECTION_MTU_UPDATE_DATA M2MB_BLE_GATT_DEVICE_CONNECTION_MTU_UPDATE_DATA_T |
Structure that represents the structure of the Service Changed characteristic value.
typedef struct M2MB_BLE_GATT_DEVICE_CONNECTION_REQUEST_DATA M2MB_BLE_GATT_DEVICE_CONNECTION_REQUEST_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_CONNECTION_E event. GATT Connection ID is unique and is used to identity a connection with a remote device
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_BUFFER_EMPTY_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_EXECUTE_WRITE_RESPONSE_E event.
typedef struct M2MB_BLE_GATT_EXECUTE_WRITE_CONFIRMATION_DATA M2MB_BLE_GATT_EXECUTE_WRITE_CONFIRMATION_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_CONFIRMATION_RESPONSE_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_EXECUTE_WRITE_CONFIRMATION_E event.
typedef struct M2MB_BLE_GATT_EXECUTE_WRITE_RESPONSE_DATA M2MB_BLE_GATT_EXECUTE_WRITE_RESPONSE_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_PREPARE_WRITE_RESPONSE_E event.
Structure that represents the information that is returned about a GATT service from a GATT service discovery procedure.
typedef struct M2MB_BLE_GATT_INCLUDED_SERVICES_DISCOVERY_RESPONSE_DATA M2MB_BLE_GATT_INCLUDED_SERVICES_DISCOVERY_RESPONSE_DATA_T |
Structure that represents the data that is in a characteristic declaration value entry.
typedef struct M2MB_BLE_GATT_PREPARE_WRITE_RESPONSE_DATA M2MB_BLE_GATT_PREPARE_WRITE_RESPONSE_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_WRITE_RESPONSE_E event.
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_DECLARATION_128_E
Structure that represents the structure of the data that must be specified for a M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T of type M2MB_BLE_AET_CHARACTERISTIC_DECLARATION_16_E.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_READ_RESPONSE_E event.
typedef struct M2MB_BLE_GATT_READ_EVENT_ENTRY M2MB_BLE_GATT_READ_EVENT_ENTRY_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_READ_BY_UUID_RESPONSE_E event.
Structure that represents the structure of a GATT read response event entry.
typedef struct M2MB_BLE_GATT_READ_MULTIPLE_RESPONSE_DATA M2MB_BLE_GATT_READ_MULTIPLE_RESPONSE_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_READ_LONG_RESPONSE_E event.
typedef struct M2MB_BLE_GATT_READ_REQUEST_DATA M2MB_BLE_GATT_READ_REQUEST_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_WRITE_REQUEST_E event.
Structure that represents the information that is returned about a GATT Service from a GATT service discovery procedure.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_SERVICE_DISCOVERY_RESPONSE_E event.
typedef VOID(* M2MB_BLE_GATT_SERVER_EVENT_CB_T) (UINT32 BluetoothStackID, M2MB_BLE_GATT_SERVER_EVENT_DATA_T *GATT_Server_Event_Data, UINT32 CallbackParameter) |
The following function is for an GATT Server Event Callback.
This function will be called whenever a GATT Request is made to the server who registers this function that cannot be handled internally by GATT. This function passes to the caller the GATT Server Event Data that occurred and the GATT Server Event Callback.
[in] | BluetoothStackID | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | GATT_Server_Event_Data | Pointer to the passed GATT server Event data. |
[in] | CallbackParameter | User-defined parameter (e.g., tag value) that was defined in the callback registration. |
m2m_ble_genericServiceCb(UINT32 bluetoothStackId, M2MB_BLE_GATT_SERVER_EVENT_DATA_T *GATT_ServerEventData, UINT32 CallbackParameter);
Definition at line 5115 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_GATT_SERVER_EVENT_DATA M2MB_BLE_GATT_SERVER_EVENT_DATA_T |
GAP LE event types and structures The following type declaration represents the structure of all GAP LE that is needed for gap events.
Structure that contains the attribute handles that will need to be cached by a Server.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVER_NOTIFICATION_E event.
Structure that represents GATT attribute handle group.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_SERVICE_DATABASE_UPDATE_E event.
typedef struct M2MB_BLE_GATT_SERVICE_DISCOVERY_BY_UUID_RESPONSE_DATA M2MB_BLE_GATT_SERVICE_DISCOVERY_BY_UUID_RESPONSE_DATA_T |
typedef struct M2MB_BLE_GATT_SERVICE_DISCOVERY_COMPLETE_DATA M2MB_BLE_GATT_SERVICE_DISCOVERY_COMPLETE_DATA_T |
Structure that represents the container structure for holding all the GATT service discovery event data.
typedef VOID(* M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_CB_T) (UINT32 bleStackId, M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_DATA_T *GATT_Service_Discovery_Event_Data, UINT32 CallbackParameter) |
This declared type represents the prototype function for GATT Service Discovery Event data callback. This function will be called whenever a GATT server event occurs that is associated with the specified Bluetooth stack ID.
The caller should use the contents of the GATT Event Data only in the context of this callback. If the caller requires the data for a longer period of time, the callback function must copy the data into another data buffer.
This function is guaranteed not to be invoked more than once simultaneously for the specified installed callback (i.e., this function does not have be reentrant). It should be noted, however, that if the same callback is installed more than once, the callbacks will be called serially. Because of this, the processing in this function should be as efficient as possible.
It should also be noted that this function is called in the Thread Context of a Thread that the user does not own. Therefore, processing in this function should be as efficient as possible (this argument holds anyway because another GATT Service Discovery Event will not be processed while this function call is outstanding).
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | GATT_Service_Discovery_Event_Data | Pointer to astructure that contains information about the event that has occurred. |
[in] | CallbackParameter | User-defined value that was supplied as an input parameter from a prior GATT request. |
m2mb_ble_service_discovery_event_cb(UINT32 bleStackId, M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_DATA_T *GATT_Service_Discovery_Event_Data, UINT32 CallbackParameter);
Definition at line 4467 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_DATA M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_DATA_T |
Enumeration of the different values for duplicate filter that can be enabled with extended scanning.
typedef struct M2MB_BLE_GATT_SERVICE_DISCOVERY_INDICATION_DATA M2MB_BLE_GATT_SERVICE_DISCOVERY_INDICATION_DATA_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVICE_DISCOVERY_COMPLETE_E event.
typedef struct M2MB_BLE_GATT_SERVICE_DISCOVERY_RESPONSE_DATA M2MB_BLE_GATT_SERVICE_DISCOVERY_RESPONSE_DATA_T |
Structure that represents the structure of information that is returned about a GATT included service declaration from a GATT find included services procedure. The UUID member is only valid for an included service if the UUID_Valid member is TRUE. Otherwise, it is invalid and should be ignored.
typedef struct M2MB_BLE_GATT_SERVICE_INFORMATION_BY_UUID M2MB_BLE_GATT_SERVICE_INFORMATION_BY_UUID_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_SERVICE_DISCOVERY_BY_UUID_RESPONSE_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_ERROR_RESPONSE_E event. The RequestHandle and ErrorCode members are valid only if the Error_Type member is M2MB_BLE_RET_ERROR_RESPONSE_E.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_EXECUTE_WRITE_REQUEST_E event.
typedef struct M2MB_BLE_GATT_UUID M2MB_BLE_GATT_UUID_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_EXCHANGE_MTU_RESPONSE_E event.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CLIENT_READ_MULTIPLE_RESPONSE_E event. The AttributeValuesLength is the TOTAL length (in bytes) of ALL attribute values, not the length of an individual attribute value.
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_SERVER_SIGNED_WRITE_REQUEST_E event.
The following type declaration defines the HCI USB Driver that
that will be used as the physical HCI Transport Driver for the USB Device that is to be opened.
typedef struct M2MB_BLE_HCI_DRIVERINFORMATION M2MB_BLE_HCI_DRIVERINFORMATION_T |
The following type declaration represents the structure of scan parameters.
The following type declaration defines the HCI USB Driver that
that will be used as the physical HCI Transport Driver for the USB Device that is to be opened.
typedef struct M2MB_BLE_INIT_PARAM M2MB_BLE_INIT_PARAM_T |
The following defines the maximum allowable GAP Device Name.
typedef struct M2MB_BLE_LE_FEATURES M2MB_BLE_LE_FEATURES_T |
The following define determines the maximum fixed size that is used to define the Advertising Data that can be sent/received in advertising packets for a device.
typedef struct M2MB_BLE_LONG_TERM_KEY M2MB_BLE_LONG_TERM_KEY_T |
Enumeration that represents the different Central Address Resolution values that can be specified.
typedef struct M2MB_BLE_NONALIGNEDWORD M2MB_BLE_NONALIGNEDWORD_T |
< Unaligned Generic 16 Bit
typedef struct M2MB_BLE_PARAM M2MB_BLE_PARAM_T |
The following type declaration represents the structure of device information. It hold a list of information on all paired devices.
typedef struct M2MB_BLE_PASSKEY_RSP_S M2MB_BLE_PASSKEY_RSP_T |
Structure that represents a container structure for persistent remote device data for bonding.
typedef VOID(* M2MB_BLE_PASSKEY_USER_CB_T) (VOID *ctx, UINT32 eventType, M2MB_BLE_PASSKEY_RSP_T passKeyResp) |
Declared type that represents the Prototype Function for the passkey response data user callback.
This function is called whenever a callback has been registered for the specified passkey response data event.
[in] | ctx | User defined callback context. |
[in] | eventType | It is security type based event. |
[in] | passKeyResp | Passkey response data. |
m2m_s2w_ble_ssppin_cb(VOID *cbCtx,UINT32 eventType,M2MB_BLE_PASSKEY_RSP_T passKeyResp);
Definition at line 5544 of file m2mb_ble_driver.h.
typedef struct M2MB_BLE_PERSISTENT_DATA M2MB_BLE_PERSISTENT_DATA_T |
total persistent device data size.
persistent remote device data size.
typedef struct M2MB_BLE_RANDOM_NUMBER M2MB_BLE_RANDOM_NUMBER_T |
The following represents the structure of a single Encryption Key(Version 4.0 + LE).
typedef struct M2MB_BLE_SCAN_PARAMETERS M2MB_BLE_SCAN_PARAMETERS_T |
The following type declaration represents the structure of advertising,connection and scan parameters.
typedef struct M2MB_BLE_SCAN_RESPONSE_DATA M2MB_BLE_SCAN_RESPONSE_DATA_T |
These GATT events are issued to the application via callbacks registered to receive connection events. The following event types are no longer valid but left in the enumerated list for legacy purposes. Therefore, they do not need to be handled by the upper layer application.
The following type declaration represents the structure of a single Secure Connections Confirmation, C used for OOB mechanism of LE Secure Connections (Version 4.2).
The following represents the structure of a Random Number that is used during Encryption (Version 4.0 + LE).
typedef struct M2MB_BLE_SEND_INFO M2MB_BLE_SEND_INFO_T |
The following structure represents the device appearance mapping on a Discovered GAP Service.
typedef struct M2MB_BLE_SERVER_INFO M2MB_BLE_SERVER_INFO_T |
Structure that represents the data returned in a GATT M2MB_BLE_ET_GATT_CONNECTION_DEVICE_CONNECTION_MTU_UPDATE_E event.
typedef struct M2MB_BLE_UUID_128 M2MB_BLE_UUID_128_T |
The following structure defines the container structure that will hold the Authentication Signature data (if present in an Attribute Protocol PDU).
typedef struct M2MB_BLE_UUID_16 M2MB_BLE_UUID_16_T |
The following type declaration represents the structure of a single 32 Bit Universally Unique Identifier (UUID).
typedef struct M2MB_BLE_UUID_32 M2MB_BLE_UUID_32_T |
The following type declaration represents the structure of a single 128 Bit Universally Unique Identifier (UUID).
typedef HANDLE M2MB_PERSIST_HANDLE_T |
Definition at line 295 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_GAR_DISABLED_E | Disabled. |
M2MB_BLE_GAR_ENABLED_E | Enabled. |
Definition at line 507 of file m2mb_ble_driver.h.
Definition at line 2051 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_EM_DISABLED_E | Indicates the link is not encrypted. |
M2MB_BLE_EM_ENABLED_E | Indicates the link encryption is enabled. |
Definition at line 1918 of file m2mb_ble_driver.h.
Definition at line 2122 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_DS_COMPLETE_E | Complete. |
M2MB_BLE_DS_INCOMPLETE_DATA_PENDING_E | Data Pending. |
M2MB_BLE_DS_INCOMPLETE_DATA_TRUNCATED_E | Data Truncated. |
Definition at line 1999 of file m2mb_ble_driver.h.
Definition at line 1864 of file m2mb_ble_driver.h.
Definition at line 1881 of file m2mb_ble_driver.h.
Definition at line 2013 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_LBT_NO_BONDING_E | Indicates no bonding type. |
M2MB_BLE_LBT_BONDING_E | Indicates bonding type. |
Definition at line 1929 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_SA_ALGORITHM_NUM1_E | Channel selection algorithm 1. |
M2MB_BLE_SA_ALGORITHM_NUM2_E | Channel selection algorithm 2. |
Definition at line 2960 of file m2mb_ble_driver.h.
Definition at line 2038 of file m2mb_ble_driver.h.
Definition at line 1814 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_FD_DISABLED_E | Disabled. |
M2MB_BLE_FD_ENABLED_E | Enabled. |
M2MB_BLE_FD_ENABLED_RESET_EACH_SCAN_PERIOD_E | Enabled and reset each scan period. |
Definition at line 3620 of file m2mb_ble_driver.h.
Definition at line 2095 of file m2mb_ble_driver.h.
Definition at line 2076 of file m2mb_ble_driver.h.
Definition at line 1969 of file m2mb_ble_driver.h.
Definition at line 1947 of file m2mb_ble_driver.h.
Definition at line 2062 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_LPT_PHY_LE_1M_E | Indicates the LE 1 megabit PHY. |
M2MB_BLE_LPT_PHY_LE_2M_E | Indicates the LE 2 megabit PHY. |
M2MB_BLE_LPT_PHY_LE_CODED_E | Indicates the LE coded PHY. |
Definition at line 1986 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_ST_PASSIVE_E | Indicates that a passive scan (receive only) should be started. |
M2MB_BLE_ST_ACTIVE_E | Indicates that a active scan (transmit/receive) should be started. |
Definition at line 3528 of file m2mb_ble_driver.h.
Definition at line 688 of file m2mb_ble_driver.h.
Definition at line 627 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_GCT_LE_E | LE connection. |
M2MB_BLE_GCT_BR_EDR_E | BR/EDR connection. |
Definition at line 726 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_RET_ERROR_RESPONSE_E | Error response. |
M2MB_BLE_RET_PROTOCOL_TIMEOUT_E | Protocol Timeout. |
M2MB_BLE_RET_PREPARE_WRITE_DATA_MISMATCH_E | Prepare Write data mismatch. |
Definition at line 789 of file m2mb_ble_driver.h.
Definition at line 661 of file m2mb_ble_driver.h.
Definition at line 752 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_ET_GATT_SERVICE_DISCOVERY_INDICATION_E | GATT client service discovery indication event. |
M2MB_BLE_ET_GATT_SERVICE_DISCOVERY_COMPLETE_E | GATT client service discovery complete event. |
Definition at line 3519 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_ST_SECONDARY_E | Secondary. |
M2MB_BLE_ST_PRIMARY_E | Primary. |
Definition at line 733 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_GU_UUID_16_E | 16-bit UUID. |
M2MB_BLE_GU_UUID_128_E | 128-bit UUID. |
M2MB_BLE_GU_UUID_32_E | 32-bit UUID. |
Definition at line 742 of file m2mb_ble_driver.h.
Definition at line 3207 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_COMM_DRIVER_E | COM/Serial Port HCI Connection Type. |
M2MB_BLE_USB_DRIVER_E | USB HCI Connection Type. |
Definition at line 3193 of file m2mb_ble_driver.h.
Enumerator | |
---|---|
M2MB_BLE_USB_DRIVER_SS1_E | |
M2MB_BLE_USB_DRIVER_GARMIN_E |
Definition at line 3254 of file m2mb_ble_driver.h.
BLE Advertise enable.
This function is responsible to enable the LE advertising.
[in] | enable | 1- the enable flag to advertise and 0- disable advertise |
m2mb_ble_advertise(advEnable);
void m2mb_ble_advParamGet | ( | M2MB_BLE_GAP_LE_ADVERTISING_PARAMETERS_T * | advParam | ) |
BLE Advertising params get.
This function is used to get the advertising parameters used when performing a BLE Advertising Procedure.
[in,out] | advParam | pointer to the structure of advertising params. |
m2mb_ble_advParamGet(&advParam);
void m2mb_ble_advParamSet | ( | M2MB_BLE_GAP_LE_ADVERTISING_PARAMETERS_T | advParam | ) |
BLE Advertising params set.
This function is used to set the parameters used when performing a BLE Advertising Procedure.
[in] | advParam | structure of advertising params filled with values. |
m2mb_ble_advParamSet(advParam);
BLE Advertising data init.
This function is used to initialized the advertising data.
[in] | enableFlag | set the flag for initialization. |
m2mb_ble_advteriseDataInit(enableFlag);
UINT32 m2mb_ble_bluetooth_dis_id_get | ( | ) |
BLE get the device instance Id.
The following function return disInstanceId.
m2mb_ble_bluetooth_dis_id_get();
BLE Get the StackId.
This API is used to get the bluetooth stackId.
m2mb_ble_bluetooth_stack_id_get();
INT32 m2mb_ble_dis_query_pnp_id | ( | UINT32 | bleStackId, |
UINT32 | disInstanceId, | ||
M2MB_BLE_DIS_PNP_ID_DATA_T * | pnpIdData | ||
) |
Queries the current PnP ID Data characteristic value on the specified DIS instance.
If this function is successful, this function returns zero, and the buffer that pnpIdData points to will be filled with PnP ID Data .
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | disInstanceId | Device service instance ID. |
[in] | pnpIdData | Pointer to return the current PNP ID Data for the specified DIS Instance. |
m2mb_ble_dis_query_pnp_id(bleStackID, disSrvID, &pnpIdData);
INT32 m2mb_ble_dis_set_pnp_id | ( | UINT32 | bleStackId, |
UINT32 | disInstanceId, | ||
M2MB_BLE_DIS_PNP_ID_DATA_T * | pnpIdData | ||
) |
Queries the current PnP ID Data characteristic value on the specified DIS instance.
If this function is successful, this function returns zero, and the buffer that pnpIdData points to will be filled with PnP ID Data .
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | disInstanceId | Device service instance ID. |
[in] | pnpIdData | Value to be entered as the PNP ID Data for the specified DIS Instance. |
m2mb_ble_dis_set_pnp_id(bleStackID, disSrvID, &pnpIdData);
Enables the local host to disconnect a currently connected LE device.
This function is used to disconnect the LE device.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | connId | Specifies the connection handle of the currently connected device. |
m2mb_ble_disconnect_device(bleStackId,connectionId);
INT32 m2mb_ble_error_response | ( | UINT32 | bleStackId, |
UINT32 | transactionId, | ||
UINT16 | attOffset, | ||
UINT8 | errCode | ||
) |
Provides a mechanism for a service handler to respond to a received GATT/ATT request with an error response.
The AttributeOffset parameter must be less than or equal to the last index in the service table that was registered in the call to the m2mb_ble_service_register() function.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | transactionId | Transaction ID of the original read request. |
[in] | attOffset | Attribute offset of the first attribute that causes the error. This value will be greater than or equal to zero (specifies the very first attribute in the service) and less than the maximum number of attributes contained in the service. |
[in] | errCode | Error code to return as a response to the request. |
m2mb_ble_error_response(bluetoothStackId,GATT_ServerEventData->Event_Data.GATT_Read_Request_Data->TransactionID, GATT_ServerEventData->Event_Data.GATT_Read_Request_Data->AttributeOffset, M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_LONG);
Cancels a connection establishment procedure that was started via a successful call to the m2mb_ble_gap_le_create_connection() function.
This function does not disconnect a connected device, it merely stops the connection process (scanning and connecting).
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
m2mb_ble_gap_le_cancel_create_connection(bleStackId);
Cancels a scan process that was started via a successful call to the m2mb_ble_gap_le_perform_scan() function.
If this function returns success, the GAP LE callback that was installed with the m2mb_ble_gap_le_perform_scan() function will not be called.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
m2mb_ble_gap_le_cancel_scan(bleStackId);
INT32 m2mb_ble_gap_le_create_connection | ( | UINT32 | bleStackId, |
UINT32 | scanInterval, | ||
UINT32 | scanWindow, | ||
M2MB_BLE_GAP_LE_FILTER_POLICY_T | initatorFilterPolicy, | ||
M2MB_BLE_GAP_LE_ADDRESS_TYPE_T | remoteAddressType, | ||
M2MB_BLE_BD_ADDR_T * | remoteDevice, | ||
M2MB_BLE_GAP_LE_ADDRESS_TYPE_T | localAddressType, | ||
M2MB_BLE_GAP_LE_CONNECTION_PARAMETERS_T * | connectionParameters, | ||
M2MB_BLE_GAP_LE_EVENT_CB_T | gapLeEventCb, | ||
UINT32 | cbParam | ||
) |
Enables the local host to create a connection to a remote device using the Bluetooth LE radio.
This function is provided to establish an LE master connection to a remote device. This function allows the use of the Bluetooth white-list and can be used to specify a specific set of devices to which to connect.
This function is asynchronous in nature and the caller is informed when the connection is established via the callbackfunction.
If the InitatorFilterPolicy parameter is set to M2MB_BLE_FP_WHITE_LIST_E, the RemoteAddressType and RemoteDevice parameter are not used and NULL values may be passed in for them.
If the local Bluetooth controller is a version 4.0 or 4.1 compliant controller, only the following types may be used for the RemoteAddressType and the LocalAddressType parameters: M2MB_BLE_LAT_PUBLIC_E M2MB_BLE_LAT_RANDOM_E
The M2MB_BLE_LAT_PUBLIC_IDENTITY_E and M2MB_BLE_LAT_RANDOM_IDENTITY_E indicate that the RemoteDevice parameter is an identity address (a semipermanent address that can be used to refer to the device) that was received from the remote device (along with the remote device's IRK) during a successful LE Pairing process. Note that these two types are only valid for this API if the local controller is a version 4.2 or greater Bluetooth controller.
Note that if the final two enumerated types are specified (M2MB_BLE_LAT_RESOLVABLE_FALLBACK_XXX), the RemoteAddressType and RemoteAddress parameters must be specified and valid, as they will be used to search the Resolving List to find the local IRK to use when creating the connection. Also note that these two types are only valid for this API if the local controller is a version 4.2 or greater Bluetooth controller.
Types may be specified for the RemoteAddressType and the LocalAddressType parameters.
The following types may not be used with the InitatorFilterPolicy parameter:
M2MB_BLE_FP_NO_WHITE_LIST_DIRECTED_RPA_E M2MB_BLE_FP_WHITE_LIST_DIRECTED_RPA_E
These values may only be used with the m2mb_ble_gap_le_perform_scan() function..
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | scanInterval | Specifies interval to use while scanning. |
[in] | scanWindow | Specifies window to use while scanning. |
[in] | initatorFilterPolicy | Filter policy to apply when scanning. |
[in] | remoteAddressType | Specifies the type of the remote device address to connect with (if not using white-list filter). |
[in] | remoteDevice | Specifies the remote device address to connect with. This value is required if no filter is specified as the filter policy. |
[in] | localAddressType | Specifies the type of the address the local device is to use when connecting to the remote device. |
[in] | connectionParameters | Specifies the parameters to use when actually establishing the connection to the remote device |
[in] | gapLeEventCb | Pointer to a callback function to be used by the GAP layer to dispatch GAP LE Event information for this request. |
[in] | cbParam | User-defined value to be used by the GAP layer as an input parameter for the callback. |
m2mb_ble_gap_le_create_connection(bleStackId,scanInterval,scanWindow,0,(M2MB_BLE_GAP_LE_ADDRESS_TYPE_T)bdType,&bdAddress, M2MB_BLE_LAT_RESOLVABLE_FALLBACK_PUBLIC_E,&connectionParameters,m2mb_ble_gap_event_cb,cbParam);
INT32 m2mb_ble_gap_le_perform_scan | ( | UINT32 | bleStackId, |
M2MB_BLE_GAP_LE_SCAN_TYPE_T | scanType, | ||
UINT32 | scanInterval, | ||
UINT32 | scanWindow, | ||
M2MB_BLE_GAP_LE_ADDRESS_TYPE_T | localAddressType, | ||
M2MB_BLE_GAP_LE_FILTER_POLICY_T | filterPolicy, | ||
M2MB_BOOL_T | filterDuplicates, | ||
M2MB_BLE_GAP_LE_EVENT_CB_T | gapLeEventCb, | ||
UINT32 | cbParam | ||
) |
Starts an LE scan procedure.
Only ONE scan can be performed at any given time. Calling this function while an outstanding scan is in progress will fail. The caller can call the m2mb_ble_gap_le_cancel_scan() function to cancel a currently executing scanning procedure.
The ScanInterval and ScanWindow parameters (specified in milliseconds) must satisfy the following equation:
ScanWindow <= ScanInterval
If ScanWindow == ScanInterval,LE Scanning will be performed continuously.
All scan period time parameters are specified in seconds
If the local Bluetooth controller is a version 4.0 or 4.1 compliant controller then only the: M2MB_BLE_LAT_PUBLIC_E M2MB_BLE_LAT_RANDOM_E
Note that if the final two enumerated types are specified (M2MB_BLE_LAT_RESOLVABLE_FALLBACK_XXX), the controller will attempt to generate a Resolvable Private Address to place in the scan request packets if the advertiser is in the resolving list. If the device is not in the resolving list, the controller will use either the public address (M2MB_BLE_LAT_RESOLVABLE_FALLBACK_PUBLIC_E) or the random address set via qapi_BLE_GAP_LE_Set_Random_Address() (M2MB_BLE_LAT_RESOLVABLE_FALLBACK_PRIVATE_E). Note that these two types are only valid for this API if the local controller is a version 4.2 or greater Bluetooth controller.
Note that for the M2MB_BLE_FP_NO_WHITE_LIST_DIRECTED_RPA_E and M2MB_BLE_FP_WHITE_LIST_DIRECTED_RPA_E types, they may only be used if the local controller is a 4.2 or greater compliant controller.
If either of the M2MB_BLE_FP_NO_WHITE_LIST_DIRECTED_RPA_E or M2MB_BLE_FP_WHITE_LIST_DIRECTED_RPA_E types is specified for the FilterPolicy, the application can expect to receive the M2MB_BLE_ET_LE_DIRECT_ADVERTISING_REPORT_E event when a directed advertisement that is directed towards a resolvable private address is received by the controller.
If the QAPI_BLE_FP_NO_WHITE_LIST_DIRECTED_RPA_E type is used for the FilterPolicy parameter, the device can expect to receive advertising reports based on the following criteria:
When this type is used, the application can expect to receive M2MB_BLE_ET_LE_DIRECT_ADVERTISING_REPORT_E events when directed advertising packets where the initiator address is a resolvable private address. The application can then use the local IRK(s) to determine if the directed advertisement is intended to be received by the device and then can make an application decision on whether to connect to the device.
If the M2MB_BLE_FP_WHITE_LIST_DIRECTED_RPA_E type is used for the ilterPolicy parameter, the device can expect to receive advertising reports based on the following criteria:
When this type is used, the application can expect to receive M2MB_BLE_ET_LE_DIRECT_ADVERTISING_REPORT_E events when directed advertising packets where the initiator address is a resolvable private address. The application can then use the local IRK(s) to determine if the directed advertisement is intended to be received by the local device and then can make an application decision on whether to connect to the device.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | scanType | Specifies the type of scan to perform. |
[in] | scanInterval | Specifies interval to use while scanning. |
[in] | scanWindow | Specifies window to use while scanning. |
[in] | localAddressType | Specifies the type of the address the local device is to use when connecting to the remote device. |
[in] | filterPolicy | Filter policy to apply when scanning. |
[in] | filterDuplicates | Specifies whether or not the host controller is to filter duplicate scan responses. |
[in] | gapLeEventCb | Pointer to a callback function to be used by the GAP layer to dispatch GAP LE Event information for this request. |
[in] | cbParam | User-defined value to be used by the GAP layer as an input parameter for the callback. |
m2mb_ble_gap_le_perform_scan(bleStackId,M2MB_BLE_ST_ACTIVE_E,scanInterval,scanWindow, M2MB_BLE_LAT_RESOLVABLE_FALLBACK_PUBLIC_E,filterPolicy,TRUE,m2m_s2w_ble_scan_gap_event_cb,cbParam);
INT32 m2mb_ble_gap_le_query_encryption_mode | ( | UINT32 | bleStackId, |
M2MB_BLE_BD_ADDR_T | remoteAddress, | ||
M2MB_BLE_GAP_ENCRYPTION_MODE_T * | gapEncryptionMode | ||
) |
Queries the current Encryption Mode.
This function is used to queries the current Encryption Mode.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | remoteAddress | Specifies the remote device address address of the connected device to query the link encryption mode. |
[out] | gapEncryptionMode | Pointer to store the link encryption mode. This parameter is not optional, and cannot be NULL. If this function returns success, this will point to one of the following values: M2MB_BLE_EM_DISABLED_E M2MB_BLE_EM_ENABLED_E. |
Example
INT32 m2mb_ble_gap_le_set_advertising_data | ( | UINT32 | bleStackId, |
UINT32 | len, | ||
M2MB_BLE_ADVERTISING_DATA_T * | advertisingData | ||
) |
Sets the advertising data that is used during the advertising procedure.
Advertising data consists of zero or more tuples that consist of: Length (bytes)
Type (bytes)
Data (zero or more bytes)
Also, note that the advertising data itself is a fixed length. If the list of the tuples of the advertising data is not long enough to fill the required advertising length, the bytes containing the binary value zero (0x00) should be used to pad the data (until the end of the required advertising data size).
The Length and Advertising_Data parameters are optional. If the intention is to set advertising data whose length is zero, the Length and Advertising_Data parameters may be set to 0 and NULL respectively.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | len | Number of significant advertising data bytes contained in the advertising data. |
[in] | advertisingData | Pointer to a buffer that contains the advertising data. This buffer must be at least: M2MB_BLE_ADVERTISING_DATA_MAXIMUM_SIZE bytes long. Note that the length parameter specifies the actual number of bytes that are valid. The remaining bytes should be padded with zeros. |
m2mb_ble_gap_le_set_advertising_data(bleStackId, length+1, &(AdvertisingData);
INT32 m2mb_ble_gap_le_set_scan_response_data | ( | UINT32 | bleStackId, |
UINT32 | len, | ||
M2MB_BLE_SCAN_RESPONSE_DATA_T * | scanRespData | ||
) |
Queries the current device name characteristic of a generic device from the specified GAP Service Instance.
The Name parameter must be a pointer to a NULL-terminated ASCII String of at most M2MB_BLE_GAP_MAXIMUM_DEVICE_NAME_LENGTH (not counting the trailing NULL terminator).
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | len | Number of significant advertising data bytes contained in the advertising data. |
[in] | scanRespData | Pointer to a buffer that contains the response data. This buffer must be at least M2MB_BLE_SCAN_RESPONSE_DATA_MAXIMUM_SIZE bytes long. Note that the length parameter specifies the actual number of bytes that are valid. The remaining bytes should be padded with zeros. |
m2mb_ble_gap_le_set_scan_response_data(bleStackId, Length, &(ScanResponseData));
INT32 m2mb_ble_gap_query_local_bdAddr | ( | UINT32 | bleStackID, |
M2MB_BLE_BD_ADDR_T * | bdAddr | ||
) |
Queries (and reports) the device address of the local Bluetooth device.
If this function is successful, this function returns zero, and the buffer that bdAddr points to will be filled with the Board Address read from the Local Device. If this function returns a negative value, the bdAddr of the Local Device was not able to be queried (error condition).
[in] | bleStackID | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | bdAddr | Pointer to memory in which to receive the local device address. |
m2mb_ble_gap_query_local_bdAddr(bleStackId,&bdAddress);
BLE Get the gaps instanceId.
This API is used to get the bluetooth gaps instanceId.
m2mb_ble_gaps_instance_id_get()
INT32 m2mb_ble_gaps_query_device_name | ( | UINT32 | bleStackId, |
UINT32 | gapsInstanceId, | ||
char * | deviceName | ||
) |
Queries the current device name characteristic of a generic device from the specified GAP Service Instance.
The Name parameter must be a pointer to a NULL-terminated ASCII String of at most M2MB_BLE_GAP_MAXIMUM_DEVICE_NAME_LENGTH (not counting the trailing NULL terminator).
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | gapsInstanceId | Device service instance ID. |
[in] | deviceName | Pointer to a structure to return the current Device for the specified GAPS Service Instance. |
m2mb_ble_gaps_query_device_name(bleStackID, bleGapsInstanceID, localDeviceName);
Sets the device name characteristic of a generic device on the specified GAP Service Instance.
The Name parameter must be a pointer to a NULL-terminated ASCII String of at most M2MB_BLE_GAP_MAXIMUM_DEVICE_NAME_LENGTH (not counting the trailing NULL terminator).
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | gapsInstanceId | Device service instance ID. |
[in] | deviceName | Device Name to set as the current Device Name for the specified GAP Service Instance. |
m2mb_ble_gaps_set_device_name(bleStackID, bleGapsInstanceID, localDeviceName));
INT32 m2mb_ble_gatt_read_value_request | ( | UINT32 | bleStackId, |
UINT32 | connectionId, | ||
UINT16 | attributeHandle, | ||
M2MB_BLE_GATT_CLIENT_EVENT_CB_T | gattClientEventCb, | ||
UINT32 | cbParam | ||
) |
Performs a read request on a remote device for a specific attribute value.
If successful, the return value will contain the Transaction ID that can be used to cancel the request.
Possible events: M2MB_BLE_ET_GATT_CLIENT_READ_RESPONSE_E
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | connectionId | Connection ID of the currently connected remote GATT server device. |
[in] | attributeHandle | Attribute handle of the attribute that is to be read. |
[in] | gattClientEventCb | Callback function registered to receive the read value response event. |
[in] | cbParam | Callback parameter that will be passed to the specified ServiceDiscoveryCallback when called with the result of the service discovery operation. |
m2mb_ble_gatt_read_value_request(bleStackId, connHndle,charHndle, m2m_ble_readVal_cb, charHndle);
INT32 m2mb_ble_gatt_start_service_discovery | ( | UINT32 | bleStackId, |
UINT32 | connectionID, | ||
UINT32 | numberOfUUID, | ||
M2MB_BLE_GATT_UUID_T * | uuidList, | ||
M2MB_BLE_GATT_SERVICE_DISCOVERY_EVENT_CB_T | serviceDiscoveryCb, | ||
UINT32 | cbParam | ||
) |
Performs a service discovery operation that will automatically discover all included services, characteristics, and characteristic descriptors for either all services supported by a remote device or all services of a specified UUID that are supported by a remote device.
This function is provided to simplify the GATT service discovery process.
The NumberOfUUID and UUIDList parameters are optional and may be set to 0 and NULL respectively. If these parameters are not specified, all services on the specified remote device will be discovered.
Only one service discovery operation per remote device can be outstanding at a time.
Possible events:
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | connectionID | Connection ID of the currently connected remote GATT server device. |
[in] | numberOfUUID | Option parameter that, if specified, contains the number of UUIDs that are contained in the UUIDList parameter. |
[in] | uuidList | Optional list of Service UUIDs to attempt to discover on the specified remote device. |
[in] | serviceDiscoveryCb | Callback function that will be called with the result of the service discovery operation. |
[in] | cbParam | Callback parameter that will be passed to the specified ServiceDiscoveryCallback when called with the result of the service discovery operation. |
m2mb_ble_gatt_start_service_discovery(bleStackId,connectionId,0, NULL,m2mb_ble_service_discovery_event_cb,NULL);
INT32 m2mb_ble_gatt_write_request | ( | UINT32 | bleStackId, |
UINT32 | connectionId, | ||
UINT16 | attributeHandle, | ||
UINT16 | attributeLength, | ||
VOID * | attributrValue, | ||
M2MB_BLE_GATT_CLIENT_EVENT_CB_T | gattClientEventCb, | ||
UINT32 | cbParam | ||
) |
Performs a write request to a remote device for a specified attribute.
This function will not write an attribute value with a length greater than the current MTU - 3.
This function may write less than the number of requested bytes. This can happen if the number of bytes to write is less than what can fit in the MTU for the specified connection. The data in the M2MB_BLE_ET_GATT_CLIENT_WRITE_RESPONSE_E that is dispatched if the remote device accepts the request indicates the number of bytes that were written to the remote device.
Possible events: M2MB_BLE_ET_GATT_CLIENT_WRITE_RESPONSE_E
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | connectionId | Connection ID of the currently connected remote GATT server device. |
[in] | attributeHandle | Attribute handle of the attribute that is to be write. |
[in] | attributeLength | Length (in bytes) of the actual attribute value data to write to the specified attribute. |
[in] | attributrValue | Buffer that contains (at least) as many bytes a specified by the AttributeLength parameter . |
[in] | gattClientEventCb | Callback function registered to receive the read value response event. |
[in] | cbParam | Callback parameter that will be passed to the specified ServiceDiscoveryCallback when called with the result of the service discovery operation. |
m2mb_ble_gatt_write_request(bleStackId, connectionId, Characteristic_Handle, length, byteArray, m2m_ble_writeVal_cb, (UINT32)NULL);
UINT32 m2mb_ble_get_connection_count | ( | ) |
BLE get the connection count value.
The following function return connection count value.
m2mb_ble_get_connection_count();
M2MB_BLE_DEVICE_INFO_T* m2mb_ble_get_current_peer_device_info | ( | ) |
The following function searches the specified List for the specified Connection bluetooth device address.
The following function searches the specified List for the specified Connection bluetooth device address.
m2mb_ble_get_current_peer_device_info();
UINT32 m2mb_ble_get_gatt_mtu | ( | ) |
BLE get the MTU size.
The following function return MTU size.
INT32 m2mb_ble_init | ( | M2MB_BLE_INIT_PARAM_T * | initParam | ) |
BLE Interface Initialization.
This API initializes the BLE stack interface depend on the the BLE driver and initialized parameters.
[in] | initParam | User should pass the default initialized param using M2MB_BLE_INIT_PARAM_T. |
m2mb_ble_init(&bleInitParam);
The following function is used to check whether Just Works pairing is used during the connection process.
The following function is used to check whether Just Works pairing is used during the connection process.
m2mb_ble_justworksPairingStatus_Get();
INT32 m2mb_ble_read_response | ( | UINT32 | bleStackId, |
UINT32 | transactionId, | ||
UINT32 | dataLen, | ||
UINT8 * | data | ||
) |
Responds with a successful response to a received M2MB_BLE_ET_GATT_SERVER_READ_REQUEST_E event.
This function only allows a successful response to be sent. If an error response is required, the m2mb_ble_error_response() function should be used to respond with the error information.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | transactionId | Transaction ID of the original read request. |
[in] | dataLen | Specifies the amount of data to return.This is the amount of data(in bytes)pointed to by the Data parameter. |
[in] | data | Specifies the buffer that contains the data to return in the read response. This buffer must point to a buffer that contains (at least) as many bytes as specified by the DataLength parameter. |
m2mb_ble_read_response(bluetoothStackId,GATT_ServerEventData->Event_Data.GATT_Read_Request_Data->TransactionID, strlen((const char *)temp), temp);
BLE Scan Response data init.
This function is used to initialized the Scan Response data.
[in] | enableFlag | set the flag for initialization. |
m2mb_ble_scanRespDataInit(enableFlag);
Provides a mechanism for a service handler to send a GATT attribute handle/value notification to a remote, connected, GATT client.
Indications require the client to acknowledge that the indication was received.
The serviceId parameter must have been returned from a successful call to the m2mb_ble_service_register() function. If a successful return value is returned, it will be greater than zero and less than or equal to AttributeValueLength(len) parameter.
[in] | serviceId | Service ID of the service that is sending the indication. Returned in a successful call to m2mb_ble_service_register(). |
[in] | msg | Buffer that contains the value data to be indicated. This buffer must contain (at least) the number of bytes specified by the len parameter. |
[in] | len | Length (in bytes) of the attribute value data that is to be indicated. |
[in] | attOffset | Attribute offset of the first attribute that causes the error. This value will be greater than or equal to zero (specifies the very first attribute in the service) and less than the maximum number of attributes contained in the service. |
Example
Provides a mechanism for a service handler to send a GATT attribute handle/value notification to a remote, connected, GATT client.
Notifications do not require the client to acknowledge that the notification was received.
The serviceId parameter must have been returned from a successful call to the m2mb_ble_service_register() function. If a successful return value is returned, it will be greater than zero and less than or equal to AttributeValueLength(len) parameter.
[in] | serviceId | Service ID of the service that is sending the indication. Returned in a successful call to m2mb_ble_service_register(). |
[in] | msg | Buffer that contains the value data to be indicated. This buffer must contain (at least) the number of bytes specified by the len parameter. |
[in] | len | Length (in bytes) of the attribute value data that is to be notified. |
[in] | attOffset | Attribute offset of the first attribute that causes the error. This value will be greater than or equal to zero (specifies the very first attribute in the service) and less than the maximum number of attributes contained in the service. |
m2mb_ble_send_notification(atCmdServiceId[srvNum], (char *)msg, len, offset);
BLE De-registers a previously registered GATT service that was registered via a successful call to the m2mb_ble_service_register() function.
This function will free all resources that are being utilized by the service being removed from the GATT database.
[in] | serviceId | Specifies the service ID of the service that is to be removed. This value is the successful return value from the call to m2mb_ble_service_register(). |
m2mb_ble_service_deregister(serviceId);
INT32 m2mb_ble_service_register | ( | UINT32 | bleStackId, |
UINT8 | serviceFlag, | ||
UINT32 | srviceAttCnt, | ||
M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T * | ServiceTable, | ||
M2MB_BLE_GATT_ATTRIBUTE_HANDLE_GROUP_T * | ServiceHandleGroupResult, | ||
M2MB_BLE_GATT_SERVER_EVENT_CB_T | ServerEventCallback, | ||
UINT32 | CallbackParameter | ||
) |
BLE Registers a GATT service with the local GATT server.
This function registers a service with the specified service attributes with the local GATT server.This function will return the unique service ID which is used to identify the service as well as the starting and ending attribute handles of the service in the local GATT service. The first entry in the array pointed to by service will be allocated with the starting handle specified in the ServiceHandleGroupResult structure. The second entry will be allocated at the starting Handle + 1, and so on. serviceFlag is a bitmask that is made up of bitmasks of the form M2MB_BLE_GATT_SERVICE_FLAGS_XXX. The serviceFlag may not be zero, i.e., at least one M2MB_BLE_GATT_SERVICE_FLAGS_XXX must be set for this call to succeed. The ServiceHandleGroupResult parameter is both an input and an output parameter. If the following test is true (and Starting_Handle and Ending_Handle members are greater than zero), the GATT layer will attempt to assign the service into the specified location in the ServiceTable:
ServiceHandleGroupResult->Ending_Handle == (ServiceHandleGroupResult->Starting_Handle + (NumberOfServiceAttributeEntries - 1))
If the specified location is not available, this function will return the error code M2MB_BLE_BTGATT_ERROR_INSUFFICIENT_HANDLES. The Service Table passed to this function is stored as a reference and as such its associated memory must be maintained by the application until the service has been removed.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol. |
[in] | serviceFlag | Specifies the current service flags to apply to the registered service. The value of this parameter is a bitmask of zero or more of the following values: M2MB_BLE_GATT_SERVICE_FLAGS_LE_SERVICE M2MB_BLE_GATT_SERVICE_FLAGS_BR_EDR_SERVICE |
[in] | srviceAttCnt | Specifies the total number of service attribute entries that are contained in the ServiceTable parameter. |
[in] | ServiceTable | Pointer to an array of service attribute entries that specify all of the service attributes for the registered service. |
[in,out] | ServiceHandleGroupResult | his parameter is both an input and output parameter.On input, this parameter can be used to request that GATT place the service at a specific handle range in the GATT database. This is accomplished by setting the Starting_Handle and Ending_Handle members of this structure to the requested handle range in the GATT database.If these members are zero, or otherwise invalid on input, the GATT layer will place the service in the first available region in the GATT database. On output,GATT will return the handle range of the registered service if this function returns success. |
[in] | ServerEventCallback | Callback function that is registered to receive events that are associated with the specified service. |
[in] | CallbackParameter | User-defined parameter that will be passed back to the user in the callback function. |
m2mb_ble_service_register(bleStackId,M2MB_BLE_GATT_SERVICE_FLAGS_LE_SERVICE, atCmdServiceAttCnt[atCmdRegisteredSrvCnt],(M2MB_BLE_GATT_SERVICE_ATTRIBUTE_ENTRY_T *)(pAtCmdServices[atCmdRegisteredSrvCnt]), &serviceHandleGroup, atCmdServCb[atCmdRegisteredSrvCnt], atCmdRegisteredSrvCnt);
BLE Set the connect Mode.
This API is used to set the connect mode of the ble device.
[in] | connMode | Set the connect mode flag. |
m2mb_ble_set_connect(connMode);
BLE Set discoverable Mode.
This API is used to set the d mode of the BLE device.
[in] | discMode | Set the discoverable mode flag. |
m2mb_ble_set_disc(discMode);
VOID m2mb_ble_set_get_connection_cb | ( | VOID * | cbCtx, |
M2MB_BLE_GATT_CONNECT_USER_CB_T | cb | ||
) |
This function is used to set and get the connection callback function.
This function used to set and get the connection callback function.
[in] | cbCtx | gatt connection callback Context. |
[in] | cb | Callback parameter that will be passed to the specified when the connection events occurs. |
m2mb_ble_conn_gatt_connection_cb(VOID *cbCtx,UINT32 eventType,M2MB_BLE_DEVICE_INFO_T *deviceInfo)
BLE Set the IoCapability.
This API is used to set the IoCapability of the ble device.
[in] | bleStackId | Bluetooth stack id for the device. |
[in] | ioCap | IoCapability value type. IoCapability Types: M2MB_BLE_LIC_DISPLAY_ONLY_E, M2MB_BLE_LIC_DISPLAY_YES_NO_E, M2MB_BLE_LIC_KEYBOARD_ONLY_E, M2MB_BLE_LIC_NO_INPUT_NO_OUTPUT_E, M2MB_BLE_LIC_KEYBOARD_DISPLAY_E |
m2mb_ble_set_io_capabilities(bleStackId,ioCap);
BLE Set Pairable Mode.
This API is used to set the pairability mode of the BLE device.
[in] | pairMode | Set the pairable mode flag. |
m2mb_ble_set_pairable(pairMode);
VOID m2mb_ble_set_pairing_status_cb | ( | VOID * | cbCtx, |
M2MB_BLE_GAP_PAIR_STATUS_USER_CB_T | cb | ||
) |
This function is used to set the pairing status callback function.
This function used to set the pairing status callback function.
[in] | cbCtx | GATT connection callback Context. |
[in] | cb | Callback parameter that will be passed to the specified when the pairing status events occurs. |
m2mb_ble_set_pairing_status_cb(blePairCtx,m2mb_ble_pairing_status_write_cb);
VOID m2mb_ble_set_passkey_cb | ( | VOID * | cbCtx, |
M2MB_BLE_PASSKEY_USER_CB_T | cb | ||
) |
This function is used to set the passkey call back.
This function used to set the passkey call back function.
[in] | cbCtx | GATT connection callback Context. |
[in] | cb | Callback parameter that will be passed to the specified when the connection events occurs. |
m2mb_ble_set_passkey_cb(sspCtx,m2m_s2w_ble_ssppin_cb);
INT32 m2mb_ble_txpower_get | ( | UINT32 | bleStackId, |
M2MB_BOOL_T | conn, | ||
INT8 * | txPower | ||
) |
INT32 m2mb_ble_txpower_set | ( | UINT32 | bleStackId, |
M2MB_BOOL_T | conn, | ||
INT8 | txPower | ||
) |
INT32 m2mb_ble_txtest | ( | UINT32 | BluetoothStackID, |
UINT8 | TX_Frequency, | ||
UINT8 | Length_Of_Test_Data, | ||
UINT8 | Packet_Payload, | ||
UINT8 * | StatusResult | ||
) |
Provides a mechanism for a service handler to successfully respond to a received GATT/ATT write request (M2MB_BLE_ET_GATT_SERVER_WRITE_REQUEST_E) event.
This function only allows a successful response to be sent. If an error response is required, the m2mb_ble_error_response() function should be used to respond with the error information.
[in] | bleStackId | Unique identifier assigned to this Bluetooth Protocol Stack. |
[in] | transactionId | Transaction ID of the original read request. |
m2mb_ble_write_response(bluetoothStackId,GATT_ServerEventData->Event_Data.GATT_Write_Request_Data->TransactionID);