c3gaa  2.0.0.0
Macros | Functions
main.c File Reference

3G-AA Click Example. More...

#include "board.h"
#include "log.h"
#include "c3gaa.h"
#include "string.h"

Macros

#define APP_OK   0
 
#define APP_ERROR_DRIVER   -1
 
#define APP_ERROR_OVERFLOW   -2
 
#define APP_ERROR_TIMEOUT   -3
 
#define RSP_OK   "OK"
 
#define RSP_ERROR   "ERROR"
 
#define SIM_APN   ""
 
#define SIM_SMSC   ""
 
#define PHONE_NUMBER_TO_MESSAGE   ""
 
#define MESSAGE_CONTENT   "3G-AA click board - demo example."
 
#define PROCESS_BUFFER_SIZE   256
 
#define WAIT_FOR_CONNECTION   0
 
#define CONNECTED_TO_NETWORK   1
 
#define CONNECTED   "+CREG: 1,1"
 

Functions

void application_init (void)
 
void application_task (void)
 
void main (void)
 

Detailed Description

3G-AA Click Example.

Description

This example reads and processes data from 3G-AA click.

The demo application is composed of two sections :

Application Init

Initializes the driver and powers up the module, then sets default configuration for connecting the device to network.

Application Task

Waits for device to connect to network and then sends a desired SMS to the selected phone number approximately every 30 seconds.

Additional Function

Note
In order for the example to work, user needs to set the phone number to which he wants to send an SMS, and also will need to set an APN and SMSC (required for PDU mode only) of entered SIM card. Enter valid data for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE. E.g. SIM_APN "vipmobile" SIM_SMSC "+381610401" PHONE_NUMBER_TO_MESSAGE "+38169999999"
Author
Stefan Ilic

Macro Definition Documentation

◆ APP_ERROR_DRIVER

#define APP_ERROR_DRIVER   -1

◆ APP_ERROR_OVERFLOW

#define APP_ERROR_OVERFLOW   -2

◆ APP_ERROR_TIMEOUT

#define APP_ERROR_TIMEOUT   -3

◆ APP_OK

#define APP_OK   0

◆ CONNECTED

#define CONNECTED   "+CREG: 1,1"

◆ CONNECTED_TO_NETWORK

#define CONNECTED_TO_NETWORK   1

◆ MESSAGE_CONTENT

#define MESSAGE_CONTENT   "3G-AA click board - demo example."

◆ PHONE_NUMBER_TO_MESSAGE

#define PHONE_NUMBER_TO_MESSAGE   ""

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   256

◆ RSP_ERROR

#define RSP_ERROR   "ERROR"

◆ RSP_OK

#define RSP_OK   "OK"

◆ SIM_APN

#define SIM_APN   ""

◆ SIM_SMSC

#define SIM_SMSC   ""

◆ WAIT_FOR_CONNECTION

#define WAIT_FOR_CONNECTION   0

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )