anynet3gea  2.0.0.0
Main Page

AnyNet 3G-EA click

AnyNet 3G-EA Click is a cellular to AWS gateway device, which provides developers with the complete solution for various IoT applications, by using the AWS IoT and Cloud Storage services for the data storage, analyzing and processing. AnyNet click boardâ„¢ provides a secure connection with the AWS over the air (OTA), by utilizing the Quectel UG95-EA 3G module, offering worldwide UMTS/HSPA and GSM/GPRS/EDGE coverage Eseye ES4623 embedded SIM card, that can work with more than 235 cellular operators from all over the world. An Eseye embedded sim card can work with more than 235 cellular operators from all over the world. The AnyNet 3G click can be used as an AWS IoT button with almost no configuration.

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : May 2023.
  • Type : UART type

Software Support

We provide a library for the ANYNET3GEA 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 ANYNET3GEA Click driver.

Standard key functions :

Example key functions :

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.

void application_init ( void )
{
log_cfg_t log_cfg;
anynet3gea_cfg_t anynet3gea_cfg;
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
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query VERSION info for the AnyNet AWS IoT code
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query IMEI of the modem on the board
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Query ICCID of the SIM
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Check AWS State
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
// Open AWS topic
#define AWS_TOPIC_OPEN "0,\"MY_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\""
error_flag = anynet3gea_rsp_check( ANYNET3GEA_RSP_OK );
anynet3gea_error_check( error_flag );
anynet3gea_clear_app_buf( );
log_info( &logger, " Application Task " );
}

Application Task

Reads all the received data and logs them to the USB UART.

void application_task ( void )
{
anynet3gea_process( );
anynet3gea_log_app_buf( );
anynet3gea_clear_app_buf( );
}

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.AnyNet3GEA

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.


anynet3gea_init
err_t anynet3gea_init(anynet3gea_t *ctx, anynet3gea_cfg_t *cfg)
AnyNet 3G-EA initialization function.
anynet3gea_send_cmd
void anynet3gea_send_cmd(anynet3gea_t *ctx, uint8_t *cmd)
Send command function.
ANYNET3GEA_CMD_AWSSTATE
#define ANYNET3GEA_CMD_AWSSTATE
Definition: anynet3gea.h:78
ANYNET3GEA_MAP_MIKROBUS
#define ANYNET3GEA_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: anynet3gea.h:119
anynet3gea_cfg_setup
void anynet3gea_cfg_setup(anynet3gea_cfg_t *cfg)
AnyNet 3G-EA configuration object setup function.
ANYNET3GEA_CMD_GSN
#define ANYNET3GEA_CMD_GSN
Definition: anynet3gea.h:75
application_task
void application_task(void)
Definition: main.c:163
anynet3gea_send_cmd_check
void anynet3gea_send_cmd_check(anynet3gea_t *ctx, uint8_t *at_cmd_buf)
Check the sent command.
AWS_TOPIC_SUBSCRIBE
#define AWS_TOPIC_SUBSCRIBE
AWS_TOPIC_OPEN
#define AWS_TOPIC_OPEN
ANYNET3GEA_CMD_AT
#define ANYNET3GEA_CMD_AT
AnyNet 3G-EA control commands.
Definition: anynet3gea.h:73
ANYNET3GEA_RSP_OK
#define ANYNET3GEA_RSP_OK
AnyNet 3G-EA device response for AT commands.
Definition: anynet3gea.h:89
ANYNET3GEA_CMD_AWSSUBOPEN
#define ANYNET3GEA_CMD_AWSSUBOPEN
Definition: anynet3gea.h:82
anynet3gea_send_cmd_with_par
void anynet3gea_send_cmd_with_par(anynet3gea_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
Send command function with parameter.
application_init
void application_init(void)
Definition: main.c:91
ANYNET3GEA_CMD_QCCID
#define ANYNET3GEA_CMD_QCCID
Definition: anynet3gea.h:74
ANYNET3GEA_CMD_AWSVER
#define ANYNET3GEA_CMD_AWSVER
Definition: anynet3gea.h:76
anynet3gea_cfg_t
AnyNet 3G-EA Click configuration object.
Definition: anynet3gea.h:158
ANYNET3GEA_CMD_AWSPUBOPEN
#define ANYNET3GEA_CMD_AWSPUBOPEN
Definition: anynet3gea.h:80
anynet3gea_t
AnyNet 3G-EA Click context object.
Definition: anynet3gea.h:135