WE310F5  39.00.000
m2mb_ble_driver.h File Reference

BLE driver functionality. More...

#include "m2mb_types.h"
#include "m2mb_status.h"
#include "m2mb_os.h"
#include "m2mb_heap.h"

Go to the source code of this file.

Data Structures

struct  M2MB_BLE_UUID_16_S
 Structure for 16 bit UUID. More...
 
struct  M2MB_BLE_UUID_32_S
 Structure for 32 bit UUID. More...
 
struct  M2MB_BLE_UUID_128_S
 Structure for 128 bit UUID. More...
 
struct  M2MB_BLE_UUID_S
 Structure which holds 16 bit / 32 bit / 128 bit UUID value. More...
 
struct  M2MB_BLE_GATT_ELEMENT_S
 Structure which stores all information of an GATT element. More...
 
struct  M2MB_BLE_GATT_SRVD_S
 Structure which contains GATT element information. More...
 
struct  M2MB_BLE_BD_ADDR_S
 Structure to store BLE address. More...
 
struct  M2MB_BLE_BD_NAME_S
 Structure to store Bluetooth device name. More...
 
struct  M2MB_BLE_CENTRAL_CFG_S
 Structure for BLE central configuration parameters. More...
 
struct  M2MB_BLE_PERIPHERAL_CFG_S
 Structure for BLE peripheral configuration parameters. More...
 
struct  M2MB_BLE_CONN_PARAM_S
 Structure for BLE connection parameters configuration. More...
 
struct  M2MB_BLE_SECURITY_CFG_S
 Structure for BLE security configuration parameters. More...
 
struct  M2MB_BLE_DIS_INFO_S
 Structure for BLE Device information service configuration parameters. More...
 
struct  M2MB_BLE_GENERAL_PARAM_S
 Structure for BLE generic configuration parameters. More...
 
struct  M2MB_BLE_CGF_S
 Structure for all BLE configuration parameters. More...
 
struct  M2MB_BLE_SCAN_REPORT_DATA_S
 Structure for scan results in Central mode. More...
 
struct  M2MB_BLE_CENTRAL_NOTIFY_INDICATE_DATA_S
 Structure to hold notification and indication data from remote GATT server. More...
 
struct  M2MB_BLE_GATT_SERVER_EVENT_DETAILS_S
 Structure to hold information for a GATT server event. More...
 
struct  M2MB_BLE_SSP_REQUEST_CTX_T
 Structure used for SSP confirmation. More...
 
struct  M2MB_BLE_PIN_REQUEST_CTX_T
 
struct  M2MB_BLE_UPDATED_PHY_INFO_T
 Structure for Rx and Tx PHY information. More...
 
struct  M2MB_BLE_DATA_LENGTH_CHANGE_INFO_T
 Structure for Rx and Tx octet length. More...
 
struct  M2MB_BLE_USER_EVENT_CTX_S
 Structure to hold all the information required related to an event notified to the application. More...
 
struct  M2MB_BLE_DEVICE_INFO_S
 Structure to hold connected peer BLE device information. More...
 
struct  M2MB_BLE_BOND_LIST_INFO_S
 Structure to hold information of bonded devices. More...
 
#define M2MB_BLE_MAX_DEVICE_NAME_LENGTH   (39+1)
 
#define M2MB_BLE_MAX_MANUFACTURER_NAME_LENGTH   M2MB_BLE_MAX_DEVICE_NAME_LENGTH
 
#define M2MB_BLE_FIXPIN_SIZE   6
 
#define M2MB_BLE_ADV_DATA_SIZE   31
 
#define M2MB_BLE_SCAN_RSP_DATA_SIZE   31
 
#define M2MB_BLE_BOND_ENTRIES_MAX   20
 
#define M2MB_BLE_MAX_GATT_SERVER_SERVICES   10
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_HANDLE   0x01
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_READ_NOT_PERMITTED   0x02
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_WRITE_NOT_PERMITTED   0x03
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_PDU   0x04
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHENTICATION   0x05
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_REQUEST_NOT_SUPPORTED   0x06
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_OFFSET   0x07
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHORIZATION   0x08
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_FOUND   0x0A
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_LONG   0x0B
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x0C
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_ATTRIBUTE_VALUE_LENGTH   0x0D
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION   0x0F
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_UNSUPPORTED_GROUP_TYPE   0x10
 
