lteiot8  2.0.0.0
Macros | Enumerations | Functions
main.c File Reference

LTE IoT 8 Click Example. More...

#include "board.h"
#include "log.h"
#include "lteiot8.h"

Macros

#define SIM_APN   ""
 
#define PHONE_NUMBER_TO_MESSAGE   "+381659999999"
 
#define MESSAGE_CONTENT   "LTE IoT 8 Click"
 
#define SMSC_ADDRESS_CSCA   "\"+381999999\",145"
 
#define SMSC_ADDRESS_PDU   "+381999999"
 
#define PROCESS_BUFFER_SIZE   300
 
#define FULL_FUNCTIONALITY   "1"
 
#define GNSS_LEN   "1"
 
#define AUTOMATIC   "0"
 
#define ENABLE_REG   "2"
 
#define CONNECTED   "+CEREG: 1"
 
#define PDU_MESSAGE_MODE   "0"
 
#define TXT_MESSAGE_MODE   "1"
 
#define CMGF_PDU   "+CMGF: 0"
 
#define CMGF_TXT   "+CMGF: 1"
 

Enumerations

enum  lteiot8_example_state_t {
  LTEIOT8_CONFIGURE_FOR_CONNECTION = 1, LTEIOT8_WAIT_FOR_CONNECTION, LTEIOT8_CHECK_CONNECTION, LTEIOT8_CONFIGURE_FOR_MESSAGES,
  LTEIOT8_MESSAGES
}
 Example states. More...
 

Functions

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

Detailed Description

LTE IoT 8 Click Example.

Description

Application example shows device capability to connect network and send SMS messages using standard "AT" commands.

The demo application is composed of two sections :

Application Init

Initializes driver and wake-up module and test communication.

Application Task

Application taks is split in few stages:

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 of entered SIM card. Enter valid data for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE. E.g. SIM_APN "vip.iot" SMSC_ADDRESS_CSCA "\"+381999999",145" SMSC_ADDRESS_PDU "+381999999" PHONE_NUMBER_TO_MESSAGE "+381659999999"
Author
Luka Filipovic

Macro Definition Documentation

◆ AUTOMATIC

#define AUTOMATIC   "0"

◆ CMGF_PDU

#define CMGF_PDU   "+CMGF: 0"

◆ CMGF_TXT

#define CMGF_TXT   "+CMGF: 1"

◆ CONNECTED

#define CONNECTED   "+CEREG: 1"

◆ ENABLE_REG

#define ENABLE_REG   "2"

◆ FULL_FUNCTIONALITY

#define FULL_FUNCTIONALITY   "1"

◆ GNSS_LEN

#define GNSS_LEN   "1"

◆ MESSAGE_CONTENT

#define MESSAGE_CONTENT   "LTE IoT 8 Click"

◆ PDU_MESSAGE_MODE

#define PDU_MESSAGE_MODE   "0"

◆ PHONE_NUMBER_TO_MESSAGE

#define PHONE_NUMBER_TO_MESSAGE   "+381659999999"

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   300

◆ SIM_APN

#define SIM_APN   ""

◆ SMSC_ADDRESS_CSCA

#define SMSC_ADDRESS_CSCA   "\"+381999999\",145"

◆ SMSC_ADDRESS_PDU

#define SMSC_ADDRESS_PDU   "+381999999"

◆ TXT_MESSAGE_MODE

#define TXT_MESSAGE_MODE   "1"

Enumeration Type Documentation

◆ lteiot8_example_state_t

Example states.

Predefined enum values for application example state.

Enumerator
LTEIOT8_CONFIGURE_FOR_CONNECTION 
LTEIOT8_WAIT_FOR_CONNECTION 
LTEIOT8_CHECK_CONNECTION 
LTEIOT8_CONFIGURE_FOR_MESSAGES 
LTEIOT8_MESSAGES 

Function Documentation

◆ application_init()

void application_init ( void  )

< Logger config object.

< Click config object.

◆ application_task()

void application_task ( void  )

◆ main()

void main ( void  )