LR 5 Click Board
LR 5 Click Board
The LR 5 Click Board™ is a compact add-on board that contains a long-range transceiver. This board features the 32001409, RF technology-based SRD transceiver, which operates at a frequency of 915MHz from Mipot. Thanks to the spread spectrum modulation feature, as well as the low power consumption, it is capable of achieving long-range communication, immune to interferences. It features a complete long-range stack onboard; it implements physical, network, and MAC layers, allowing for easy operation via the UART interface. This Click Board™ offers an easy and reliable solution for developing highly integrated long-range IoT networks, security systems, alarm networks, and similar applications that require simple and reliable networking solutions.
The LR 5 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Note: This Click Board is certified for use in the North American Region.
Software Support
We provide a library for the LR 5 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE Github account.
Library Description
This library contains API for the LR 5 Click Board™ driver.
Key Functions
void lr5_cfg_setup ( lr5_cfg_t *cfg );
- Config Object Initialization function.LR5_RETVAL lr5_init ( lr5_t *ctx, lr5_cfg_t *cfg );
- Initialization function.
Example Description
This example reads and processes data from the LR 5 Click Board™.
The application is composed of three sections :
void application_task ( void ) { lr5_process( ); log_printf( &logger, "** FW version reading...rn" ); lr5_get_fw_version_cmd( &lr5 ); wait_response( ); log_printf( &logger, "** Serial number reading...rn" ); lr5_get_serial_no_cmd( &lr5 ); wait_response( ); log_printf( &logger, "** DevEUI reading...rn" ); lr5_get_dev_eui_cmd( &lr5 ); wait_response( ); log_printf( &logger, "** Session status reading...rn" ); lr5_get_session_status_cmd( &lr5 ); wait_response( ); switch ( response.cmd_data[ 0 ] ) { case 0x00 : { log_printf( &logger, "Idle.rn" ); break; } case 0x01 : { log_printf( &logger, "Busy (LR session running).rn" ); break; } case 0x02 : { log_printf( &logger, "Device not activated.rn" ); break; } case 0x03 : { log_printf( &logger, "Delayed.rn" ); break; } default : { break; } } log_printf( &logger, "***********************************************rn" ); Delay_ms( 1000 ); log_printf( &logger, "** Activation status reading...rn" ); lr5_get_activation_status_cmd( &lr5 ); wait_response( ); switch ( response.cmd_data[ 0 ] ) { case 0x00 : { log_printf( &logger, "Not activated.rn" ); break; } case 0x01 : { log_printf( &logger, "Joining...rn" ); break; } case 0x02 : { log_printf( &logger, "Joined.rn" ); break; } case 0x03 : { log_printf( &logger, "MAC ERROR.rn" ); break; } default : { break; } } log_printf( &logger, "***********************************************rn" ); Delay_ms( 1000 ); log_printf( &logger, "** Next TX Data Rate setting...rn" ); lr5_set_next_dr_cmd( &lr5, LR5_SF10_125KHZ ); wait_response( ); if ( response.cmd_data[ 0 ] == 0x00 ) { log_printf( &logger, "Success!rn" ); } else { log_printf( &logger, "Error!rn" ); } log_printf( &logger, "***********************************************rn" ); Delay_ms( 1000 ); log_printf( &logger, "** Channel parameters reading...rn" ); lr5_get_ch_param_cmd( &lr5, LR5_CH_IDX_15 ); wait_response( ); Delay_ms( 10000 ); }
The full application code, and ready to use projects can be installed directly form compilers IDE(recommended) or found on LibStock page or mikroE GitHub account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LR5
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 LR 5 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.
LR 5 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.