#define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_RESOURCES   0x11
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_BROADCAST   0x01
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_READ   0x02
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE_WITHOUT_RESPONSE   0x04
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE   0x08
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_NOTIFY   0x10
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_INDICATE   0x20
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_AUTHENTICATED_SIGNED_WRITES   0x40
 
#define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_EXTENDED_PROPERTIES   0x80
 
#define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_BLUETOOTH_SIG   0x01
 
#define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_USB_IMPLEMENTORS_FORUM   0x02
 
enum  M2MB_BLE_UUID_TYPE_T {
  UUID_TYPE_16_BIT_E,
  UUID_TYPE_32_BIT_E,
  UUID_TYPE_128_BIT_E,
  UUID_INVALID_E
}
 Enumeration of UUIDs suuported. More...
 
enum  M2MB_BLE_GATT_ATTRIB_TYPE_T {
  M2MB_BLE_GATT_PRIMARY_SERVICE_E,
  M2MB_BLE_GATT_SECONDARY_SERVICE_E,
  M2MB_BLE_GATT_INCLUDED_SERVICE_E,
  M2MB_BLE_GATT_CHARACTERISTIC_E,
  M2MB_BLE_GATT_DESCRIPTOR_E
}
 Enumeration that defines GATT element type. More...
 
enum  M2MB_BLE_ADVERTISE_EVENT_TYPE_T {
  M2MB_BLE_ADV_EVT_TYPE_UNDIRECTED = 0,
  M2MB_BLE_ADV_EVT_TYPE_DIRECTED = 1,
  M2MB_BLE_ADV_EVT_TYPE_SCANNABLE = 2,
  M2MB_BLE_ADV_EVT_TYPE_NON_CONNECTABLE,
  M2MB_BLE_ADV_EVT_TYPE_SCAN_RSP
}
 Enumeration of BLE Advertise event types. More...
 
enum  M2MB_BLE_CONNECTABILITY_MODE_T {
  M2MB_BLE_NON_CONNECTABLE_E,
  M2MB_BLE_CONNECTABLE_E,
  M2MB_BLE_DIRECT_CONNECTABLE_E
}
 Enumeration of BLE connectability modes. More...
 
enum  M2MB_BLE_DISCOVERABILITY_MODE_T {
  M2MB_BLE_NON_DISCOVERABLE_MODE_E,
  M2MB_BLE_LIMITED_DISCOVERABLE_MODE_E,
  M2MB_BLE_GENERAL_DISCOVERABLE_MODE_E
}
 Enumeration of BLE discoverability modes. More...
 
enum  M2MB_BLE_PAIRABILITY_MODE_T {
  M2MB_BLE_NON_PAIRABLEMODE_E,
  M2MB_BLE_PAIRABLE_MODE_E,
  M2MB_BLE_PAIRABLE_MODE_ENABLE_EXTENDED_EVENTS_E
}
 Enumeration of BLE pairability modes. More...
 
enum  M2MB_BLE_ROLE_T {
  M2MB_BLE_PERIPHERAL_ROLE_E,
  M2MB_BLE_CENTRAL_ROLE_E,
  M2MB_BLE_DUAL_ROLE_E
}
 Enumeration of BLE roles. More...
 
enum  M2MB_BLE_PHYS_INFO_T {
  M2MB_BLE_PHYS_1M_E = 0x1,
  M2MB_BLE_PHYS_2M_E = 0x2,
  M2MB_BLE_PHYS_CODED_E = 0x4
}
 Enumeration of BLE PHY modes. More...
 
enum  M2MB_BLE_PHY_CODED_OPTIONS_T {
  M2MB_BLE_PHYS_OPTIONS_CODED_PREFER_NO,
  M2MB_BLE_PHYS_OPTIONS_CODED_PREFER_S2,
  M2MB_BLE_PHYS_OPTIONS_CODED_PREFER_S8
}
 Enumeration of BLE Coded PHY options. More...
 
