ble6 2.0.0.0
|
BLE 6 Click Example. More...
Macros | |
#define | PROCESS_BUFFER_SIZE 256 |
Functions | |
void | ble6_module_init (void) |
BLE 6 module initialisation. | |
void | ble6_event_handler (void) |
BLE 6 event handler. | |
void | ble6_display_log (void) |
BLE 6 display log. | |
void | ble6_aci_gap_init (void) |
BLE 6 aci gap initialisation. | |
void | ble6_le_meta_event (void) |
BLE 6 le meta event. | |
void | ble6_handler (void) |
BLE 6 handler. | |
void | ble6_response_handler (void) |
BLE 6 response handler. | |
void | ble6_local_version_info (void) |
BLE 6 local version info. | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
void | ble6_connect_handler (void) |
Variables | |
uint8_t | app_buf [PROCESS_BUFFER_SIZE] |
uint8_t | rx_response [PROCESS_BUFFER_SIZE] |
uint8_t | device_connected_flag = 0 |
uint8_t | hci_le_meta_event_connect [5] = { 0x04, 0x3E, 0x13, 0x01, 0x00 } |
uint8_t | hci_le_serverwrite_event [1] = { 0x04 } |
uint8_t | hci_read_local_version_information [4] = { 0x01, 0x01, 0x10, 0x00 } |
uint8_t | hci_info_confirm [4] = { 0xFF, 0x01, 0x00, 0x00 } |
uint8_t | aci_hal_get_fw_version [4] = { 0x01, 0x01, 0xFC, 0x00 } |
uint8_t | hci_reset [4] = { 0x01, 0x03, 0x0C, 0x00 } |
uint8_t | aci_hal_write_config_data [12] |
uint8_t | aci_hal_set_tx_power_level [6] = { 0x01, 0x0F, 0xFC, 0x02, 0x01, 0x04 } |
uint8_t | aci_gatt_init [4] = { 0x01, 0x01, 0xFD, 0x00 } |
uint8_t | aci_gap_init [7] = { 0x01, 0x8A, 0xFC, 0x03, 0x0F, 0x00, 0x0B } |
uint8_t | aci_gatt_update_value [21] |
uint8_t | hci_le_set_scan_response_data [36] |
uint8_t | aci_gap_set_discoverable [30] |
BLE 6 Click Example.
This example reads and processes data from BLE 6 clicks.
The demo application is composed of two sections :
Initialization driver enables - UART, sets handlers initialize and enable UART interrupt, reset and configures BLE module, initialize BLE Server Profile ( Services and Characteristics ).
The app starts by checking the system ready flag and returns the Bluetooth device address. After that, the chain of commands creates Primary Server Profiles: Device Information, Generic Access and Custom Service to Start Advertising. For transmit messages, we use Generic Access Primary Service with Write permissions of the characteristic Element. In this example, transmitting message is limited to a maximum of 11 characters. Results are being sent to the Usart Terminal where you can track their changes.
#define PROCESS_BUFFER_SIZE 256 |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
void ble6_aci_gap_init | ( | void | ) |
BLE 6 aci gap initialisation.
This function is used for aci gap initialisation of BLE 6 Click.
void ble6_connect_handler | ( | void | ) |
void ble6_display_log | ( | void | ) |
BLE 6 display log.
This function is used for displaying log of BLE 6 Click.
void ble6_event_handler | ( | void | ) |
BLE 6 event handler.
This function is used for checking conncection of BLE 6 Click.
void ble6_handler | ( | void | ) |
BLE 6 handler.
This function is used for getting data of BLE 6 Click.
void ble6_le_meta_event | ( | void | ) |
BLE 6 le meta event.
This function is used for low energy events of BLE 6 Click.
void ble6_local_version_info | ( | void | ) |
BLE 6 local version info.
This function is used for displaying local version info of BLE 6 Click.
void ble6_module_init | ( | void | ) |
BLE 6 module initialisation.
This function is used for initialisation of BLE 6 Click.
void ble6_response_handler | ( | void | ) |
BLE 6 response handler.
This function is used for displaying data response of BLE 6 Click.
int main | ( | void | ) |
uint8_t aci_gap_init[7] = { 0x01, 0x8A, 0xFC, 0x03, 0x0F, 0x00, 0x0B } |
uint8_t aci_gap_set_discoverable[30] |
uint8_t aci_gatt_init[4] = { 0x01, 0x01, 0xFD, 0x00 } |
uint8_t aci_gatt_update_value[21] |
uint8_t aci_hal_get_fw_version[4] = { 0x01, 0x01, 0xFC, 0x00 } |
uint8_t aci_hal_set_tx_power_level[6] = { 0x01, 0x0F, 0xFC, 0x02, 0x01, 0x04 } |
uint8_t aci_hal_write_config_data[12] |
uint8_t app_buf[PROCESS_BUFFER_SIZE] |
uint8_t device_connected_flag = 0 |
uint8_t hci_info_confirm[4] = { 0xFF, 0x01, 0x00, 0x00 } |
uint8_t hci_le_meta_event_connect[5] = { 0x04, 0x3E, 0x13, 0x01, 0x00 } |
uint8_t hci_le_serverwrite_event[1] = { 0x04 } |
uint8_t hci_le_set_scan_response_data[36] |
uint8_t hci_read_local_version_information[4] = { 0x01, 0x01, 0x10, 0x00 } |
uint8_t hci_reset[4] = { 0x01, 0x03, 0x0C, 0x00 } |
uint8_t rx_response[PROCESS_BUFFER_SIZE] |