How does it work?
Wireless SUN Click, as its foundation, uses the BP35C5, an ultra-compact Wi-SUN FAN compatible wireless communication module from Rohm Semiconductor. The BP35C5 has been certified by the Radio Law of ARIB and FCC, so it can be used in Japan and the United States operating at the frequency of 920MHz with a binary GFSK modulation method. It also includes a Wi-SUN software stack that enables operation at different transmission modes (20, 10, or 1mW) for high efficiency. In addition, since it has a built-in security function and supports communication encryption and security key update on the module side, it can perform secure communication efficiently without complicated control.
As mentioned before, this module uses the Wi-SUN FAN (Field Area Network) mesh networking protocol, consisting of a parent repeater called Border Router, a repeater called Router, and a terminal called Leaf. It can cover a wide range because of its relay function (hopping function). That’s why it is possible to build a mesh network of up to 1000 units – multi-hop mesh networks supporting channel hopping with the ability to avoid radio interference by automatic routing (ability to switch routes automatically). This feature makes it suitable for social infrastructure applications such as traffic lights and street lights, building a remote management system that covers the entire city.
This Click board™ communicates with MCU using the UART interface with commonly used UART RX, TX, and hardware flow control pins UART CTS and RTS (Clear to Send and Ready to Send). It operates at 115200 bps by default configuration to transmit and exchange data with the host MCU. Besides, additional onboard test points TP1 and TP2 offer users full support of debugging and programming capabilities through a Serial Wire Debug interface for programming and debugging, available through the SWD interface pins (SWCK and SWD).
In addition to the appropriate interfaces, this Click board™ also has some additional features. A Reset button routed to the RST pin on the mikroBUS™ socket puts the module into a Reset state, while a blue LED indicator labeled STATUS represents a broadcast transmitting status LED indicator.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Sub-1 GHz Transceievers
Applications
Can be used for social infrastructures such as traffic lights and street lights, smart buildings, and logistics
On-board modules
BP35C5 – ultra-compact Wi-SUN FAN compatible wireless communication module from Rohm Semiconductor
Key Features
Wi-SUN FAN certified, supports multi-hop mesh network and channel hopping, high data rates, adjustable transmission power, built-in Wi-SUN FAN software stack, and more
Interface
UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Wireless SUN Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2 | STATUS | – | Broadcast Status LED Indicator |
T1 | RESET | – | Reset Button |
TP1-TP2 | TP1-TP2 | – | SWD Interface Testpoints for Debugging |
Wireless SUN Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Frequency Range | 902.2 | 920 | 928 | MHz |
RX Sensitivity | – | -105 | – | dBm |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the Wireless SUN 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 Wireless SUN Click driver.
Key functions
-
wirelesssun_send_cmd
This function sends a specified command to the click module. -
wirelesssun_send_cmd_with_parameter
This function sends a specified command to the click module with desired parameters appended to. -
wirelesssun_generic_read
This function reads a desired number of data bytes by using UART serial interface.
Example Description
This example demonstrates the use of Wireless SUN click board by showing the communication between the two click boards configured as BORDER and ROUTER.
void application_task ( void )
{
#ifdef DEMO_APP_BORDER
wirelesssun_process( );
if ( strstr( app_buf, WIRELESSSUN_CMD_PROMPT_SIGN ) )
{
uint8_t demo_hex_msg[ 100 ] = { 0 };
uint8_t demo_text_msg[ 50 ] = { 0 };
char * __generic_ptr start_msg_ptr = NULL;
char * __generic_ptr end_msg_ptr = NULL;
uint8_t msg_len = 0;
uint8_t msg_cnt = 0;
if ( ( strstr( app_buf, WIRELESSSUN_RSP_TCPR ) ) || ( strstr( app_buf, WIRELESSSUN_RSP_UDPR ) ) )
{
if ( strstr( app_buf, WIRELESSSUN_RSP_TCPR ) )
{
start_msg_ptr = strstr( app_buf, WIRELESSSUN_RSP_TCPR );
}
else
{
start_msg_ptr = strstr( app_buf, WIRELESSSUN_RSP_UDPR );
}
start_msg_ptr = strstr ( start_msg_ptr, ">" ) + 2;
end_msg_ptr = strstr( start_msg_ptr, WIRELESSSUN_CMD_PROMPT_SIGN );
msg_len = ( end_msg_ptr - start_msg_ptr );
memcpy ( demo_hex_msg, start_msg_ptr, msg_len );
for ( msg_cnt = 0; msg_cnt < msg_len; msg_cnt += 2 )
{
demo_text_msg[ msg_cnt / 2 ] = hex_to_uint8 ( &demo_hex_msg [ msg_cnt ] );
}
if ( strstr( app_buf, WIRELESSSUN_RSP_TCPR ) )
{
log_printf( &logger, "rn - Received TCP message: "%s" -rn", demo_text_msg );
}
else
{
log_printf( &logger, "rn - Received UDP message: "%s" -rn", demo_text_msg );
}
}
wirelesssun_clear_app_buf( );
}
#else
wirelesssun_wait_for_connection ( );
uint8_t gbl_address[ 20 ] = { 0 };
wirelesssun_get_parent_gbl_address ( gbl_address );
for ( ; ; )
{
uint8_t tcp_udp_params[ 120 ] = { 0 };
uint8_t demo_hex_msg[ 100 ] = { 0 };
uint8_t demo_text_msg[ 50 ] = { 0 };
uint8_t msg_cnt = 0;
strcpy ( demo_text_msg, DEMO_TEXT_MESSAGE );
strcpy ( tcp_udp_params, gbl_address );
strcat ( tcp_udp_params, WIRELESSSUN_CMD_DELIMITER );
strcat ( tcp_udp_params, WIRELESSSUN_DEFAULT_PORT );
strcat ( tcp_udp_params, WIRELESSSUN_CMD_DELIMITER );
for ( msg_cnt = 0; msg_cnt < strlen ( demo_text_msg ); msg_cnt++ )
{
uint8_to_hex ( demo_text_msg[ msg_cnt ], &demo_hex_msg[ msg_cnt * 2 ] );
}
strcat ( tcp_udp_params, demo_hex_msg );
log_printf( &logger, "rn - Sending "%s" message via TCP -rn", demo_text_msg );
wirelesssun_send_cmd_with_parameter ( &wirelesssun, WIRELESSSUN_CMD_TCPS, tcp_udp_params );
wirelesssun_rsp_check ( );
Delay_ms ( 3000 );
log_printf( &logger, "rn - Sending "%s" message via UDP -rn", demo_text_msg );
wirelesssun_send_cmd_with_parameter ( &wirelesssun, WIRELESSSUN_CMD_UDPS, tcp_udp_params );
wirelesssun_rsp_check ( );
Delay_ms ( 3000 );
}
#endif
}
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.WirelessSUN
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.
mikroSDK
This 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.
For more information about mikroSDK, visit the official page.