enum  M2MB_BLE_ADDRESS_TYPE_T {
  M2MB_BLE_PUBLIC_E,
  M2MB_BLE_RANDOM_E,
  M2MB_BLE_RESOLVABLE_FALLBACK_PUBLIC_E,
  M2MB_BLE_RESOLVABLE_FALLBACK_PRIVATE_E,
  M2MB_BLE_ANONYMOUS_E
}
 Enumeration of BLE address types. More...
 
enum  M2MB_BLE_IO_CAPABILITY_T {
  M2MB_BLE_DISPLAY_ONLY_E,
  M2MB_BLE_DISPLAY_YES_NO_E,
  M2MB_BLE_KEYBOARD_ONLY_E,
  M2MB_BLE_NO_INPUT_NO_OUTPUT_E,
  M2MB_BLE_KEYBOARD_DISPLAY_E
}
 Enumeration of BLE IO capabilities. More...
 
enum  M2MB_BLE_CCCD_T {
  M2MB_BLE_DISABLE_INDICATION_NOTIFICATION_E,
  M2MB_BLE_ENABLE_NOTIFICATION_E,
  M2MB_BLE_ENABLE_INDICATION_E
}
 Enumeration of Notify / Indicate enable of an Client Characteristic Descriptor. More...
 
enum  M2MB_BLE_WLAN_START_MODE {
  M2MB_BLE_WLAN_AP,
  M2MB_BLE_WLAN_STA,
  M2MB_BLE_WLAN_STA_AP
}
 Enumeration for WLAN mode to start at the time of BLE initialization. More...
 
enum  M2MB_BLE_CONFIG_PARAM_T {
  M2MB_BLE_CFG_GET_E,
  M2MB_BLE_CFG_SET_E,
  M2MB_BLE_CFG_SCAN_DURATION_GET_E,
  M2MB_BLE_CFG_SCAN_DURATION_SET_E,
  M2MB_BLE_CFG_SCAN_INTERVAL_GET_E,
  M2MB_BLE_CFG_SCAN_INTERVAL_SET_E,
  M2MB_BLE_CFG_SCAN_WINDOW_GET_E,
  M2MB_BLE_CFG_SCAN_WINDOW_SET_E,
  M2MB_BLE_CFG_SCAN_FILTER_POLICY_GET_E,
  M2MB_BLE_CFG_SCAN_FILTER_POLICY_SET_E,
  M2MB_BLE_CFG_SCAN_FILTER_DUPLICATES_GET_E,
  M2MB_BLE_CFG_SCAN_FILTER_DUPLICATES_SET_E,
  M2MB_BLE_CFG_ADV_INT_MIN_GET_E,
  M2MB_BLE_CFG_ADV_INT_MIN_SET_E,
  M2MB_BLE_CFG_ADV_INT_MAX_GET_E,
  M2MB_BLE_CFG_ADV_INT_MAX_SET_E,
  M2MB_BLE_CFG_ADV_DATA_GET_E,
  M2MB_BLE_CFG_ADV_DATA_SET_E,
  M2MB_BLE_CFG_SCAN_RSP_DATA_GET_E,
  M2MB_BLE_CFG_SCAN_RSP_DATA_SET_E,
  M2MB_BLE_CFG_CONNECT_MODE_GET_E,
  M2MB_BLE_CFG_CONNECT_MODE_SET_E,
  M2MB_BLE_CFG_DISCOVER_MODE_GET_E,
  M2MB_BLE_CFG_DISCOVER_MODE_SET_E,
  M2MB_BLE_CFG_PAIR_MODE_GET_E,
  M2MB_BLE_CFG_PAIR_MODE_SET_E,
  M2MB_BLE_CFG_CONNECTION_INT_MIN_GET_E,
  M2MB_BLE_CFG_CONNECTION_INT_MIN_SET_E,
  M2MB_BLE_CFG_CONNECTION_INT_MAX_GET_E,
  M2MB_BLE_CFG_CONNECTION_INT_MAX_SET_E,
  M2MB_BLE_CFG_SLAVE_LATENCY_GET_E,
  M2MB_BLE_CFG_SLAVE_LATENCY_SET_E,
  M2MB_BLE_CFG_SUPERVISION_TIMEOUT_GET_E,
  M2MB_BLE_CFG_SUPERVISION_TIMEOUT_SET_E,
  M2MB_BLE_CFG_IOCAPABILITY_GET_E,
  M2MB_BLE_CFG_IOCAPABILITY_SET_E,
  M2MB_BLE_CFG_MITM_GET_E,
  M2MB_BLE_CFG_MITM_SET_E,
  M2MB_BLE_CFG_FIXPIN_GET_E,
  M2MB_BLE_CFG_FIXPIN_SET_E,
  M2MB_BLE_CFG_LEPRIVACY_GET_E,
  M2MB_BLE_CFG_LEPRIVACY_SET_E,
  M2MB_BLE_CFG_BOND_STORE_SUPPORT_GET_E,
  M2MB_BLE_CFG_BOND_STORE_SUPPORT_SET_E,
  M2MB_BLE_CFG_BOND_SIZE_GET_E,
  M2MB_BLE_CFG_BOND_SIZE_SET_E,
  M2MB_BLE_CFG_PNP_VERSION_ID_GET_E,
  M2MB_BLE_CFG_PNP_VERSION_ID_SET_E,
  M2MB_BLE_CFG_PNP_VERSION_ID_SOURCE_GET_E,
  M2MB_BLE_CFG_PNP_VERSION_ID_SOURCE_SET_E,
  M2MB_BLE_CFG_PNP_PRODUCT_ID_GET_E,
  M2MB_BLE_CFG_PNP_PRODUCT_ID_SET_E,
  M2MB_BLE_CFG_PNP_PRODUCT_VERSION_GET_E,
  M2MB_BLE_CFG_PNP_PRODUCT_VERSION_SET_E,
  M2MB_BLE_CFG_BLE_ROLE_GET_E,
  M2MB_BLE_CFG_BLE_ROLE_SET_E,
  M2MB_BLE_CFG_BLE_BD_ADDR_GET_E,
  M2MB_BLE_CFG_BLE_DEVICE_NAME_GET_E,
  M2MB_BLE_CFG_BLE_DEVICE_NAME_SET_E,
  M2MB_BLE_CFG_BLE_MANUFACTURER_NAME_GET_E,
  M2MB_BLE_CFG_BLE_MANUFACTURER_NAME_SET_E,
  M2MB_BLE_CFG_BLE_TIO_MODE_GET_E,
  M2MB_BLE_CFG_BLE_TIO_MODE_SET_E
}
 Enumeration of BLE configuration parameters. More...
 
