Experience efficient data processing with the highest level of security and privacy compliance for your European IoT ventures.
A
A
Hardware Overview
How does it work?
AnyNet 3G-EA Click is based on the UG95-EA, a 3G module from Quectel, qualified to work at European and Australian UTMS frequency bands, as well as with the GSM (2G) frequency bands available worldwide, and the embedded sim card by Eseye company used to communicate with the AWS. The additional onboard Microchip MCU contains the firmware used to interface the GSM/GPRS module to UART, providing users with easy to use end-point AT commands. UART communication speed is set to 9600 bps. To initiate the communication, several simple AT command strings should be transmitted to the UART pins of the click board. All the information about how to use AT commands can be found in the AT commands reference. AnyNet 3G-EA Click is based on the UG95-EA, a 3G
module from Quectel, qualified to work at European and Australian UTMS frequency bands, as well as with the GSM (2G) frequency bands available worldwide, and the embedded sim card by Eseye company used to communicate with the AWS. The additional onboard Microchip MCU contains the firmware used to interface the GSM/GPRS module to UART, providing users with easy to use end-point AT commands. UART communication speed is set to 9600 bps. To initiate the communication, several simple AT command strings should be transmitted to the UART pins of the click board. All the information about how to use AT commands can be found in the AT commands reference. The click board™ has the IoT Button feature - a pin routed to the INT pin of the mikroBUS™ Setting this pin
to a HIGH logic level is considered as IoT Button press. AWS IoT gateway recognizes three types of messages: short press, long press anddouble click. The AWS IoT Button pin is based on the Amazon Dash Button hardware. The functionality of this pin is designed for developers to get started with AWS IoT, AWS Lambda, Amazon DynamoDB, Amazon SNS, and many other Amazon Web Services. IoT Button pin can be coded in cloud service to perform various tasks, such as remote control for Netflix, a switch for Philips Hue light bulb, a check-in/check-out device for Airbnb guests and so on. It can also be integrated with the third-party APIs like Twitter, Facebook, Twilio, Slack or even custom applications.
Features overview
Development board
Fusion for TIVA v8 is a development board specially designed for the needs of rapid development of embedded applications. It supports a wide range of microcontrollers, such as different 32-bit ARM® Cortex®-M based MCUs from Texas Instruments, regardless of their number of pins, and a broad set of unique functions, such as the first-ever embedded debugger/programmer over a WiFi network. The development board is well organized and designed so that the end-user has all the necessary elements, such as switches, buttons, indicators, connectors, and others, in one place. Thanks to innovative manufacturing technology, Fusion for TIVA v8 provides a fluid and immersive working experience, allowing access
anywhere and under any circumstances at any time. Each part of the Fusion for TIVA v8 development board contains the components necessary for the most efficient operation of the same board. An advanced integrated CODEGRIP programmer/debugger module offers many valuable programming/debugging options, including support for JTAG, SWD, and SWO Trace (Single Wire Output)), and seamless integration with the Mikroe software environment. Besides, it also includes a clean and regulated power supply module for the development board. It can use a wide range of external power sources, including a battery, an external 12V power supply, and a power source via the USB Type-C (USB-C) connector.
Communication options such as USB-UART, USB HOST/DEVICE, CAN (on the MCU card, if supported), and Ethernet is also included. In addition, it also has the well-established mikroBUS™ standard, a standardized socket for the MCU card (SiBRAIN standard), and two display options for the TFT board line of products and character-based LCD. Fusion for TIVA v8 is an integral part of the Mikroe ecosystem for rapid development. Natively supported by Mikroe software tools, it covers many aspects of prototyping and development thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.
Microcontroller Overview
MCU Card / MCU

