ltecat12 2.1.0.0
|
LTE Cat.1 2 Click Example. More...
#include "board.h"
#include "log.h"
#include "ltecat12.h"
#include "generic_pointer.h"
#include "conversions.h"
Macros | |
#define | EXAMPLE_TCP_UDP 0 |
#define | EXAMPLE_SMS 1 |
#define | EXAMPLE_CALL 2 |
#define | DEMO_EXAMPLE EXAMPLE_TCP_UDP |
#define | SIM_APN "internet" |
#define | SIM_SMSC "" |
#define | PHONE_NUMBER "" |
#define | SMS_MODE "1" |
#define | REMOTE_IP "77.46.162.162" |
#define | REMOTE_PORT "51111" |
#define | MESSAGE_CONTENT "LTE Cat.1 2 click board - demo example." |
#define | APP_BUFFER_SIZE 256 |
#define | PROCESS_BUFFER_SIZE 256 |
#define | RESTART_DEVICE "1,1" |
#define | DEREGISTER_FROM_NETWORK "2" |
#define | FULL_FUNCTIONALITY "1" |
#define | ENABLE_REG "2" |
#define | AUTOMATIC_REGISTRATION "0" |
#define | CONNECTED "+CREG: 1" |
#define | ACTIVATE_PDP_CONTEXT "1,1" |
#define | REQ_DYNAMIC_IP "1" |
#define | SRVTYPE_SOCKET ",srvtype,\"socket\"" |
#define | CONN_PROFILE ",conid,\"1\"" |
#define | ASCII_ALPHABET ",alphabet,1" |
#define | ADDRESS_TCP ",address,\"socktcp://" |
#define | ADDRESS_UDP ",address,\"sockudp://" |
Enumerations | |
enum | ltecat12_example_state_t { LTECAT12_CONFIGURE_FOR_NETWORK = 1 , LTECAT12_WAIT_FOR_CONNECTION , LTECAT12_CONFIGURE_FOR_EXAMPLE , LTECAT12_EXAMPLE } |
Example states. More... | |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
LTE Cat.1 2 Click Example.
Application example shows device capability of connecting to the network and sending SMS, TCP/UDP messages or calling the selected number using standard "AT" commands.
The demo application is composed of two sections :
Sets the device configuration for sending SMS, TCP/UDP messages or calling the selected number.
Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or a TCP/UDP message or calls the selected number.
#define ACTIVATE_PDP_CONTEXT "1,1" |
#define ADDRESS_TCP ",address,\"socktcp://" |
#define ADDRESS_UDP ",address,\"sockudp://" |
#define APP_BUFFER_SIZE 256 |
#define ASCII_ALPHABET ",alphabet,1" |
#define AUTOMATIC_REGISTRATION "0" |
#define CONN_PROFILE ",conid,\"1\"" |
#define CONNECTED "+CREG: 1" |
#define DEMO_EXAMPLE EXAMPLE_TCP_UDP |
#define DEREGISTER_FROM_NETWORK "2" |
#define ENABLE_REG "2" |
#define EXAMPLE_CALL 2 |
#define EXAMPLE_SMS 1 |
#define EXAMPLE_TCP_UDP 0 |
#define FULL_FUNCTIONALITY "1" |
#define MESSAGE_CONTENT "LTE Cat.1 2 click board - demo example." |
#define PHONE_NUMBER "" |
#define PROCESS_BUFFER_SIZE 256 |
#define REMOTE_IP "77.46.162.162" |
#define REMOTE_PORT "51111" |
#define REQ_DYNAMIC_IP "1" |
#define RESTART_DEVICE "1,1" |
#define SIM_APN "internet" |
#define SIM_SMSC "" |
#define SMS_MODE "1" |
#define SRVTYPE_SOCKET ",srvtype,\"socket\"" |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |