| Electronic Components Datasheet Search |
|
UM1770 Datasheet(PDF) 14 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1770 Datasheet(HTML) 14 Page - STMicroelectronics |
|
14 / 56 page ![]() Application – profile interface UM1770 14/56 DocID026385 Rev 2 5 Application – profile interface Function calls handle the communication between the application and profiles. Any application using the profiles should first initialize the base profile by calling the BLE_Profile_Init function, followed by a call to the profile specific initialization function. For example, HRProfile_Init() function is called for the heart rate profile. To enable execution, the application requires a loop that calls the HCI_Process() and Profile_Process() continuously. The BLE_Profile_Init function takes two parameters: • A pointer to the securityParameters; the security parameters should specify the io capabilities, mitm mode, bonding mode and encryption key size. • A callback function; the callback registered should be of the form: typedef void (* BLE_CALLBACK_FUNCTION_TYPE)(tNotificationEvent event,uint8 evtLen,uint8* evtData). This function is used by the profile to notify the application of events. When the application is notified of an event, it only reads the number of parameters specified in the evtLen parameter. Below is the list of events sent by the various profiles to the application. 5.1 Generic events The events in this category are not specific to any profile. 1. EVT_MP_BLUE_INITIALIZED: this event is sent to the application by the main profile when the controller has been initialized. 2. EVT_MP_CONNECTION_COMPLETE: this event is sent to the application by the main profile when a connection has been successfully established with the peer. 3. EVT_MP_PASSKEY_REQUEST: this event is sent to the application by the main profile when there is a request for passkey during the pairing process from the controller. This event has no parameters. The application must call the function BLE_Profile_Send_Pass_Key and send the passkey to the controller. 4. EVT_MP_PAIRING_COMPLETE: this event is sent to the application by the main profile when the device is successfully paired with the peer. 5. EVT_MP_DISCONNECTION_COMPLETE: this event is sent to the application by the main profile to notify the result of a disconnection procedure initiated by master/slave. 6. EVT_MP_ADVERTIZE_ERROR: this event is sent by any of the child profiles when enabling of advertising fails. It is the application's responsibility to restart advertising. 7. EVT_MP_ADVERTISING_TIMEOUT: this event is sent by the child profiles when the limited discoverable mode times out or the profile-specific advertising timeout occurs. It is the application's responsibility to restart advertising. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |