TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139263 times)
  2. FAT32 Library (71752 times)
  3. Network Ethernet Library (57127 times)
  4. USB Device Library (47431 times)
  5. Network WiFi Library (43092 times)
  6. FT800 Library (42407 times)
  7. GSM click (29835 times)
  8. mikroSDK (28080 times)
  9. PID Library (26886 times)
  10. microSD click (26198 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

B102C Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: BT/BLE

Downloaded: 22 times

Not followed.

License: MIT license  

B102C Click is a compact add-on board designed for Bluetooth 5.0 (BLE) communication in various wireless applications. This board features the B102C, a Bluetooth module from Amphenol based on the Realtek RTL8762CMF chip. The board offers BLE v5.0 support, a 20MHz Arm® Cortex® M4F processor, and an integrated antenna for 2.4GHz communication, with low-power modes for optimal energy efficiency. It includes UART and USB Type-C connectivity, a PROG header for debugging, and fully programmable GPIOs.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "B102C Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "B102C Click" changes.

Do you want to report abuse regarding "B102C Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


B102C Click

B102C Click is a compact add-on board designed for Bluetooth 5.0 (BLE) communication in various wireless applications. This board features the B102C, a Bluetooth module from Amphenol based on the Realtek RTL8762CMF chip. The board offers BLE v5.0 support, a 20MHz Arm® Cortex® M4F processor, and an integrated antenna for 2.4GHz communication, with low-power modes for optimal energy efficiency. It includes UART and USB Type-C connectivity, a PROG header for debugging, and fully programmable GPIOs.

b102c_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Feb 2024.
  • Type : UART type

Software Support

We provide a library for the B102C Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for B102C Click driver.

Standard key functions :

  • b102c_cfg_setup Config Object Initialization function.

    void b102c_cfg_setup ( b102c_cfg_t *cfg );
  • b102c_init Initialization function.

    err_t b102c_init ( b102c_t *ctx, b102c_cfg_t *cfg );
  • b102c_default_cfg Click Default Configuration function.

    err_t b102c_default_cfg ( b102c_t *ctx );

Example key functions :

  • b102c_send_cmd This function sends a specified command to the B102C Click module.

    void b102c_send_cmd ( b102c_t *ctx, uint8_t *cmd );
  • b102c_send_cmd_with_params This function sends a command with specified parameter to the Click module.

    void b102c_send_cmd_with_params ( b102c_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
  • b102c_send_cmd_params_check This function checks the command that is sent.

    void b102c_send_cmd_params_check ( b102c_t *ctx, uint8_t *at_cmd_buf );

Example Description

This example demonstrates the use of B102C Click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, then performs a factory reset and sets the local device name.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    b102c_cfg_t b102c_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    b102c_cfg_setup( &b102c_cfg );
    B102C_MAP_MIKROBUS( b102c_cfg, MIKROBUS_1 );
    if ( UART_ERROR == b102c_init( &b102c, &b102c_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    Delay_ms ( 100 );

    log_printf( &logger, " Software reset. \r\n" );
    b102c_send_cmd( &b102c, B102C_CMD_RESET );
    app_error_flag = b102c_rsp_check( &b102c, B102C_RSP_READY );

    log_printf( &logger, " Factory reset. \r\n" );
    b102c_send_cmd( &b102c, B102C_CMD_DEFAULT );
    app_error_flag = b102c_rsp_check( &b102c, B102C_RSP_READY );

    log_printf( &logger, " Set device name. \r\n" );
    #define DEVICE_NAME             "B102C Click"
    b102c_send_cmd_with_params( &b102c, B102C_CMD_NAME, DEVICE_NAME );
    app_error_flag = b102c_rsp_check( &b102c, B102C_RSP_OK );

    log_printf( &logger, " Set Auto broadcast mode. \r\n" );
    #define AUTO_BROADCAST          "1"
    b102c_send_cmd_with_params( &b102c, B102C_CMD_ADVMOD, AUTO_BROADCAST );
    app_error_flag = b102c_rsp_check( &b102c, B102C_RSP_OK );

    log_info( &logger, " Application Task " );
    log_printf( &logger, " Connect to device. " );
}

Application Task

Reads and processes all incoming data and displays them on the USB UART.

void application_task ( void ) 
{
    if ( B102C_OK == b102c_process( &b102c ) ) 
    {
        b102c_log_app_buf( );
        b102c_clear_app_buf( );
    }
}

Note

For communication with B102C Click use the android application on the link: https://play.google.com/store/apps/details?id=com.macdom.ble.blescanner

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.B102C

Additional notes and informations

Depending on the development board you are using, you may need 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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

LED Driver 4 Click

0

LED Driver 4 Click is a form of a high-efficiency boost converter that is ideally suited for driving an array of white LEDs. The driver has the ability to dim the connected LED array, without producing any noise on the output. The Click board is capable of driving a LED array with up to 26V, providing a constant current to the LED segments.

[Learn More]

GNSS 7 Click

0

Determine your current position with GNSS 7 Click. It carries the NEO-M9N GNSS receiver module from u-blox.

[Learn More]

Color 9 Click

0

Color 9 Click is a very accurate color sensing Click board which features the APDS-9250, IR and ambient light sensor, from Broadcom. It contains a specially designed matrix of photosensitive elements, which can sense red, green, blue and IR component.

[Learn More]