Remote monitoring automation, asset tracking, surveillance and security, home automation systems, point of sales terminals etc.
u-blox SARA-G3 series 2.5G GSM/GPRS cellular quad-band modul
GSM Quad-band 850/1900, 900/1800 MHz, Maximum output power -8dBm, IPv4/IPv6 dual-stack
Click board size
L (57.15 x 25.4 mm)
3.3V or 5V
This table shows how the pinout on GSM 4 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
|JP1||I/O Level||Left||Logic level voltage selection: left position 3V3, right position 5V|
|PWR||PWR||-||PWR indication LED|
|TX||TX||-||TX LED indicator – configurable (GPIO pin 1)|
|STAT||STAT||-||STAT LED indicator – configurable (GPIO pin 2)|
|TX||TX||-||USB to UART transmission (TX) LED indicator|
|RX||RX||-||USB to UART reception (RX) LED indicator|
We provide a library for GSM 4 click on our Libstock page, as well as a demo application (example), developed using MikroElektronika compilers and mikroSDK. The provided click library is mikroSDK standard compliant. The demo application can run on all the main MikroElektronika development boards.
The library carries a generic command parser adopted for AT command based modules. Generic parser.
gsm4_cmdSingle- Sends a provided command to the module.
gsm4_setHandler- Handler assignation to the provided command.
gsm4_modulePower- Turns on the module.
The example demo application waits for the call, and after the call is received the parser will get hang up.
This code snippet shows how a generic parser should be properly initialized. Before the initialization, the module must be turned on, and in addition to this the hardware flow control should also be turner on.
- The first command negotiates the baud rate with the module.
- The second command turns the echo off.
- The third command enables hardware flow control - necessary in case of UART polling.
- The fourth command sets up default message foramt.
// MODULE POWER ON gsm4_hfcEnable( true ); gsm4_modulePower( true ); // MODULE INIT gsm4_cmdSingle( "AT" ); gsm4_cmdSingle( "ATE0" ); gsm4_cmdSingle( "AT+IFC=2,2" ); gsm4_cmdSingle( "AT+CMGF=1" );
Along with the demo application, timer initialization functions are provided. Note that the timer is configured according to the default development system and MCUs, changing the system or MCU may require an update of timer init and timer ISR functions.
The full application code, and ready to use projects can be found on our Libstock page.
Other mikroE Libraries used in the example:
Additional notes and information
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.
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.