mbusrf4 2.0.0.0
|
M-BUS RF 4 Click is a mikroBUS™ add-on board with a MIPOT 32001324 RF wireless transceiver. This module operates in the 868 MHz SRD Band. Thanks to its small LCC form factor (15 x 25 mm only) and its low power consumption this module allows the implementation of highly integrated low power (battery operated) solutions for water, gas, heat or electricity metering applications, both on meter or concentrator devices.
We provide a library for the MBusRf4 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for MBusRf4 Click driver.
- Initialization function.void mbusrf4_cfg_setup ( mbusrf4_cfg_t *cfg );
MBUSRF4_RETVAL mbusrf4_init ( mbusrf4_t *ctx, mbusrf4_cfg_t *cfg );
- This function write specific number of data.void mbusrf4_send_command ( mbusrf4_t *ctx, uint8_t command, uint8_t length, uint8_t *payload_buff );
void mbusrf4_generic_write ( mbusrf4_t *ctx, char *data_buf, uint16_t len )
uint16_t mbusrf4_generic_read ( mbusrf4_t *ctx, char *data_buf, uint16_t max_len );
This example reads and processes data from M-BUS RF 4 clicks.
The demo application is composed of two sections :
Initializes driver init, reads basic information and checks communication
In the RX mode it is waiting to receive data from another module... In the TX mode sends the data packet....
## Additional Function mbusrf4_process ( ) - The general process of collecting data and adding it to application buffer;
mbrusrf4_clear_buff ( void ) - Clear application buffer data;
mbusrf4_parser_tx ( void ) - Transmit data status parser;
mbusrf4_parser_rx ( uint8_t logg_type ) - Receiver data parser;
mbusrf4_log_data ( uint8_t log_type, uint8_t *log_buf, int32_t log_len ) - Log application buffer;
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.