TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (355 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 (136920 times)
  2. FAT32 Library (70043 times)
  3. Network Ethernet Library (56011 times)
  4. USB Device Library (46310 times)
  5. Network WiFi Library (41935 times)
  6. FT800 Library (41241 times)
  7. GSM click (29026 times)
  8. PID Library (26435 times)
  9. mikroSDK (26411 times)
  10. microSD click (25390 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: 1757 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

NO2 2 click

0

NO2 2 Click is a gas sensor Click board™, equipped with the MiCS-2714, a compact metal oxide (MOS) sensor. This sensor reacts to the presence of nitrogen dioxide (NO2) and hydrogen (H2).

[Learn More]

XBEE click

0

XBee Click is a compact add-on board providing wireless connectivity to end-point devices in ZigBee mesh networks. This board features the XB24CZ7PIS-004, a low-power Digi XBee® RF module delivering superior performance and interference immunity from Digi International. With its ultra-sensitive receiver, the XB24CZ7PIS-004 operates in the 2.4GHz ISM band (indoor/urban range of 60m and outdoor of 1200m), allowing the formation of robust mesh network optimized for use in the US, Canada, Europe, Australia, and Japan (worldwide acceptance). Alongside firmware updates, it supports commissioning and LED behaviors to aid device deployment and commissioning.

[Learn More]

Clock Gen 3 click

5

Clock Gen 3 Click features a low power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz, set through a serial port.

[Learn More]