WE310F5  39.00.000
m2mb_ble_driver.h
Go to the documentation of this file.
1  /*===============================================================================================*/
2  /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
25 /* GLOBAL DECLARATIONS ==========================================================================*/
26 #ifndef M2MB_BLE_DRIVER_H
27 #define M2MB_BLE_DRIVER_H
28 
29 #include "m2mb_types.h"
30 #include "m2mb_status.h"
31 #include "m2mb_os.h"
32 #include "m2mb_heap.h"
33 
47 /*-----------------------------------------------------------------------------------------------*/
48 
53 /*-----------------------------------------------------------------------------------------------*/
54 #define M2MB_BLE_MAX_DEVICE_NAME_LENGTH (39+1)
55 #define M2MB_BLE_MAX_MANUFACTURER_NAME_LENGTH M2MB_BLE_MAX_DEVICE_NAME_LENGTH
56 #define M2MB_BLE_FIXPIN_SIZE 6
57 #define M2MB_BLE_ADV_DATA_SIZE 31
58 #define M2MB_BLE_SCAN_RSP_DATA_SIZE 31
59 #define M2MB_BLE_BOND_ENTRIES_MAX 20
61 #define M2MB_BLE_MAX_GATT_SERVER_SERVICES 10
63 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_HANDLE 0x01
64 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_READ_NOT_PERMITTED 0x02
65 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_WRITE_NOT_PERMITTED 0x03
66 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_PDU 0x04
67 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHENTICATION 0x05
68 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_REQUEST_NOT_SUPPORTED 0x06
69 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_OFFSET 0x07
70 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_AUTHORIZATION 0x08
71 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_FOUND 0x0A
72 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_ATTRIBUTE_NOT_LONG 0x0B
73 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE 0x0C
74 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INVALID_ATTRIBUTE_VALUE_LENGTH 0x0D
75 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_ENCRYPTION 0x0F
76 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_UNSUPPORTED_GROUP_TYPE 0x10
77 #define M2MB_BLE_ATT_PROTOCOL_ERROR_CODE_INSUFFICIENT_RESOURCES 0x11
79 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_BROADCAST 0x01
80 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_READ 0x02
81 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE_WITHOUT_RESPONSE 0x04
82 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_WRITE 0x08
83 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_NOTIFY 0x10
84 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_INDICATE 0x20
85 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_AUTHENTICATED_SIGNED_WRITES 0x40
86 #define M2MB_BLE_GATT_CHARACTERISTIC_PROPERTIES_EXTENDED_PROPERTIES 0x80
92 #define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_BLUETOOTH_SIG 0x01
93 #define M2MB_BLE_DIS_PNP_ID_VENDOR_SOURCE_USB_IMPLEMENTORS_FORUM 0x02
94 
95 
102 typedef struct M2MB_BLE_UUID_16_S
103 {
107 
114 typedef struct M2MB_BLE_UUID_32_S
115 {
121 
122 /* */
129 typedef struct M2MB_BLE_UUID_128_S
130 {
148 
154 typedef enum
155 {
161 
167 typedef struct M2MB_BLE_UUID_S
168 {
170  union
171  {
175  };
177 
183 typedef enum
184 {
191 
199 {
208 
215 typedef struct M2MB_BLE_GATT_SRVD_S
216 {
220 
226 typedef enum
227 {
234 
240 typedef enum
241 {
246 
252 typedef enum
253 {
258 
264 typedef enum
265 {
270 
276 typedef enum
277 {
282 
288 typedef enum
289 {
294 
300 typedef enum
301 {
306 
307 
313 typedef enum
314 {
317 
320 
324 
328 
333 
339 typedef enum
340 {
343 
346 
349 
352 
356 
357 
364 typedef struct M2MB_BLE_BD_ADDR_S
365 {
373 
374 
381 
382 
388 typedef struct M2MB_BLE_BD_NAME_S
389 {
392 
398 typedef enum
399 {
404 
410 typedef enum
411 {
416 
417 /***************************************************************/
418 /* BLE Configuration / BLE Profile */
419 /***************************************************************/
420 /* BLE configuration parameters */
427 typedef enum
428 {
499 
506 {
511 
518 {
528 
535 typedef struct M2MB_BLE_CONN_PARAM_S
536 {
542 
549 {
557 
563 typedef struct M2MB_BLE_DIS_INFO_S
564 {
570 
577 {
585 
591 typedef struct M2MB_BLE_CGF_S
592 {
600 
601 
602 /********************************************************************************************************/
603 /* BLE configuration related */
604 /********************************************************************************************************/
605 
606 
607 /* BLE EVENTS to the user / application layer from M2MB to registered callback */
615 typedef enum
616 {
646 
654 {
663 
670 {
671  UINT8 notify_ind_flag; /* For Notification, notify_ind_flag = 1. For Indication, notify_ind_flag = 0 */
672  UINT16 handle; /* characteristic handle */
676 
682 typedef enum
683 {
687 
694 {
705 
711 typedef struct
712 {
718 
719 typedef struct
720 {
723  INT8 pincode[7];
727 
734 typedef struct
735 {
739 
746 typedef struct
747 {
751 
759 {
764  union
765  {
775  } ;
777 
778 
779 /***************************************************************/
780 /* BLE Device Info */
781 /***************************************************************/
788 {
800 
801 
802 /***************************************************************/
803 /* M2MB BLE API's */
804 /***************************************************************/
805 
806 
814 
820 typedef enum
821 {
847 
854 {
859 
865 typedef enum
866 {
871 
872 
883 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);
884 
885 
910 M2MB_BLE_RESPONSE_T m2mb_ble_initialize(M2MB_BLE_HANDLE *ble_handle, m2mb_ble_event_callback ble_callback, void *user_data);
911 
936 
963 M2MB_BLE_RESPONSE_T m2mb_ble_conf(M2MB_BLE_HANDLE ble_handle, UINT8 num_cmds, ...);
964 
999 
1032 
1060 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);
1061 
1088 
1118 
1146 
1173 
1203 
1238 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);
1239 
1271 
1310 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);
1311 
1342 
1368 
1401 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);
1402 
1431 
1468 
1503 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);
1504 
1539 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);
1540 
1575 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);
1576 
1609 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);
1610 
1646 
1676 M2MB_BLE_RESPONSE_T m2mb_ble_data_len_set(M2MB_BLE_HANDLE ble_handle, UINT8 conn_id, UINT16 tx_octets);
1677 
1712 
1744 
1776 
1801 
1805 /*-----------------------------------------------------------------------------------------------*/
1806 
1807 
1808 #endif
M2MB_BLE_CONNECTABILITY_MODE_T
Enumeration of BLE connectability modes.
Structure used for SSP confirmation.
#define M2MB_BLE_MAX_MANUFACTURER_NAME_LENGTH
M2MB_BLE_DISCOVERABILITY_MODE_T discover_mode
M2MB_BLE_DISCOVERABILITY_MODE_T
Enumeration of BLE discoverability modes.
M2MB_BLE_BD_ADDR_T BD_ADDR
Structure which stores all information of an GATT element.
struct M2MB_BLE_BOND_LIST_INFO_S M2MB_BLE_BOND_LIST_INFO_T
Structure to hold information of bonded devices.
Structure for 128 bit UUID.
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.
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.
M2MB_BLE_GATT_SERVER_EVENT_DETAILS_T gatt_attrib
struct M2MB_BLE_SECURITY_CFG_S M2MB_BLE_SECURITY_CFG_T
Structure for BLE security configuration parameters.
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.
M2MB_BLE_DATA_LENGTH_CHANGE_INFO_T data_len
struct M2MB_BLE_DEVICE_INFO_S M2MB_BLE_DEVICE_INFO_T
Structure to hold connected peer BLE device information.
unsigned char UINT8
Definition: m2mb_types.h:86
M2MB_BLE_RESPONSE_T m2mb_ble_conf(M2MB_BLE_HANDLE ble_handle, UINT8 num_cmds,...)
BLE configuration GET / SET.
Basic functionality of Operating systems.
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.
M2MB_BLE_ADDRESS_TYPE_T identity_address_type
M2MB_BLE_RESPONSE_T m2mb_ble_shutdown(M2MB_BLE_HANDLE ble_handle)
BLE stack shutdown.
struct M2MB_BLE_UUID_32_S M2MB_BLE_UUID_32_T
Structure for 32 bit UUID.
M2MB_BLE_CONN_PARAM_T connection_params
UINT8 scan_response_data[M2MB_BLE_SCAN_RSP_DATA_SIZE]
M2MB_BLE_BD_ADDR_T remote_bd_addr
M2MB_BLE_UUID_TYPE_T uuid_type
M2MB_BLE_BD_ADDR_T remote_bd_address
M2MB_BLE_PAIRABILITY_MODE_T pair_mode
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_secure_ccccd(M2MB_BLE_HANDLE ble_handle)
Secure all client characteristic descriptors of a new service.
M2MB_BLE_ADVERTISE_EVENT_TYPE_T
Enumeration of BLE Advertise event types.
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.
struct M2MB_BLE_UUID_S M2MB_BLE_UUID_T
Structure which holds 16 bit / 32 bit / 128 bit UUID value.
M2MB_BLE_RESPONSE_T m2mb_ble_initialize(M2MB_BLE_HANDLE *ble_handle, m2mb_ble_event_callback ble_callback, void *user_data)
BLE stack initialization.
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.
struct M2MB_BLE_SCAN_REPORT_DATA_S M2MB_BLE_SCAN_REPORT_DATA_T
Structure for scan results in Central mode.
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.
M2MB_BLE_UUID_128_T uuid_128
struct M2MB_BLE_GATT_ELEMENT_S M2MB_BLE_GATT_ELEMENT_T
Structure which stores all information of an GATT element.
#define M2MB_BLE_FIXPIN_SIZE
struct M2MB_BLE_PERIPHERAL_CFG_S M2MB_BLE_PERIPHERAL_CFG_T
Structure for BLE peripheral configuration parameters.
Structure which contains GATT element information.
M2MB_BLE_PHYS_INFO_T rx_phy
INT8 device_name[M2MB_BLE_MAX_DEVICE_NAME_LENGTH+1]
This file contains the public APIs and structures of the heap module.
M2MB_BLE_GATT_ATTRIB_TYPE_T type
unsigned short UINT16
Definition: m2mb_types.h:87
M2MB_BLE_SCAN_REPORT_DATA_T scan_data
M2MB_BLE_WLAN_START_MODE
Enumeration for WLAN mode to start at the time of BLE initialization.
M2MB_BLE_BD_ADDR_T identity_address_bdaddr
#define M2MB_BLE_SCAN_RSP_DATA_SIZE
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.
M2MB_BLE_GATT_ATTRIB_TYPE_T
Enumeration that defines GATT element type.
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.
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.
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.
M2MB_BLE_CENTRAL_CFG_T ble_central_cfg
M2MB_BLE_ROLE_T
Enumeration of BLE roles.
Structure for BLE connection parameters configuration.
UINT8 BOOLEAN
Definition: m2mb_types.h:95
struct M2MB_BLE_BD_NAME_S M2MB_BLE_BD_NAME_T
Structure to store Bluetooth device name.
M2MB_BLE_UPDATED_PHY_INFO_T updated_phy_info
M2MB_BLE_IO_CAPABILITY_T
Enumeration of BLE IO capabilities.
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.
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.
M2MB_BLE_PIN_REQUEST_CTX_T ssp_pin
M2MB_BLE_CCCD_T
Enumeration of Notify / Indicate enable of an Client Characteristic Descriptor.
M2MB_BLE_IO_CAPABILITY_T iocapability
M2MB_BLE_RESPONSE_T m2mb_ble_gatts_complete(M2MB_BLE_HANDLE ble_handle, UINT32 *service_id)
Stop adding new characteristics to a GATT service.
M2MB_BLE_CONN_PARAM_T ble_conn_param
#define M2MB_BLE_MAX_DEVICE_NAME_LENGTH
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.
M2MB_BLE_SECURITY_CFG_T ble_security_cfg
M2MB_BLE_ADDRESS_TYPE_T remote_address_type
Structure for scan results in Central mode.
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...
struct M2MB_BLE_CONN_PARAM_S M2MB_BLE_CONN_PARAM_T
Structure for BLE connection parameters configuration.
M2MB_BLE_PHYS_INFO_T
Enumeration of BLE PHY modes.
struct M2MB_BLE_DIS_INFO_S M2MB_BLE_DIS_INFO_T
Structure for BLE Device information service configuration parameters.
M2MB_BLE_CONNECTABILITY_MODE_T connect_mode
M2MB_BLE_ADDRESS_TYPE_T bd_addr_type
#define M2MB_BLE_ADV_DATA_SIZE
M2MB_BLE_UUID_16_T uuid_16
struct M2MB_BLE_BD_ADDR_S M2MB_BLE_BD_ADDR_T
Structure to store BLE address.
M2MB_BLE_CENTRAL_NOTIFY_INDICATE_DATA_T notify_data
M2MB_BLE_ADDRESS_TYPE_T remote_bd_addr_type
struct M2MB_BLE_CGF_S M2MB_BLE_CGF_T
Structure for all BLE configuration parameters.
signed char INT8
Definition: m2mb_types.h:80
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.
struct M2MB_BLE_GATT_SERVER_EVENT_DETAILS_S M2MB_BLE_GATT_SERVER_EVENT_DETAILS_T
Structure to hold information for a GATT server event.
M2MB_BLE_BD_ADDR_T remote_bd_addr
Structure to store Bluetooth device name.
UINT8 data[M2MB_BLE_ADV_DATA_SIZE]
M2MB_BLE_PERIPHERAL_CFG_T ble_peripheral_cfg
M2MB_BLE_ADVERTISE_EVENT_TYPE_T bd_adv_type
struct M2MB_BLE_UUID_16_S M2MB_BLE_UUID_16_T
Structure for 16 bit UUID.
Structure for Rx and Tx PHY information.
M2MB_BLE_ADV_TYPE_T
Enumeration of BLE advertisement types.
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.
M2MB_BLE_BD_ADDR_T ble_bd_address
M2MB_BLE_PAIRABILITY_MODE_T
Enumeration of BLE pairability modes.
M2MB_BLE_UUID_TYPE_T
Enumeration of UUIDs suuported.
M2MB_BLE_DIS_INFO_T ble_dis_param
Structure for BLE Device information service configuration parameters.
M2MB_BLE_ROLE_T remote_bd_role
M2MB_BLE_RESPONSE_T m2mb_ble_scan_stop(M2MB_BLE_HANDLE ble_handle)
Stop the BLE device scaning.
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.
M2M base status (ver. )
Structure to hold information of bonded devices.
Structure for 32 bit UUID.
Structure for BLE peripheral configuration parameters.
INT8 ble_manufacturer_name[M2MB_BLE_MAX_MANUFACTURER_NAME_LENGTH+1]
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.
Structure to store BLE address.
INT8 M2MB_BLE_BOARDSTR_T[16]
Type definition to hold Bluetooth device name in string format.
M2MB_BLE_CENTRAL_SCAN_FILTER_DUPLICATES_T
Enumeration of Scan filter policy.
UINT8 fix_pin[M2MB_BLE_FIXPIN_SIZE+1]
unsigned long int UINT32
Definition: m2mb_types.h:88
UINT8 advertise_data[M2MB_BLE_ADV_DATA_SIZE]
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.
M2MB_BLE_USER_EVENTS_T
Enumeration of BLE events from M2MB layer to application.
M2MB_BLE_ADDRESS_TYPE_T
Enumeration of BLE address types.
Structure to hold information for a GATT server event.
signed int INT32
Definition: m2mb_types.h:82
M2MB_BLE_PHY_CODED_OPTIONS_T
Enumeration of BLE Coded PHY options.
Structure for all BLE configuration parameters.
UINT8 bd_name[M2MB_BLE_MAX_DEVICE_NAME_LENGTH]
Structure for BLE security configuration parameters.
M2MB_BLE_CONFIG_PARAM_T
Enumeration of BLE configuration parameters.
M2MB_BLE_RESPONSE_T m2mb_ble_disconnect(M2MB_BLE_HANDLE ble_handle, INT32 connection_id)
Disconnects from a connected BLE peripheral device.
Structure for BLE central configuration parameters.
void * HANDLE
Definition: m2mb_types.h:98
HANDLE M2MB_BLE_HANDLE
Type definition for BLE handle.
Structure to hold all the information required related to an event notified to the application...
struct M2MB_BLE_CENTRAL_CFG_S M2MB_BLE_CENTRAL_CFG_T
Structure for BLE central configuration parameters.
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.
M2MB_BLE_ADDRESS_TYPE_T remote_bd_address_type
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.
M2MB_BLE_RESPONSE_T
Enumeration of BLE response status types.
M2MB_BLE_GENERAL_PARAM_T ble_gen_param
M2M base types (ver. )
Structure to hold notification and indication data from remote GATT server.
M2MB_BLE_ADDRESS_TYPE_T remote_bd_addr_type
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.
M2MB_BLE_BD_ADDR_T remote_address
Structure for BLE generic configuration parameters.
M2MB_BLE_PHYS_INFO_T tx_phy
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.
M2MB_BLE_GATT_ELEMENT_T * gatt_elements
M2MB_BLE_UUID_32_T uuid_32
INT8 ble_device_name[M2MB_BLE_MAX_DEVICE_NAME_LENGTH+1]
Structure which holds 16 bit / 32 bit / 128 bit UUID value.
struct M2MB_BLE_GENERAL_PARAM_S M2MB_BLE_GENERAL_PARAM_T
Structure for BLE generic configuration parameters.
struct M2MB_BLE_UUID_128_S M2MB_BLE_UUID_128_T
Structure for 128 bit UUID.
Structure to hold connected peer BLE device information.
Structure for 16 bit UUID.
M2MB_BLE_CONN_PARAM_T conn_params
struct M2MB_BLE_GATT_SRVD_S M2MB_BLE_GATT_SRVD_T
Structure which contains GATT element information.
M2MB_BLE_SSP_REQUEST_CTX_T ssp_conf
Structure for Rx and Tx octet length.
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.