Type
8th Generation
Architecture
ARM Cortex-M4
MCU Memory (KB)
1024
Silicon Vendor
Texas Instruments
Pin count
128
RAM (Bytes)
262144
You complete me!
Accessories
GPS/3G External Antenna is an ideal choice for our GPS/GSM/3G Click boards™. It excels in providing strong GSM and 3G signal reception alongside impressive GPS positioning capabilities. Its robust design features a screw mount and adhesive base, ensuring secure attachment and optimal performance. This antenna boasts separate lines for GPS, GSM, and 3G, making it a versatile choice for applications that demand reliable communication and precise positioning. With a broad frequency range covering 850/900/1800/1900/2100MHz and 50Ω impedance, this antenna guarantees connectivity across various network bands. Its VSW Ratio of 2:1 and peak gain ranging from 1 to 1.5dBic (dependent on frequency) further enhance signal strength. The antenna offers a bandwidth exceeding 10MHz, ensuring consistent reception, while its linear polarization and omnidirectional azimuth coverage provide comprehensive signal accessibility.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Software Support
Library Description
This library contains API for AnyNet 3G-EA Click driver.
Key functions:
anynet3gea_send_cmd- This function sends a specified command to the click module.anynet3gea_send_cmd_with_par- This function sends a command with specified parameter to the click module.anynet3gea_send_cmd_check- This function checks the command status.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief AnyNet 3G-EA Click Example.
*
* # Description
* This example demonstrates the use of AnyNet 3G-EA Click board.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and sends a few AT commands to test the communication
* and configure the Click board.
*
* ## Application Task
* Reads all the received data and logs them to the USB UART.
*
* ## Additional Function
* - static void anynet3gea_clear_app_buf ( void )
* - static err_t anynet3gea_process ( void )
* - static void anynet3gea_error_check( err_t error_flag )
* - static void anynet3gea_log_app_buf ( void )
* - static err_t anynet3gea_rsp_check ( uint8_t *rsp )
*
* @author Stefan Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "anynet3gea.h"
// Application buffer size
#define APP_BUFFER_SIZE 256
#define PROCESS_BUFFER_SIZE 256
static anynet3gea_t anynet3gea;
static log_t logger;
/**
* @brief Application example variables.
* @details Variables used in application example.
*/
static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
static int32_t app_buf_len = 0;
static err_t error_flag = ANYNET3GEA_OK;
/**
* @brief Clearing application buffer.
* @details This function clears memory of application
* buffer and reset its length.
*/
static void anynet3gea_clear_app_buf ( void );
/**
* @brief Data reading function.
* @details This function reads data from device and
* appends it to the application buffer.
* @return @li @c 0 - Some data is read.
* @li @c -1 - Nothing is read.
* See #err_t definition for detailed explanation.
*/
static err_t anynet3gea_process ( void );
/**
* @brief Check for errors.
* @details This function checks for different types of
* errors and logs them on UART or logs the response if no errors occured.
* @param[in] error_flag Error flag to check.
*/
static void anynet3gea_error_check ( err_t error_flag );
/**
* @brief Logs application buffer.
* @details This function logs data from application buffer.
*/
static void anynet3gea_log_app_buf ( void );
/**
* @brief Response check.
* @details This function checks for response and
* returns the status of response.
* @param[in] rsp Expected response.
* @return @li @c 0 - OK response.
* @li @c -2 - Timeout error.
* @li @c -3 - Command error.
* @li @c -4 - Unknown error.
* See #err_t definition for detailed explanation.
*/
static err_t anynet3gea_rsp_check ( uint8_t *rsp );
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
anynet3gea_cfg_t anynet3gea_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
anynet3gea_cfg_setup( &anynet3gea_cfg );
ANYNET3GEA_MAP_MIKROBUS( anynet3gea_cfg, MIKROBUS_1 );
if ( UART_ERROR == anynet3gea_init( &anynet3gea, &anynet3gea_cfg ) )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
anynet3gea_process( );
anynet3gea_clear_app_buf( );
// Check communication
anynet3gea_send_cmd( &anynet3gea, ANYNET3GEA_CMD_AT );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query VERSION info for the AnyNet AWS IoT code
anynet3gea_send_cmd( &anynet3gea, ANYNET3GEA_CMD_AWSVER );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query IMEI of the modem on the board
anynet3gea_send_cmd( &anynet3gea, ANYNET3GEA_CMD_GSN );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query ICCID of the SIM
anynet3gea_send_cmd( &anynet3gea, ANYNET3GEA_CMD_QCCID );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Check AWS State
anynet3gea_send_cmd_check( &anynet3gea, ANYNET3GEA_CMD_AWSSTATE );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Open AWS topic
#define AWS_TOPIC_OPEN "0,\"MY_TOPIC_OPEN\""
anynet3gea_send_cmd_with_par( &anynet3gea, ANYNET3GEA_CMD_AWSPUBOPEN, AWS_TOPIC_OPEN );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Subscribe to AWS topic
#define AWS_TOPIC_SUBSCRIBE "0,\"MY_TOPIC_SUBSCRIBE\""
anynet3gea_send_cmd_with_par( &anynet3gea, ANYNET3GEA_CMD_AWSSUBOPEN, AWS_TOPIC_SUBSCRIBE );
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
anynet3gea_clear_app_buf( );
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
anynet3gea_process( );
anynet3gea_log_app_buf( );
anynet3gea_clear_app_buf( );
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
static void anynet3gea_clear_app_buf ( void )
{
memset( app_buf, 0, app_buf_len );
app_buf_len = 0;
}
static err_t anynet3gea_process ( void )
{
uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
int32_t rx_size = 0;
rx_size = anynet3gea_generic_read( &anynet3gea, rx_buf, PROCESS_BUFFER_SIZE );
if ( rx_size > 0 )
{
int32_t buf_cnt = app_buf_len;
if ( ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
{
buf_cnt = APP_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - APP_BUFFER_SIZE );
memmove ( app_buf, &app_buf[ APP_BUFFER_SIZE - buf_cnt ], buf_cnt );
}
for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
{
if ( rx_buf[ rx_cnt ] )
{
app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
if ( app_buf_len < APP_BUFFER_SIZE )
{
app_buf_len++;
}
}
}
return ANYNET3GEA_OK;
}
return ANYNET3GEA_ERROR;
}
static err_t anynet3gea_rsp_check ( uint8_t *rsp )
{
uint32_t timeout_cnt = 0;
uint32_t timeout = 120000;
anynet3gea_clear_app_buf( );
anynet3gea_process( );
while ( ( 0 == strstr( app_buf, rsp ) ) &&
( 0 == strstr( app_buf, ANYNET3GEA_RSP_ERROR ) ) &&
( 0 == strstr( app_buf, ANYNET3GEA_RSP_SEND_FAIL ) ) )
{
anynet3gea_process( );
if ( timeout_cnt++ > timeout )
{
anynet3gea_clear_app_buf( );
return ANYNET3GEA_ERROR_TIMEOUT;
}
Delay_ms ( 1 );
}
Delay_ms ( 100 );
anynet3gea_process( );
if ( strstr( app_buf, rsp ) )
{
return ANYNET3GEA_OK;
}
else if ( strstr( app_buf, ANYNET3GEA_RSP_ERROR ) )
{
return ANYNET3GEA_ERROR_CMD;
}
else if ( strstr( app_buf, ANYNET3GEA_RSP_SEND_FAIL ) )
{
return ANYNET3GEA_ERROR_SEND;
}
else
{
return ANYNET3GEA_ERROR_UNKNOWN;
}
}
static void anynet3gea_error_check ( err_t error_flag )
{
switch ( error_flag )
{
case ANYNET3GEA_OK:
{
anynet3gea_log_app_buf( );
break;
}
case ANYNET3GEA_ERROR_TIMEOUT:
{
log_error( &logger, " Timeout!" );
break;
}
case ANYNET3GEA_ERROR_CMD:
{
log_error( &logger, " CMD!" );
break;
}
case ANYNET3GEA_ERROR_SEND:
{
log_error( &logger, " SEND FAIL!" );
break;
}
case ANYNET3GEA_ERROR_UNKNOWN:
default:
{
log_error( &logger, " Unknown!" );
break;
}
}
Delay_ms ( 500 );
}
static void anynet3gea_log_app_buf ( void )
{
for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
{
log_printf( &logger, "%c", app_buf[ buf_cnt ] );
}
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:GSM/LTE


































