BLE 6 Click Board
BLE 6 Click Board
The BLE 6 Click Board™ is a Bluetooth low energy system-on-chip application processor certified module, compliant with BT specifications v5.0 and BQE qualified. The featured BlueNRG-M2 module developed by STMicroelectronics supports multiple roles simultaneously and can act at the same time as Bluetooth master and slave devices. The BlueNRG-M2 is based on the BlueNRG-2 system-on-chip and the entire Bluetooth low energy stack and protocols are embedded into the module.
The BlueNRG-M2 module provides a complete RF platform in a tiny form factor. Radio, embedded antenna and high-frequency oscillators are integrated to offer a certified solution to optimize the time-to-market of the final applications.
The BLE 6 Click Board™ is a perfect solution for various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications
Software Support
We provide a library for the BLE 6 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the BLE 6 Click Board™. Library performs a standard UART interface communication.
Key Functions
uint8_t ble6_read_byte( void )
- Read Single Byte.void ble6_write_byte ( uint8_t input )
- Write Single Byte.void ble6_send_command ( uint8_t *tx_data, uint8_t n_bytes )
- Send command function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes UART, sets RST, CS and PWM pin as outputs and begins to write a log.
- Application Initialization - Initialization driver enables - UART, sets handlers initialize and enable UART interrupt, reset and configures BLE module, initialize BLE Server Profile ( Services and Characteristics ).
- Application Task - (code snippet) This example demonstrates the use of the BLE 6 Click Board™. 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.
void application_task ( ) { ble6_event_handler( ); while ( device_connected_flag ) { if ( ble6_strncmp( &rx_response[ 0 ],&hci_le_serverwrite_event[ 0 ], 1 ) == 0 ) { ble6_response_handler( ); } } }
Additional Functions :
void ble6_handler ( )
- Default handler.void ble6_connect_handler ( )
- Connect handler.void ble6_response_handler ( )
- Response handler.void ble6_event_handler ( )
- Event handler.void ble6_local_version_info ( )
- Display local version information.void ble6_fw_details ( )
- Display FW details.void ble6_le_meta_event ( )
- Meta event.void ble6_aci_gap_init ( )
- Display ACI GAP init. information.void ble6_display_log ( )
- Display log.ble6_module_init ( )
- Module initialization.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The BLE 6 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
BLE 6 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.