proteuse 2.1.0.0
Loading...
Searching...
No Matches
Main Page

Proteus-e Click

‍Proteus-e Click is a compact add-on board designed for reliable wireless communication between devices using Bluetooth® LE 5.1 technology. This board features the Proteus-e (2612011024000) radio module from Würth Elektronik, based on a high-performance nRF52 series Bluetooth® LE chip. The module combines a 64MHz ARM Cortex-M4 CPU, 192kB flash memory, and 24kB RAM, delivering up to 4dBm output power with ultra-low power consumption. Communication is established through a UART interface with hardware flow control and includes a reset button, status LED, dedicated GPIO pins, and an external antenna connector for extended range.

Click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Sep 2024.
  • Type : UART type

Software Support

We provide a library for the Proteus-e 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 Proteus-e Click driver.

Standard key functions :

Example key functions :

  • proteuse_send_cmd This function sends a desired command packet from the Click context object.
    void proteuse_send_cmd(proteuse_t *ctx)
    Proteus-e send command function.
  • proteuse_read_event This function reads an event packet from the ring buffer and stores it in the Click context object.
    err_t proteuse_read_event(proteuse_t *ctx)
    Proteus-e read event function.
  • proteuse_get_user_setting This function reads data from the desired user settings index and stores it in the Click context event packet object.
    err_t proteuse_get_user_setting ( proteuse_t *ctx, uint8_t set_idx );
    err_t proteuse_get_user_setting(proteuse_t *ctx, uint8_t set_idx)
    Proteus-e get user settings function.

Example Description

‍This example demonstrates the use of Proteus-e Click board by processing data from a connected BT device.

The demo application is composed of two sections :

Application Init

‍Initializes the driver, resets and configures the Click board, and reads the device info.

void application_init ( void )
{
log_cfg_t log_cfg;
proteuse_cfg_t proteuse_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
proteuse_cfg_setup( &proteuse_cfg );
PROTEUSE_MAP_MIKROBUS( proteuse_cfg, MIKROBUS_1 );
if ( UART_ERROR == proteuse_init( &proteuse, &proteuse_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( PROTEUSE_ERROR == proteuse_default_cfg ( &proteuse ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_printf( &logger, ">> Get device info.\r\n" );
{
log_printf( &logger, " < OS version: 0x%.2X%.2X\r\n",
( uint16_t ) proteuse.evt_pkt.payload[ 2 ],
( uint16_t ) proteuse.evt_pkt.payload[ 1 ] );
log_printf( &logger, " Build code: 0x%.2X%.2X%.2X%.2X\r\n",
( uint16_t ) proteuse.evt_pkt.payload[ 6 ],
( uint16_t ) proteuse.evt_pkt.payload[ 5 ],
( uint16_t ) proteuse.evt_pkt.payload[ 4 ],
( uint16_t ) proteuse.evt_pkt.payload[ 3 ] );
log_printf( &logger, " Package variant: 0x%.2X%.2X\r\n",
( uint16_t ) proteuse.evt_pkt.payload[ 8 ],
( uint16_t ) proteuse.evt_pkt.payload[ 7 ] );
log_printf( &logger, " Chip ID: 0x%.2X%.2X%.2X%.2X\r\n\n",
( uint16_t ) proteuse.evt_pkt.payload[ 12 ],
( uint16_t ) proteuse.evt_pkt.payload[ 11 ],
( uint16_t ) proteuse.evt_pkt.payload[ 10 ],
( uint16_t ) proteuse.evt_pkt.payload[ 9 ] );
}
log_printf( &logger, ">> Get FW version.\r\n" );
{
log_printf( &logger, " < FW version: %u.%u.%u\r\n\n",
( uint16_t ) proteuse.evt_pkt.payload[ 3 ],
( uint16_t ) proteuse.evt_pkt.payload[ 2 ],
( uint16_t ) proteuse.evt_pkt.payload[ 1 ] );
}
log_printf( &logger, ">> Get BT MAC.\r\n" );
{
log_printf( &logger, " < BT MAC: %.2X:%.2X:%.2X:%.2X:%.2X:%.2X\r\n\n",
( uint16_t ) proteuse.evt_pkt.payload[ 6 ],
( uint16_t ) proteuse.evt_pkt.payload[ 5 ],
( uint16_t ) proteuse.evt_pkt.payload[ 4 ],
( uint16_t ) proteuse.evt_pkt.payload[ 3 ],
( uint16_t ) proteuse.evt_pkt.payload[ 2 ],
( uint16_t ) proteuse.evt_pkt.payload[ 1 ] );
}
log_printf( &logger, ">> Set device name to \"%s\".\r\n", ( char * ) DEVICE_NAME );
DEVICE_NAME, strlen ( DEVICE_NAME ) ) )
{
log_printf( &logger, " < Request received, settings set successfully\r\n\n" );
}
log_printf( &logger, ">> Get device name.\r\n" );
{
log_printf( &logger, " < Device name: \"%s\"\r\n\n", &proteuse.evt_pkt.payload[ 1 ] );
}
log_info( &logger, " Application Task " );
}
#define PROTEUSE_SET_IDX_FS_DEVICE_INFO
Definition proteuse.h:185
#define PROTEUSE_SET_IDX_FS_BTMAC
Definition proteuse.h:175
#define PROTEUSE_SET_IDX_RF_DEVICE_NAME
Definition proteuse.h:173
#define PROTEUSE_SET_IDX_FS_FW_VERSION
Proteus-e user settings index list.
Definition proteuse.h:172
#define PROTEUSE_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition proteuse.h:265
err_t proteuse_set_user_setting(proteuse_t *ctx, uint8_t set_idx, uint8_t *data_in, uint8_t len)
Proteus-e set user settings function.
void application_init(void)
Definition main.c:89
#define DEVICE_NAME
Definition main.c:36
@ PROTEUSE_ERROR
Definition proteuse.h:338
@ PROTEUSE_OK
Definition proteuse.h:337

Application Task

‍Reads and parses all the received event packets and displays them the USB UART. All incoming data messages received from the connected device will be echoed back.

void application_task ( void )
{
if ( PROTEUSE_OK == proteuse_read_event ( &proteuse ) )
{
proteuse_parse_event ( &proteuse );
}
}
void application_task(void)
Definition main.c:180

Note

‍We recommend using the WE Bluetooth LE Terminal smartphone application for the test.

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

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.