TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (387 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (140167 times)
  2. FAT32 Library (72621 times)
  3. Network Ethernet Library (57641 times)
  4. USB Device Library (47954 times)
  5. Network WiFi Library (43553 times)
  6. FT800 Library (42942 times)
  7. GSM click (30140 times)
  8. mikroSDK (28669 times)
  9. PID Library (27055 times)
  10. microSD click (26552 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

G2C 3G click

Rating:

5

Author: MIKROE

Last Updated: 2020-01-08

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: GSM/LTE

Downloaded: 3558 times

Not followed.

License: MIT license  

Go to Cloud (G2C) 3G click is a gateway Click boardâ„¢ which provides a simple and reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment, hosted by Mikroe.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "G2C 3G click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "G2C 3G click" changes.

Do you want to report abuse regarding "G2C 3G click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

G2C 3G click

G2C 3G click

Native view of the G2C 3G click board.

View full image
G2C 3G click

G2C 3G click

Front and back view of the G2C 3G click board.

View full image

SOFTWARE SUPPORT

We provide a library for the Go to Cloud (G2C) 3G click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Library Description

The library carries generic command parser adopted for AT command based modules. The library contains an example for basic initialization of the actuator and sensor demo example.

Key functions:

  • void g2c3g_send_cmd ( char *p_cmd ) - Simple AT Command
  • g2c3g_error_t g2c3g_actuator_sw_parser ( char *rsp, char *act_ref, g2c3g_actuator_sw_t *sw_state ) - Actuator switch parser
  • g2c3g_error_t g2c3g_actuator_cnt_parser ( char *rsp, char *act_ref, g2c3g_actuator_cnt_t *num_data ) - Actuator counter parser
  • g2c3g_error_t g2c3g_actuator_str_parser ( char *rsp, char *act_ref, g2c3g_actuator_str_t *str_data ) - Actuator string parser
  • void g2c3g_send_broker_cfg ( char *brc_key, char *brc_password ) - Parameter broker (device) setting
  • void g2c3g_send_data_ref ( char *reference_buf, char *data_buf ) - Parameter data setting

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes all necessary GPIO pins, UART used for communcation with G2C 3G module and UART used for logging.
  • Application Initialization - Initializes driver and timer at 10ms. Initializes default handler (with 1500ms watchdog) with core init function. Module wake-up procedure is started and then the module is reset. This procedure must be performed at start of the program in order for the module to be ready for operation. Following commands are required in order to connect the module to click cloud.
  • Application Task - Starts the process of reading responses and sending the data to the click cloud.
void application_init ( )
{
    // TIMER INIT
    g2c3g_timer_int_cfg( );

    // DRIVER INIT
    g2c3g_uart_driver_init( ( g2c3g_obj_t )&_MIKROBUS1_GPIO, ( g2c3g_obj_t )&_MIKROBUS1_UART );
    g2c3g_core_init( g2c3g_default_handler, 1500 );
    
    // MODULE POWER ON
    g2c3g_module_power( G2C3G_MODULE_POWER_ON );
    g2c3g_reset_module( );
    Delay_ms( 2000 );

    while( g2c3g_device_status( ) != G2C3G_STATUS_DEVICE_READY );
    Delay_ms( 2000 );
    
    mikrobus_logWrite( "****************************** START ** ", _LOG_LINE );

    g2c3g_send_cmd( &G2C3G_AT[ 0 ] );
    g2c3g_command_delay( );
    
    g2c3g_send_cmd( &G2C3G_AT_GMR[ 0 ] );
    g2c3g_command_delay( );

    g2c3g_send_cmd( &G2C3G_AT_CEN[ 0 ] );
    g2c3g_command_delay( );

    g2c3g_send_operator_cfg( &operator_apn[ 0 ], 
                             &operator_username[ 0 ],
                             &operator_password[ 0 ] );
    g2c3g_command_delay( );

    g2c3g_send_cmd( &G2C3G_AT_NWC[ 0 ] );
    g2c3g_command_delay( );

    while( g2c3g_network_status( ) != 1 );
    Delay_ms( 2000 );

    g2c3g_send_broker_cfg( &device_key[ 0 ], &device_password[ 0 ] );
    g2c3g_command_delay( );

    g2c3g_send_cmd( &G2C3G_AT_BRC[ 0 ] );
    g2c3g_command_delay( );

    while( g2c3g_broker_status( ) != 1 );
    Delay_ms( 2000 );
    
    task_time = 0;
    mikrobus_logWrite( "********* CONNECT TO CLICK CLOUD ** ", _LOG_LINE );
}
void application_task ( )
{
    g2c3g_process( );
    
    if ( task_time > 2000 )
    {
        g2c3g_send_data_ref( &sensor_ref[ 0 ], &data_buf[ 0 ] );
        g2c3g_send_cmd( &G2C3G_AT_PUB[ 0 ] );
        task_time = 0;
    }
}

Additional functions

  • g2c3g_command_delay ( ) - Delay between 2 commands (recomended delay time)
  • actuator_demo( ) - Actuator parser demo example
  • g2c3g_default_handler( ) - Default handler for logging and collecting responses

Note:

Items required before starting the program:

  • Set operator parameters( APN, username and password ) for the SIM card.
  • Create a device on the click cloud and sets the device parameters (device_key and device_password).
  • Enter sensor and / or actuator reference from manifest associated with the created device.

Example contains 2 types of response collection:
In config.h file one of these 2 response collection types can be select.

  • G2C3G_POLL_ENABLE = 1 (UART polling method) or
  • G2C3G_POLL_ENABLE = 0 (UART interrupt method).

Device manifest for test is "G2C 3G click - Test".

Other mikroE Libraries used in the example:

  • UART
  • C_Srting
  • Conversion

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

microSD Click

0

Need more additional memory? We've got just the thing for you - microSD Click. It features a microSD card slot for microSD cards used as a mass storage media for portable devices. microSD Click is designed to run on 3.3V power supply. Industry standard SPI interface ensures simple communication at high data rates. Use it for reading or storing data like music, text files, videos and more.

[Learn More]

RYB080I Click

0

RYB080I Click is a compact add-on board for seamless Bluetooth Low Energy (LE) communication in various wireless applications. This board features the RYB080I, a 2.4GHz Bluetooth 4.2/5.0 LE module with an integrated antenna from REYAX, based on the TI CC2640R2F ARM® Cortex®-M3 MCU. This module supports dual-device connectivity, operates in both Host and Client roles, and includes a metal cover for EMI protection, ensuring stable performance even in noisy environments. With support for the Generic Attribute Profile (GATT) and easy setup via REYAX AT commands, integration into diverse systems is simplified.

[Learn More]

Load Cell 5 Click

0

Load Cell 5 Click is a compact add-on board that represents a weigh scale solution. This board features the AD7780, a pin-programmable, low power, 24-bit sigma-delta ΣΔ ADC from Analog Devices. It interfaces directly to the load cell, where the low-level signal from the load cell is amplified by the AD7780’s internal low noise programmable gain amplifier programmed to operate with a gain of 128 or 1. It also has a power-down mode allowing the user to switch off the power to the bridge sensor and power-down the AD7780 when not converting, increasing the product battery life. This Click board™ has many features that make it a perfect solution for safety-critical and weight measurement applications.

[Learn More]