XDK API  3.6.0
Documentation
Data Structures | Macros | Typedefs | Functions
BleEngine.h File Reference
#include "BleTypes.h"
+ Include dependency graph for BleEngine.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  BleHandler
 
struct  BleHardwareInformation
 
struct  BleUserTimer
 

Macros

#define BLEEVENT_GENERATE_RANDOM_ADDRESS_RSP   0x24
 
#define BLEEVENT_HARDWARE_ERROR   0x02
 
#define BLEEVENT_INITIALIZATION_RSP   0x01
 
#define BLEEVENT_PAIRING_COMPLETE   0x23
 
#define BLEEVENT_PAIRING_REQUEST   0x20
 
#define BLEEVENT_PASSKEY_DISPLAY   0x22
 
#define BLEEVENT_PASSKEY_REQUEST   0x21
 
#define BLEEVENT_VENDOR_COMMAND_COMPLETE   0x25
 
#define BLEEVENT_VENDOR_COMMAND_STATUS   0x26
 
#define BLEEVENT_VENDOR_EVENT   0x27
 

Typedefs

typedef void(* BleCallback )(BleEvent event, BleStatus status, void *param)
 
typedef U8 BleEvent
 
typedef void(* BleUserTimerFunc )(void *param)
 

Functions

void BLEMGMT_AddUserTimerEvent (BleUserTimer *userTimer)
 
BleStatus BLEMGMT_Deinit (void)
 
BleStatus BLEMGMT_DeRegisterHandler (BleHandler *handler)
 
BleStatus BLEMGMT_GetControllerVersion (BleHardwareInformation **information)
 
U32 BLEMGMT_GetCoreStackVersion (void)
 
BleStatus BLEMGMT_Init (void)
 
void BLEMGMT_NotifyToRun (void)
 
BleStatus BLEMGMT_RegisterHandler (BleHandler *handler)
 
void BLEMGMT_RemoveUserTimerEvent (BleUserTimer *userTimer)
 
BleStatus BLEMGMT_Run (void)
 

Macro Definition Documentation

#define BLEEVENT_GENERATE_RANDOM_ADDRESS_RSP   0x24

Event followed the call of BLESMP_GenerateRandomAddress().

The status field indicates status of the operation

  • BLESTATUS_SUCCESS indicates that the operation has succeed, the param field containing a pointer to an BD_ADDR indicating the new random address. BD_ADDR *addr = (BD_ADDR *) param; Note that the pointer is valid until the next BLESMP_GenerateRandomAddress() call. In other cases this parameter is zero.
  • BLESTATUS_FAILED indicates that the operation has failed.
#define BLEEVENT_HARDWARE_ERROR   0x02

Event followed the reception of a HARDWARE error event by the controller. Upon reception of This event the stack will automatically De-init, It is Up to the application to re-init the stack. The status field is always BLESTATUS_FAILED The parms field indicates the Hardware Error event error code as U8 *.

#define BLEEVENT_INITIALIZATION_RSP   0x01

Event followed the call of BLEMGMT_Init(). The status field will indicates completion of the initialisation process

  • BLESTATUS_SUCCESS indicates that the BLE stack has been successfully initialized.
  • BLESTATUS_FAILED indicates that the BLE stack could not be initialized. if BLE_PARMS_CHECK is enabled
  • BLESTATUS_INVALID_PARMS indicates that the BLE stack has not be initialized cause an invalid configuration: The Controller does not support SCANNER or ADVERTISER role: reconsider BLE_ROLE_ADVERTISER or BLE_ROLE_SCANNER to optimize.
#define BLEEVENT_PAIRING_COMPLETE   0x23

Event followed the call of BLESMP_InitiatePairing() or a BLEEVENT_PAIRING_REQUEST event, it indicates the completion of the pairing operation.

The status field indicates status of the operation

  • BLESTATUS_SUCCESS indicates that the operation has succeeded.
  • BLESTATUS_FAILED indicates that the operation has failed.

The param field containing a pointer to a BlePairingInfo structure indicating the connection handle on which the Pairing procedure has completed. In case of failure, the reason field is valid and contains a SmErrorCode describing the reason of the paring failure. BlePairingInfo *info = (BlePairingInfo *) param; Note that the pointer is valid only during the callback

#define BLEEVENT_PAIRING_REQUEST   0x20

Event reported when a remote device ( MASTER on the connection ) has started a pairing procedure. Depending of the SM_IO_CAPABILITIES a passkey may be requested after upon the BLEEVENT_PASSKEY_REQUEST event.

The status field is always BLESTATUS_SUCCESS. The param field containing a pointer to a BlePairingInfo structure indicating the connection handle on which the Pairing procedure has started. BlePairingInfo *info = (BlePairingInfo *) param; Note that the pointer is valid only during the callback. During this event, BLESMP_ConfirmPairing may be called to accept the pairing request; otherwise, the pairing request is automatically rejected.

#define BLEEVENT_PASSKEY_DISPLAY   0x22

Event reported when a Passkey need to be displayed in order to continue the pairing procedure.

The status field is always BLESTATUS_SUCCESS. The param field containing a pointer to a BlePairingInfo structure indicating the connection handle on which the Pairing procedure has started as well that the passkey to be displayed.. BlePairingInfo *info = (BlePairingInfo *) param; Note that the pointer is valid only during the callback A passkey to display is 6 characters in length, with each character value in the range 0x30-0x39 ['0'..'9'].

#define BLEEVENT_PASSKEY_REQUEST   0x21

Event reported when a Passkey need to be provided in order to continue the pairing procedure.

The status field is always BLESTATUS_SUCCESS. The param field containing a pointer to a BlePairingInfo structure indicating the connection handle on which the Pairing procedure has started. BlePairingInfo *info = (BlePairingInfo *) param; Note that the pointer is valid only during the callback A passkey shall be 6 characters in length, with each character value in the range 0x30-0x39 ['0'..'9'].

#define BLEEVENT_VENDOR_COMMAND_COMPLETE   0x25

Event that may follow the sent of a vendor specific command.

The param field containing a pointer to a BleHciVendorCommandComplete structure indicating the opcode of the command which is complete and the return parameters. All the BleHciVendorCommandComplete values are only valid during the callback. The status field is always BLESTATUS_SUCCESS

#define BLEEVENT_VENDOR_COMMAND_STATUS   0x26

Event that may follow the sent of a vendor specific command.

The param field containing a pointer to a BleHciVendorCommandStatus structure indicating the opcode of the command which is complete. All the BleHciVendorCommandStatus values are only valid during the callback. The status field is always BLESTATUS_SUCCESS

#define BLEEVENT_VENDOR_EVENT   0x27

Event indicating that a vendor specific event have been received by the stack (event code 0xFF).

The param field containing a pointer to a BleHciVendorEvent structure indicating the parameter length and the parameters of the event. All the BleHciVendorEvent values are only valid during the callback. The status field is always BLESTATUS_SUCCESS

Typedef Documentation

typedef void(* BleCallback)(BleEvent event, BleStatus status, void *param)

BleCallback This callback receives the BLE stack events. Each of these events can be associated with a defined status and parameter. The callback is executed during the stack context, please be careful to not doing heavy process in this function.

typedef U8 BleEvent

BleEvent Event received in the BleCallback callbacks registered during the call of BLEMGMT_RegisterHandler() function.

typedef void(* BleUserTimerFunc)(void *param)

Definition for the BleUserTimerFunc type. It defines the prototype of the user timer callback function.

Function Documentation

void BLEMGMT_AddUserTimerEvent ( BleUserTimer userTimer)
BleStatus BLEMGMT_Deinit ( void  )
BleStatus BLEMGMT_DeRegisterHandler ( BleHandler handler)
BleStatus BLEMGMT_GetControllerVersion ( BleHardwareInformation **  information)
U32 BLEMGMT_GetCoreStackVersion ( void  )
BleStatus BLEMGMT_Init ( void  )
void BLEMGMT_NotifyToRun ( void  )
BleStatus BLEMGMT_RegisterHandler ( BleHandler handler)
void BLEMGMT_RemoveUserTimerEvent ( BleUserTimer userTimer)
BleStatus BLEMGMT_Run ( void  )

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:41 by doxygen 1.8.8