enum  M2MB_BLE_USER_EVENTS_T {
  M2MB_BLE_PERIPHERAL_CONNECT_EVENT_E,
  M2MB_BLE_PERIPHERAL_DISCONNECT_EVENT_E,
  M2MB_BLE_PERIPHERAL_MTU_UPDATE_EVENT_E,
  M2MB_BLE_GATT_SERVER_READ_REQUEST_EVENT_E,
  M2MB_BLE_GATT_SERVER_WRITE_REQUEST_EVENT_E,
  M2MB_BLE_GATT_SERVER_WRITE_WITHOUT_RESPONSE_EVENT_E,
  M2MB_BLE_GATT_SERVER_NOTIFICATION_ENABLE_EVENT_E,
  M2MB_BLE_GATT_SERVER_INDICATION_ENABLE_EVENT_E,
  M2MB_BLE_GATT_SERVER_NOTIFY_INDICATE_ENABLE_EVENT_E,
  M2MB_BLE_GATT_SERVER_NOTIFY_INDICATE_DISABLE_EVENT_E,
  M2MB_BLE_SCAN_EVENT_E,
  M2MB_BLE_CENTRAL_CONNECT_EVENT_E,
  M2MB_BLE_CENTRAL_DISCONNECT_EVENT_E,
  M2MB_BLE_CENTRAL_MTU_UPDATE_EVENT_E,
  M2MB_BLE_CENTRAL_NOTIFY_INDICATE_EVENT_E,
  M2MB_BLE_CONNECT_PARAM_UPDATE_EVENT_E,
  M2MB_BLE_SSP_PIN_NOTIFICATION_EVENT_E,
  M2MB_BLE_SSP_PIN_REQUEST_EVENT_E,
  M2MB_BLE_SSP_CONF_REQUEST_EVENT_E,
  M2MB_BLE_SSP_JUST_WORKS_EVENT_E,
  M2MB_BLE_REMOTE_DEVICE_PHY_INFO_EVENT_E,
  M2MB_BLE_PHY_UPDATE_INFO_EVENT_E,
  M2MB_BLE_DATA_LEN_CHANGE_EVENT_E
}
 Enumeration of BLE events from M2MB layer to application. More...
 
