TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136552 times)
  2. FAT32 Library (69747 times)
  3. Network Ethernet Library (55849 times)
  4. USB Device Library (46189 times)
  5. Network WiFi Library (41811 times)
  6. FT800 Library (41003 times)
  7. GSM click (28930 times)
  8. PID Library (26386 times)
  9. mikroSDK (26291 times)
  10. microSD click (25303 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

BLE 6 click

Rating:

5

Author: MIKROE

Last Updated: 2021-09-06

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: BT/BLE

Downloaded: 1720 times

Followed by: 1 user

License: MIT license  

BLE 6 Click 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 device.

Abuse Reported

Do you want to subscribe in order to receive notifications regarding "BLE 6 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "BLE 6 click" changes.

Do you want to report abuse regarding "BLE 6 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

BLE 6 Click

BLE 6 Click

Native view of the BLE 6 Click board.

View full image
BLE 6 Click

BLE 6 Click

Front and back view of the BLE 6 Click board.

View full image

Library Description

The library covers all the necessary functions to control 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.

Examples 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.

Other mikroE Libraries used in the example:

  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Barometer 10 click

0

Barometer 10 Click is a compact add-on board that measures air pressure in a specific environment. This board features the LPS28DFW, an ultra-compact piezoresistive absolute pressure sensor that functions as a digital output barometer from STMicroelectronics. The LPS28DFW comprises a sensing element and an IC chip for signal processing in one package, converts pressure into a 24-bit digital value, and sends the information via I2C serial interface. It has a selectable dual full-scale absolute pressure range of up to 1260hPa and 4060hPa, with an absolute pressure accuracy of 0.5hPa over a wide operating temperature range.

[Learn More]

TempHum 23 click

0

Temp&Hum 23 Click is a compact add-on board representing temperature and humidity sensing solution. This board features the SHT45, a 4th generation ultra-low-power relative humidity and temperature sensor from Sensirion. The SHT45 is characterized by its high accuracy (±1% RH and ±0.1°C over a wide operating temperature range) and high resolution providing 16-bit data to the host controller with a configurable I2C interface. Also, it is designed for reliable operation in harsh conditions such as condensing environments. This Click board™ is perfectly suitable for high-volume applications.

[Learn More]

DIGI POT 13 click

0

DIGI POT 13 Click is a compact add-on board that contains a digitally controlled potentiometer. This board features the MAX5419, a 256-tap non-volatile digital potentiometer from Analog Devices. On this Click board™, one digitally I2C-controlled potentiometer is realized with typical end-to-end resistance values of 200kΩ. It can operate from both 3.3V and 5V power supplies and provides a low 35ppm/ºC end-to-end nominal resistance temperature coefficient and only 5ppm/ºC ratiometric.

[Learn More]