enum  M2MB_BLE_CENTRAL_SCAN_FILTER_DUPLICATES_T {
  M2MB_BLE_SCAN_FILTER_DUPLICATE_DISABLE,
  M2MB_BLE_SCAN_FILTER_DUPLICATE_ENABLE
}
 Enumeration of Scan filter policy. More...
 
enum  M2MB_BLE_RESPONSE_T {
  M2MB_BLE_STATUS_SUCCESS_E,
  M2MB_BLE_STATUS_FAILURE_E,
  M2MB_BLE_STATUS_OUT_OF_RANGE_E,
  M2MB_BLE_STATUS_NOT_READY_E,
  M2MB_BLE_STATUS_UNSUPPORTED_E,
  M2MB_BLE_STATUS_PARAM_INVALID_E,
  M2MB_BLE_STATUS_NO_MEM_E,
  M2MB_BLE_STATUS_AUTH_FAILURE_E,
  M2MB_BLE_STATUS_AUTH_REJECTED_E,
  M2MB_BLE_STATUS_INVALID_E,
  M2MB_BLE_STATUS_ERR_INVALID_HANDLE_E,
  M2MB_BLE_STATUS_ERR_READ_NOT_PERMITTED_E,
  M2MB_BLE_STATUS_ERR_WRITE_NOT_PERMITTED_E,
  M2MB_BLE_STATUS_ERR_INVALID_PDU_E,
  M2MB_BLE_STATUS_ERR_REQUEST_NOT_SUPPORTED_E,
  M2MB_BLE_STATUS_ERR_INVALID_OFFSET_E,
  M2MB_BLE_STATUS_ERR_ATTRIBUTE_NOT_FOUND_E,
  M2MB_BLE_STATUS_ERR_INVALID_ATTRIBUTE_VALUE_LENGTH_E,
  M2MB_BLE_STATUS_ERR_OUT_OF_ORDER_E,
  M2MB_BLE_STATUS_ERR_INSUFFICIENT_AUTHORIZATION_E,
  M2MB_BLE_STATUS_ERR_INSUFFICIENT_AUTHENTICATION_E,
  M2MB_BLE_STATUS_ERR_INSUFFICIENT_ENCRYPTION_E
}
 Enumeration of BLE response status types. More...
 
enum  M2MB_BLE_ADV_TYPE_T {
  M2MB_BLE_ADVERTISE_ON_WITH_CUSTOMIZED_ADV_DISABLE,
  M2MB_BLE_ADVERTISE_ON_WITH_CUSTOMIZED_ADV_ENABLE,
  M2MB_BLE_ADVERTISE_OFF
}
 Enumeration of BLE advertisement types. More...
 
typedef struct M2MB_BLE_UUID_16_S M2MB_BLE_UUID_16_T
 Structure for 16 bit UUID. More...
 
typedef struct M2MB_BLE_UUID_32_S M2MB_BLE_UUID_32_T
 Structure for 32 bit UUID. More...
 
typedef struct M2MB_BLE_UUID_128_S M2MB_BLE_UUID_128_T
 Structure for 128 bit UUID. More...
 
typedef struct M2MB_BLE_UUID_S M2MB_BLE_UUID_T
 Structure which holds 16 bit / 32 bit / 128 bit UUID value. More...
 
typedef struct M2MB_BLE_GATT_ELEMENT_S M2MB_BLE_GATT_ELEMENT_T
 Structure which stores all information of an GATT element. More...
 
typedef struct M2MB_BLE_GATT_SRVD_S M2MB_BLE_GATT_SRVD_T
 Structure which contains GATT element information. More...
 
typedef struct M2MB_BLE_BD_ADDR_S M2MB_BLE_BD_ADDR_T
 Structure to store BLE address. More...
 
typedef INT8 M2MB_BLE_BOARDSTR_T[16]
 Type definition to hold Bluetooth device name in string format. More...
 
typedef struct M2MB_BLE_BD_NAME_S M2MB_BLE_BD_NAME_T
 Structure to store Bluetooth device name. More...
 
typedef struct M2MB_BLE_CENTRAL_CFG_S M2MB_BLE_CENTRAL_CFG_T
 Structure for BLE central configuration parameters. More...
 
typedef struct M2MB_BLE_PERIPHERAL_CFG_S M2MB_BLE_PERIPHERAL_CFG_T
 Structure for BLE peripheral configuration parameters. More...
 
typedef struct M2MB_BLE_CONN_PARAM_S M2MB_BLE_CONN_PARAM_T
 Structure for BLE connection parameters configuration. More...
 
typedef struct M2MB_BLE_SECURITY_CFG_S M2MB_BLE_SECURITY_CFG_T
 Structure for BLE security configuration parameters. More...
 
typedef struct M2MB_BLE_DIS_INFO_S M2MB_BLE_DIS_INFO_T
 Structure for BLE Device information service configuration parameters. More...
 
typedef struct M2MB_BLE_GENERAL_PARAM_S M2MB_BLE_GENERAL_PARAM_T
 Structure for BLE generic configuration parameters. More...
 
typedef struct M2MB_BLE_CGF_S M2MB_BLE_CGF_T
 Structure for all BLE configuration parameters. More...
 
typedef struct M2MB_BLE_SCAN_REPORT_DATA_S M2MB_BLE_SCAN_REPORT_DATA_T
 Structure for scan results in Central mode. More...
 
typedef struct M2MB_BLE_CENTRAL_NOTIFY_INDICATE_DATA_S M2MB_BLE_CENTRAL_NOTIFY_INDICATE_DATA_T
 Structure to hold notification and indication data from remote GATT server. More...
 
typedef struct M2MB_BLE_GATT_SERVER_EVENT_DETAILS_S M2MB_BLE_GATT_SERVER_EVENT_DETAILS_T
 Structure to hold information for a GATT server event. More...
 
typedef struct M2MB_BLE_USER_EVENT_CTX_S M2MB_BLE_USER_EVENT_CTX_T
 Structure to hold all the information required related to an event notified to the application. More...
 
typedef struct M2MB_BLE_DEVICE_INFO_S M2MB_BLE_DEVICE_INFO_T
 Structure to hold connected peer BLE device information. More...
 
typedef HANDLE M2MB_BLE_HANDLE
 Type definition for BLE handle. More...
 
typedef struct M2MB_BLE_BOND_LIST_INFO_S M2MB_BLE_BOND_LIST_INFO_T
 Structure to hold information of bonded devices. More...
 
typedef void(* m2mb_ble_event_callback) (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_USER_EVENTS_T ble_event, UINT16 resp_size, void *resp, void *userdata)
 BLE callback function prototype. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_initialize (M2MB_BLE_HANDLE *ble_handle, m2mb_ble_event_callback ble_callback, void *user_data)
 BLE stack initialization. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_shutdown (M2MB_BLE_HANDLE ble_handle)
 BLE stack shutdown. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_conf (M2MB_BLE_HANDLE ble_handle, UINT8 num_cmds,...)
 BLE configuration GET / SET. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_ssppin_reply (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr, M2MB_BLE_ADDRESS_TYPE_T bd_addr_type, INT32 ssppin, UINT8 accept_flag)
 SSP Pin reply used as part of BLE pairing procedure. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_sspconf_reply (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr, M2MB_BLE_ADDRESS_TYPE_T bd_addr_type, UINT32 confirmation_flag)
 SSP CONF reply used as part of BLE pairing procedure. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_bond_list_get (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BOND_LIST_INFO_T *bond_list_info, UINT32 *num_of_entries)
 Gets the list of bonded devices. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_bond_delete (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr)
 Deletes the bond information of a BLE device from the bonded list. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_advertise (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_ADV_TYPE_T adv_type)
 BLE advertise start and stop funtion. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_secure_ccccd (M2MB_BLE_HANDLE ble_handle)
 Secure all client characteristic descriptors of a new service. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_service_add (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_UUID_T service_uuid)
 Add a new BLE GATT service. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_characteristic_add (M2MB_BLE_HANDLE ble_handle, UINT8 properties, M2MB_BLE_UUID_T characteristic_uuid)
 Add BLE GATT characteristic in a service. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_characteristic_value_add (M2MB_BLE_HANDLE ble_handle, UINT16 permissions, UINT16 value_len, UINT8 *value, UINT32 *characteristic_id)
 Add BLE GATT characteristic value in a service. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_complete (M2MB_BLE_HANDLE ble_handle, UINT32 *service_id)
 Stop adding new characteristics to a GATT service. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_serv_send_data (M2MB_BLE_HANDLE ble_handle, UINT32 serv_id, UINT32 char_id, UINT8 *value, UINT16 value_len, M2MB_BLE_CCCD_T cccd)
 Send GATT server data to remote GATT client. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_scan_start (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr)
 Start to scan for BLE devices. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_scan_stop (M2MB_BLE_HANDLE ble_handle)
 Stop the BLE device scaning. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_connect (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr, M2MB_BLE_ADDRESS_TYPE_T bd_addr_type, INT32 *connection_id)
 Connect to a BLE peripheral device. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_disconnect (M2MB_BLE_HANDLE ble_handle, INT32 connection_id)
 Disconnects from a connected BLE peripheral device. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_start_discovery (M2MB_BLE_HANDLE ble_handle, INT32 connection_id, M2MB_BLE_UUID_T uuid, M2MB_BLE_GATT_SRVD_T *results)
 Discovery of services and characteristics of a GATT server. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_read_value_request (M2MB_BLE_HANDLE ble_handle, INT32 connection_id, INT32 char_handle, UINT8 **value, UINT16 *value_len)
 Read value request on a discovered characteristic. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_write_value_request (M2MB_BLE_HANDLE ble_handle, INT32 connection_id, INT32 char_handle, UINT8 *value, UINT16 value_len)
 Write value request on a discovered characteristic. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_write_value_command (M2MB_BLE_HANDLE ble_handle, INT32 connection_id, INT32 char_handle, UINT8 *value, UINT16 value_len)
 Write command on a discovered characteristic. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_cccd_request (M2MB_BLE_HANDLE ble_handle, INT32 connection_id, INT32 char_handle, M2MB_BLE_CCCD_T cccd_val)
 Enables and disables a Notication/Indication on a client characteristic descriptor. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_set_phy (M2MB_BLE_HANDLE ble_handle, UINT8 conn_id, M2MB_BLE_PHYS_INFO_T phy_pref, M2MB_BLE_PHY_CODED_OPTIONS_T phy_coded_options)
 Set the PHY options. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_data_len_set (M2MB_BLE_HANDLE ble_handle, UINT8 conn_id, UINT16 tx_octets)
 Set data length used in Link Layer for data length extension. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_connid_device_info_get (M2MB_BLE_HANDLE ble_handle, UINT8 conn_id, M2MB_BLE_DEVICE_INFO_T *dev_info)
 Get connected peer device information using connection ID. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_bdaddr_device_info_get (M2MB_BLE_HANDLE ble_handle, M2MB_BLE_BD_ADDR_T bd_addr, M2MB_BLE_DEVICE_INFO_T *dev_info)
 Get connected peer device information using remote BD address. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_central_initiate_pairing (M2MB_BLE_HANDLE ble_handle, UINT8 conn_id)
 Initiate pairing to a connected device in Central mode. More...
 
M2MB_BLE_RESPONSE_T m2mb_ble_wlan_config_set (M2MB_BLE_WLAN_START_MODE wlan_start_mode)
 WLAN mode to start at the time of BLE initialization. More...
 

Detailed Description

BLE driver functionality.

epl/inc/wireless/ble/m2mb_ble_driver.h

This file contains the public APIs and structures of Bluetooth Low Energy (BLE) client and server module.

Note
<Notes, dependencies mandatory> Dependencies:
Author
Jyothi Swaroop
Date
25/02/2021

Definition in file m2mb_ble_driver.h.