Structures and enumerations

group LWGSM_TYPES

List of core structures and enumerations.

Typedefs

typedef uint16_t lwgsm_port_t

Port variable.

typedef void (*lwgsm_api_cmd_evt_fn)(lwgsmr_t res, void *arg)

Function declaration for API function command event callback function.

Param res

[in] Operation result, member of lwgsmr_t enumeration

Param arg

[in] Custom user argument

Enums

enum lwgsm_cmd_t

List of possible messages.

Values:

enumerator LWGSM_CMD_IDLE = 0

IDLE mode

enumerator LWGSM_CMD_RESET

Reset device

enumerator LWGSM_CMD_RESET_DEVICE_FIRST_CMD

Reset device first driver specific command

enumerator LWGSM_CMD_ATE0

Disable ECHO mode on AT commands

enumerator LWGSM_CMD_ATE1

Enable ECHO mode on AT commands

enumerator LWGSM_CMD_GSLP

Set GSM to sleep mode

enumerator LWGSM_CMD_RESTORE

Restore GSM internal settings to default values

enumerator LWGSM_CMD_UART
enumerator LWGSM_CMD_CGACT_SET_0
enumerator LWGSM_CMD_CGACT_SET_1
enumerator LWGSM_CMD_CGATT_SET_0
enumerator LWGSM_CMD_CGATT_SET_1
enumerator LWGSM_CMD_NETWORK_ATTACH

Attach to a network

enumerator LWGSM_CMD_NETWORK_DETACH

Detach from network

enumerator LWGSM_CMD_CIPMUX_SET
enumerator LWGSM_CMD_CIPRXGET_SET
enumerator LWGSM_CMD_CSTT_SET
enumerator LWGSM_CMD_CALL_ENABLE
enumerator LWGSM_CMD_A

Re-issues the Last Command Given

enumerator LWGSM_CMD_ATA

Answer an Incoming Call

enumerator LWGSM_CMD_ATD

Mobile Originated Call to Dial A Number

enumerator LWGSM_CMD_ATD_N

Originate Call to Phone Number in Current Memory: ATD<n>

enumerator LWGSM_CMD_ATD_STR

Originate Call to Phone Number in Memory Which Corresponds to Field “str”: ATD>str

enumerator LWGSM_CMD_ATDL

Redial Last Telephone Number Used

enumerator LWGSM_CMD_ATE

Set Command Echo Mode

enumerator LWGSM_CMD_ATH

Disconnect Existing

enumerator LWGSM_CMD_ATI

Display Product Identification Information

enumerator LWGSM_CMD_ATL

Set Monitor speaker

enumerator LWGSM_CMD_ATM

Set Monitor Speaker Mode

enumerator LWGSM_CMD_PPP

Switch from Data Mode or PPP Online Mode to Command Mode, “+++” originally

enumerator LWGSM_CMD_ATO

Switch from Command Mode to Data Mode

enumerator LWGSM_CMD_ATP

Select Pulse Dialing

enumerator LWGSM_CMD_ATQ

Set Result Code Presentation Mode

enumerator LWGSM_CMD_ATS0

Set Number of Rings before Automatically Answering the Call

enumerator LWGSM_CMD_ATS3

Set Command Line Termination Character

enumerator LWGSM_CMD_ATS4

Set Response Formatting Character

enumerator LWGSM_CMD_ATS5

Set Command Line Editing Character

enumerator LWGSM_CMD_ATS6

Pause Before Blind

enumerator LWGSM_CMD_ATS7

Set Number of Seconds to Wait for Connection Completion

enumerator LWGSM_CMD_ATS8

Set Number of Seconds to Wait for Comma Dial Modifier Encountered in Dial String of D Command

enumerator LWGSM_CMD_ATS10

Set Disconnect Delay after Indicating the Absence of Data Carrier

enumerator LWGSM_CMD_ATT

Select Tone Dialing

enumerator LWGSM_CMD_ATV

TA Response Format

enumerator LWGSM_CMD_ATX

Set CONNECT Result Code Format and Monitor Call Progress

enumerator LWGSM_CMD_ATZ

Reset Default Configuration

enumerator LWGSM_CMD_AT_C

Set DCD Function Mode, AT&C

enumerator LWGSM_CMD_AT_D

Set DTR Function, AT&D

enumerator LWGSM_CMD_AT_F

Factory Defined Configuration, AT&F

enumerator LWGSM_CMD_AT_V

Display Current Configuration, AT&V

enumerator LWGSM_CMD_AT_W

Store Active Profile, AT&W

enumerator LWGSM_CMD_GCAP

Request Complete TA Capabilities List

enumerator LWGSM_CMD_GMI

Request Manufacturer Identification

enumerator LWGSM_CMD_GMM

Request TA Model Identification

enumerator LWGSM_CMD_GMR

Request TA Revision Identification of Software Release

enumerator LWGSM_CMD_GOI

Request Global Object Identification

enumerator LWGSM_CMD_GSN

Request TA Serial Number Identification (IMEI)

enumerator LWGSM_CMD_ICF

Set TE-TA Control Character Framing

enumerator LWGSM_CMD_IFC

Set TE-TA Local Data Flow Control

enumerator LWGSM_CMD_IPR

Set TE-TA Fixed Local Rate

enumerator LWGSM_CMD_HVOIC

Disconnect Voice Call Only

enumerator LWGSM_CMD_COPS_SET

Set operator

enumerator LWGSM_CMD_COPS_GET

Get current operator

enumerator LWGSM_CMD_COPS_GET_OPT

Get a list of available operators

enumerator LWGSM_CMD_CPAS

Phone Activity Status

enumerator LWGSM_CMD_CGMI_GET

Request Manufacturer Identification

enumerator LWGSM_CMD_CGMM_GET

Request Model Identification

enumerator LWGSM_CMD_CGMR_GET

Request TA Revision Identification of Software Release

enumerator LWGSM_CMD_CGSN_GET

Request Product Serial Number Identification (Identical with +GSN)

enumerator LWGSM_CMD_CLCC_SET

List Current Calls of ME

enumerator LWGSM_CMD_CLCK

Facility Lock

enumerator LWGSM_CMD_CACM

Accumulated Call Meter (ACM) Reset or Query

enumerator LWGSM_CMD_CAMM

Accumulated Call Meter Maximum (ACM max) Set or Query

enumerator LWGSM_CMD_CAOC

Advice of Charge

enumerator LWGSM_CMD_CBST

Select Bearer Service Type

enumerator LWGSM_CMD_CCFC

Call Forwarding Number and Conditions Control

enumerator LWGSM_CMD_CCWA

Call Waiting Control

enumerator LWGSM_CMD_CEER

Extended Error Report

enumerator LWGSM_CMD_CSCS

Select TE Character Set

enumerator LWGSM_CMD_CSTA

Select Type of Address

enumerator LWGSM_CMD_CHLD

Call Hold and Multiparty

enumerator LWGSM_CMD_CIMI

Request International Mobile Subscriber Identity

enumerator LWGSM_CMD_CLIP

Calling Line Identification Presentation

enumerator LWGSM_CMD_CLIR

Calling Line Identification Restriction

enumerator LWGSM_CMD_CMEE_SET

Report Mobile Equipment Error

enumerator LWGSM_CMD_COLP

Connected Line Identification Presentation

enumerator LWGSM_CMD_PHONEBOOK_ENABLE
enumerator LWGSM_CMD_CPBF

Find Phonebook Entries

enumerator LWGSM_CMD_CPBR

Read Current Phonebook Entries

enumerator LWGSM_CMD_CPBS_SET

Select Phonebook Memory Storage

enumerator LWGSM_CMD_CPBS_GET

Get current Phonebook Memory Storage

enumerator LWGSM_CMD_CPBS_GET_OPT

Get available Phonebook Memory Storages

enumerator LWGSM_CMD_CPBW_SET

Write Phonebook Entry

enumerator LWGSM_CMD_CPBW_GET_OPT

Get options for write Phonebook Entry

enumerator LWGSM_CMD_SIM_PROCESS_BASIC_CMDS

Command setup, executed when SIM is in READY state

enumerator LWGSM_CMD_CPIN_SET

Enter PIN

enumerator LWGSM_CMD_CPIN_GET

Read current SIM status

enumerator LWGSM_CMD_CPIN_ADD

Add new PIN to SIM if pin is not set

enumerator LWGSM_CMD_CPIN_CHANGE

Change already active SIM

enumerator LWGSM_CMD_CPIN_REMOVE

Remove current PIN

enumerator LWGSM_CMD_CPUK_SET

Enter PUK and set new PIN

enumerator LWGSM_CMD_CSQ_GET

Signal Quality Report

enumerator LWGSM_CMD_CFUN_SET

Set Phone Functionality

enumerator LWGSM_CMD_CFUN_GET

Get Phone Functionality

enumerator LWGSM_CMD_CREG_SET

Network Registration set output

enumerator LWGSM_CMD_CREG_GET

Get current network registration status

enumerator LWGSM_CMD_CBC

Battery Charge

enumerator LWGSM_CMD_CNUM

Subscriber Number

enumerator LWGSM_CMD_CPWD

Change Password

enumerator LWGSM_CMD_CR

Service Reporting Control

enumerator LWGSM_CMD_CRC

Set Cellular Result Codes for Incoming Call Indication

enumerator LWGSM_CMD_CRLP

Select Radio Link Protocol Parameters

enumerator LWGSM_CMD_CRSM

Restricted SIM Access

enumerator LWGSM_CMD_VTD

Tone Duration

enumerator LWGSM_CMD_VTS

DTMF and Tone Generation

enumerator LWGSM_CMD_CMUX

Multiplexer Control

enumerator LWGSM_CMD_CPOL

Preferred Operator List

enumerator LWGSM_CMD_COPN

Read Operator Names

enumerator LWGSM_CMD_CCLK

Clock

enumerator LWGSM_CMD_CSIM

Generic SIM Access

enumerator LWGSM_CMD_CALM

Alert Sound Mode

enumerator LWGSM_CMD_CALS

Alert Sound Select

enumerator LWGSM_CMD_CRSL

Ringer Sound Level

enumerator LWGSM_CMD_CLVL

Loud Speaker Volume Level

enumerator LWGSM_CMD_CMUT

Mute Control

enumerator LWGSM_CMD_CPUC

Price Per Unit and Currency Table

enumerator LWGSM_CMD_CCWE

Call Meter Maximum Event

enumerator LWGSM_CMD_CUSD_SET

Unstructured Supplementary Service Data, Set command

enumerator LWGSM_CMD_CUSD_GET

Unstructured Supplementary Service Data, Get command

enumerator LWGSM_CMD_CUSD

Unstructured Supplementary Service Data, Execute command

enumerator LWGSM_CMD_CSSN

Supplementary Services Notification

enumerator LWGSM_CMD_CIPMUX

Start Up Multi-IP Connection

enumerator LWGSM_CMD_CIPSTART

Start Up TCP or UDP Connection

enumerator LWGSM_CMD_CIPSEND

Send Data Through TCP or UDP Connection

enumerator LWGSM_CMD_CIPQSEND

Select Data Transmitting Mode

enumerator LWGSM_CMD_CIPACK

Query Previous Connection Data Transmitting State

enumerator LWGSM_CMD_CIPCLOSE

Close TCP or UDP Connection

enumerator LWGSM_CMD_CIPSHUT

Deactivate GPRS PDP Context

enumerator LWGSM_CMD_CLPORT

Set Local Port

enumerator LWGSM_CMD_CSTT

Start Task and Set APN, username, password

enumerator LWGSM_CMD_CIICR

Bring Up Wireless Connection with GPRS or CSD

enumerator LWGSM_CMD_CIFSR

Get Local IP Address

enumerator LWGSM_CMD_CIPSTATUS

Query Current Connection Status

enumerator LWGSM_CMD_CDNSCFG

Configure Domain Name Server

enumerator LWGSM_CMD_CDNSGIP

Query the IP Address of Given Domain Name

enumerator LWGSM_CMD_CIPHEAD

Add an IP Head at the Beginning of a Package Received

enumerator LWGSM_CMD_CIPATS

Set Auto Sending Timer

enumerator LWGSM_CMD_CIPSPRT

Set Prompt of greater than sign When Module Sends Data

enumerator LWGSM_CMD_CIPSERVER

Configure Module as Server

enumerator LWGSM_CMD_CIPCSGP

Set CSD or GPRS for Connection Mode

enumerator LWGSM_CMD_CIPSRIP

Show Remote IP Address and Port When Received Data

enumerator LWGSM_CMD_CIPDPDP

Set Whether to Check State of GPRS Network Timing

enumerator LWGSM_CMD_CIPMODE

Select TCPIP Application Mode

enumerator LWGSM_CMD_CIPCCFG

Configure Transparent Transfer Mode

enumerator LWGSM_CMD_CIPSHOWTP

Display Transfer Protocol in IP Head When Received Data

enumerator LWGSM_CMD_CIPUDPMODE

UDP Extended Mode

enumerator LWGSM_CMD_CIPRXGET

Get Data from Network Manually

enumerator LWGSM_CMD_CIPSCONT

Save TCPIP Application Context

enumerator LWGSM_CMD_CIPRDTIMER

Set Remote Delay Timer

enumerator LWGSM_CMD_CIPSGTXT

Select GPRS PDP context

enumerator LWGSM_CMD_CIPTKA

Set TCP Keepalive Parameters

enumerator LWGSM_CMD_CIPSSL

Connection SSL function

enumerator LWGSM_CMD_SMS_ENABLE
enumerator LWGSM_CMD_CMGD

Delete SMS Message

enumerator LWGSM_CMD_CMGF

Select SMS Message Format

enumerator LWGSM_CMD_CMGL

List SMS Messages from Preferred Store

enumerator LWGSM_CMD_CMGR

Read SMS Message

enumerator LWGSM_CMD_CMGS

Send SMS Message

enumerator LWGSM_CMD_CMGW

Write SMS Message to Memory

enumerator LWGSM_CMD_CMSS

Send SMS Message from Storage

enumerator LWGSM_CMD_CMGDA

MASS SMS delete

enumerator LWGSM_CMD_CNMI

New SMS Message Indications

enumerator LWGSM_CMD_CPMS_SET

Set preferred SMS Message Storage

enumerator LWGSM_CMD_CPMS_GET

Get preferred SMS Message Storage

enumerator LWGSM_CMD_CPMS_GET_OPT

Get optional SMS message storages

enumerator LWGSM_CMD_CRES

Restore SMS Settings

enumerator LWGSM_CMD_CSAS

Save SMS Settings

enumerator LWGSM_CMD_CSCA

SMS Service Center Address

enumerator LWGSM_CMD_CSCB

Select Cell Broadcast SMS Messages

enumerator LWGSM_CMD_CSDH

Show SMS Text Mode Parameters

enumerator LWGSM_CMD_CSMP

Set SMS Text Mode Parameters

enumerator LWGSM_CMD_CSMS

Select Message Service

enumerator LWGSM_CMD_END

Last CMD entry

enum lwgsm_conn_connect_res_t

Connection result on connect command.

Values:

enumerator LWGSM_CONN_CONNECT_UNKNOWN

No valid result

enumerator LWGSM_CONN_CONNECT_OK

Connected OK

enumerator LWGSM_CONN_CONNECT_ERROR

Error on connection

enumerator LWGSM_CONN_CONNECT_ALREADY

Already connected

enum lwgsmr_t

Result enumeration used across application functions.

Values:

enumerator lwgsmOK = 0

Function returned OK

enumerator lwgsmOKIGNOREMORE

Function succedded, should continue as lwgsmOK but ignore sending more data. This result is possible on connection data receive callback

enumerator lwgsmERR

Generic error

enumerator lwgsmERRPAR

Wrong parameters on function call

enumerator lwgsmERRMEM

Memory error occurred

enumerator lwgsmTIMEOUT

Timeout occurred on command

enumerator lwgsmCONT

There is still some command to be processed in current command

enumerator lwgsmCLOSED

Connection just closed

enumerator lwgsmINPROG

Operation is in progress

enumerator lwgsmERRNOTENABLED

Feature not enabled error

enumerator lwgsmERRNOIP

Station does not have IP address

enumerator lwgsmERRNOFREECONN

There is no free connection available to start

enumerator lwgsmERRCONNTIMEOUT

Timeout received when connection to access point

enumerator lwgsmERRPASS

Invalid password for access point

enumerator lwgsmERRNOAP

No access point found with specific SSID and MAC address

enumerator lwgsmERRCONNFAIL

Connection failed to access point

enumerator lwgsmERRWIFINOTCONNECTED

Wifi not connected to access point

enumerator lwgsmERRNODEVICE

Device is not present

enumerator lwgsmERRBLOCKING

Blocking mode command is not allowed

enum lwgsm_device_model_t

GSM device model type.

Values:

enumerator LWGSM_DEVICE_MODEL_END

End of device model

enumerator LWGSM_DEVICE_MODEL_UNKNOWN

Unknown device model

enum lwgsm_mem_t

Available device memories.

Values:

enumerator LWGSM_MEM_END

End of memory list

enumerator LWGSM_MEM_CURRENT

Use current memory for read/delete operation

enumerator LWGSM_MEM_UNKNOWN = 0x1F

Unknown memory

enum lwgsm_number_type_t

GSM number type.

Values:

enumerator LWGSM_NUMBER_TYPE_UNKNOWN = 129

Number is unknown

enumerator LWGSM_NUMBER_TYPE_INTERNATIONAL = 145

Number is international

enumerator LWGSM_NUMBER_TYPE_NATIONAL = 161

Number is national

enumerator LWGSM_NUMBER_TYPE_NETWORK = 177

Number is network specific

struct lwgsm_conn_t
#include <lwgsm_private.h>

Connection structure.

Public Members

lwgsm_conn_type_t type

Connection type

uint8_t num

Connection number

lwgsm_ip_t remote_ip

Remote IP address

lwgsm_port_t remote_port

Remote port number

lwgsm_port_t local_port

Local IP address

lwgsm_evt_fn evt_func

Callback function for connection

void *arg

User custom argument

uint8_t val_id

Validation ID number. It is increased each time a new connection is established. It protects sending data to wrong connection in case we have data in send queue, and connection was closed and active again in between.

lwgsm_linbuff_t buff

Linear buffer structure

size_t total_recved

Total number of bytes received

uint8_t active

Status whether connection is active

uint8_t client

Status whether connection is in client mode

uint8_t data_received

Status whether first data were received on connection

uint8_t in_closing

Status if connection is in closing mode. When in closing mode, ignore any possible received data from function

uint8_t bearer

Bearer used. Can be 1 or 0

struct lwgsm_conn_t::[anonymous]::[anonymous] f

Connection flags

union lwgsm_conn_t::[anonymous] status

Connection status union with flag bits

struct lwgsm_pbuf_t
#include <lwgsm_private.h>

Packet buffer structure.

Public Members

struct lwgsm_pbuf *next

Next pbuf in chain list

size_t tot_len

Total length of pbuf chain

size_t len

Length of payload

size_t ref

Number of references to this structure

uint8_t *payload

Pointer to payload memory

lwgsm_ip_t ip

Remote address for received IPD data

lwgsm_port_t port

Remote port for received IPD data

struct lwgsm_ipd_t
#include <lwgsm_private.h>

Incoming network data read structure.

Public Members

uint8_t read

Set to 1 when we should process input data as connection data

size_t tot_len

Total length of packet

size_t rem_len

Remaining bytes to read in current +IPD statement

lwgsm_conn_p conn

Pointer to connection for network data

size_t buff_ptr

Buffer pointer to save data to. When set to NULL while read = 1, reading should ignore incoming data

lwgsm_pbuf_p buff

Pointer to data buffer used for receiving data

struct lwgsm_msg_t
#include <lwgsm_private.h>

Message queue structure to share between threads.

Public Members

lwgsm_cmd_t cmd_def

Default message type received from queue

lwgsm_cmd_t cmd

Since some commands can have different subcommands, sub command is used here

uint8_t i

Variable to indicate order number of subcommands

lwgsm_sys_sem_t sem

Semaphore for the message

uint8_t is_blocking

Status if command is blocking

uint32_t block_time

Maximal blocking time in units of milliseconds. Use 0 to for non-blocking call

lwgsmr_t res

Result of message operation

lwgsmr_t (*fn)(struct lwgsm_msg*)

Processing callback function to process packet

uint32_t delay

Delay to use before sending first reset AT command

struct lwgsm_msg_t::[anonymous]::[anonymous] reset

Reset device

uint32_t baudrate

Baudrate for AT port

struct lwgsm_msg_t::[anonymous]::[anonymous] uart

UART configuration

uint8_t mode

Functionality mode

struct lwgsm_msg_t::[anonymous]::[anonymous] cfun

Set phone functionality

const char *pin

Pin code to write

New pin code

Current pin code

New PIN code

struct lwgsm_msg_t::[anonymous]::[anonymous] cpin_enter

Enter pin code

struct lwgsm_msg_t::[anonymous]::[anonymous] cpin_add

Add pin code if previously wasn’t set

const char *current_pin

Current pin code

const char *new_pin

New pin code

struct lwgsm_msg_t::[anonymous]::[anonymous] cpin_change

Change current pin code

struct lwgsm_msg_t::[anonymous]::[anonymous] cpin_remove

Remove PIN code

const char *puk

PUK code

struct lwgsm_msg_t::[anonymous]::[anonymous] cpuk_enter

Enter PUK and new PIN

size_t cnum_tries

Number of tries

struct lwgsm_msg_t::[anonymous]::[anonymous] sim_info

Get information for SIM card

char *str

Pointer to output string array

size_t len

Length of output string array including trailing zero memory

struct lwgsm_msg_t::[anonymous]::[anonymous] device_info

All kind of device info, serial number, model, manufacturer, revision

int16_t *rssi

Pointer to RSSI variable

struct lwgsm_msg_t::[anonymous]::[anonymous] csq

Signal strength

uint8_t read

Flag indicating we can read the COPS actual data

Read the data flag

lwgsm_operator_t *ops

Pointer to operators array

size_t opsl

Length of operators array

size_t opsi

Current operator index array

size_t *opf

Pointer to number of operators found

struct lwgsm_msg_t::[anonymous]::[anonymous] cops_scan

Scan operators

lwgsm_operator_curr_t *curr

Pointer to output current operator

struct lwgsm_msg_t::[anonymous]::[anonymous] cops_get

Get current operator info

lwgsm_operator_mode_t mode

COPS mode

lwgsm_operator_format_t format

Operator format to print

const char *name

Short or long name, according to format

Entry name

uint32_t num

Number in case format is number

struct lwgsm_msg_t::[anonymous]::[anonymous] cops_set

Set operator settings

lwgsm_conn_t **conn

Pointer to pointer to save connection used

const char *host

Host to use for connection

lwgsm_port_t port

Remote port used for connection

lwgsm_conn_type_t type

Connection type

void *arg

Connection custom argument

lwgsm_evt_fn evt_func

Callback function to use on connection

uint8_t num

Connection number used for start

lwgsm_conn_connect_res_t conn_res

Connection result status

struct lwgsm_msg_t::[anonymous]::[anonymous] conn_start

Structure for starting new connection

lwgsm_conn_t *conn

Pointer to connection to close

Pointer to connection to send data

uint8_t val_id

Connection current validation ID when command was sent to queue

struct lwgsm_msg_t::[anonymous]::[anonymous] conn_close

Close connection

size_t btw

Number of remaining bytes to write

size_t ptr

Current write pointer for data

const uint8_t *data

Data to send

size_t sent

Number of bytes sent in last packet

size_t sent_all

Number of bytes sent all together

uint8_t tries

Number of tries used for last packet

uint8_t wait_send_ok_err

Set to 1 when we wait for SEND OK or SEND ERROR

const lwgsm_ip_t *remote_ip

Remote IP address for UDP connection

lwgsm_port_t remote_port

Remote port address for UDP connection

uint8_t fau

Free after use flag to free memory after data are sent (or not)

size_t *bw

Number of bytes written so far

struct lwgsm_msg_t::[anonymous]::[anonymous] conn_send

Structure to send data on connection

const char *num

Phone number

Entry number

const char *text

SMS content to send

uint8_t format

SMS format, 0 = PDU, 1 = text

size_t pos

Set on +CMGS response if command is OK

SMS position in memory

Memory position. Set to 0 to use new one or SIZE_T MAX to delete entry

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_send

Send SMS

lwgsm_mem_t mem

Memory to read from

Memory to delete from

Memory to use for read

Array of memories

Memory to use

lwgsm_sms_entry_t *entry

Pointer to entry to write info

uint8_t update

Update SMS status after read operation

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_read

Read single SMS

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_delete

Delete SMS message

lwgsm_sms_status_t status

SMS status to delete

SMS entries status

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_delete_all

Mass delete SMS messages

lwgsm_sms_entry_t *entries

Pointer to entries

size_t etr

Entries to read (array length)

NUmber of entries to read

size_t ei

Current entry index in array

Current entry index

size_t *er

Final entries read pointer for user

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_list

List SMS messages

struct lwgsm_msg_t::[anonymous]::[anonymous] sms_memory

Set preferred memories

const char *number

Phone number to dial

struct lwgsm_msg_t::[anonymous]::[anonymous] call_start

Start a new call

lwgsm_number_type_t type

Entry phone number type

uint8_t del

Flag indicates delete

struct lwgsm_msg_t::[anonymous]::[anonymous] pb_write

Write/Edit/Delete entry

size_t start_index

Start index in phonebook to read

lwgsm_pb_entry_t *entries

Pointer to entries array

struct lwgsm_msg_t::[anonymous]::[anonymous] pb_list

List phonebook entries

const char *search

Search string

struct lwgsm_msg_t::[anonymous]::[anonymous] pb_search

Search phonebook entries

const char *code

Code to send

char *resp

Response array

size_t resp_len

Length of response array

size_t resp_write_ptr

Write pointer for response

uint8_t quote_det

Information if quote has been detected

struct lwgsm_msg_t::[anonymous]::[anonymous] ussd

Execute USSD command

const char *apn

APN address

const char *user

APN username

const char *pass

APN password

struct lwgsm_msg_t::[anonymous]::[anonymous] network_attach

Settings for network attach

union lwgsm_msg_t::[anonymous] msg

Group of different possible message contents

struct lwgsm_ip_mac_t
#include <lwgsm_private.h>

IP and MAC structure with netmask and gateway addresses.

Public Members

lwgsm_ip_t ip

IP address

lwgsm_ip_t gw

Gateway address

lwgsm_ip_t nm

Netmask address

lwgsm_mac_t mac

MAC address

#include <lwgsm_private.h>

Link connection active info.

Public Members

Status if connection successful

Connection number

Status if connection is client or server

Connection type

Remote IP address

Remote port

Local port number

struct lwgsm_evt_func_t
#include <lwgsm_private.h>

Callback function linked list prototype.

Public Members

struct lwgsm_evt_func *next

Next function in the list

lwgsm_evt_fn fn

Function pointer itself

struct lwgsm_sms_mem_t
#include <lwgsm_private.h>

SMS memory information.

Public Members

uint32_t mem_available

Bit field of available memories

lwgsm_mem_t current

Current memory choice

size_t total

Size of memory in units of entries

size_t used

Number of used entries

struct lwgsm_sms_t
#include <lwgsm_private.h>

SMS structure.

Public Members

uint8_t ready

Flag indicating feature ready by device

uint8_t enabled

Flag indicating feature enabled

lwgsm_sms_mem_t mem[3]

3 memory info for operation,receive,sent storage

struct lwgsm_pb_mem_t
#include <lwgsm_private.h>

SMS memory information.

Public Members

uint32_t mem_available

Bit field of available memories

lwgsm_mem_t current

Current memory choice

size_t total

Size of memory in units of entries

size_t used

Number of used entries

struct lwgsm_pb_t
#include <lwgsm_private.h>

Phonebook structure.

Public Members

uint8_t ready

Flag indicating feature ready by device

uint8_t enabled

Flag indicating feature enabled

lwgsm_pb_mem_t mem

Memory information

struct lwgsm_sim_t
#include <lwgsm_private.h>

SIM structure.

Public Members

lwgsm_sim_state_t state

Current SIM status

struct lwgsm_network_t
#include <lwgsm_private.h>

Network info.

Public Members

lwgsm_network_reg_status_t status

Network registration status

lwgsm_operator_curr_t curr_operator

Current operator information

uint8_t is_attached

Flag indicating device is attached and PDP context is active

lwgsm_ip_t ip_addr

Device IP address when network PDP context is enabled

struct lwgsm_modules_t
#include <lwgsm_private.h>

GSM modules structure.

Public Members

char model_manufacturer[20]

Device manufacturer

char model_number[20]

Device model number

char model_serial_number[20]

Device serial number

char model_revision[20]

Device revision

lwgsm_device_model_t model

Device model

lwgsm_sim_t sim

SIM data

lwgsm_network_t network

Network status

int16_t rssi

RSSI signal strength. 0 = invalid, -53 % -113 = valid

uint8_t active_conns_cur_parse_num

Current connection number used for parsing

lwgsm_conn_t conns[LWGSM_CFG_MAX_CONNS]

Array of all connection structures

lwgsm_ipd_t ipd

Connection incoming data structure

uint8_t conn_val_id

Validation ID increased each time device connects to network

lwgsm_sms_t sms

SMS information

lwgsm_pb_t pb

Phonebook information

lwgsm_call_t call

Call information

struct lwgsm_t
#include <lwgsm_private.h>

GSM global structure.

Public Members

size_t locked_cnt

Counter how many times (recursive) stack is currently locked

lwgsm_sys_sem_t sem_sync

Synchronization semaphore between threads

lwgsm_sys_mbox_t mbox_producer

Producer message queue handle

lwgsm_sys_mbox_t mbox_process

Consumer message queue handle

lwgsm_sys_thread_t thread_produce

Producer thread handle

lwgsm_sys_thread_t thread_process

Processing thread handle

lwgsm_buff_t buff

Input processing buffer

lwgsm_ll_t ll

Low level functions

lwgsm_msg_t *msg

Pointer to current user message being executed

lwgsm_evt_t evt

Callback processing structure

lwgsm_evt_func_t *evt_func

Callback function linked list

lwgsm_modules_t m

All modules. When resetting, reset structure

uint8_t initialized

Flag indicating GSM library is initialized

uint8_t dev_present

Flag indicating GSM device is present

struct lwgsm_t::[anonymous]::[anonymous] f

Flags structure

union lwgsm_t::[anonymous] status

Status structure

struct lwgsm_dev_mem_map_t
#include <lwgsm_private.h>

Memory mapping structure between string and value in app.

Public Members

lwgsm_mem_t mem

Mem indication

const char *mem_str

Memory string

struct lwgsm_dev_model_map_t
#include <lwgsm_private.h>

Device models map between model and other information.

Public Members

lwgsm_device_model_t model

Device model

const char *id_str

Model string identification

uint8_t is_2g

Status if modem is 2G

uint8_t is_lte

Status if modem is LTE

struct lwgsm_ip_t
#include <lwgsm_types.h>

IP structure.

Public Members

uint8_t ip[4]

IPv4 address

struct lwgsm_mac_t
#include <lwgsm_types.h>

MAC address.

Public Members

uint8_t mac[6]

MAC address

struct lwgsm_datetime_t
#include <lwgsm_types.h>

Date and time structure.

Public Members

uint8_t date

Day in a month, from 1 to up to 31

uint8_t month

Month in a year, from 1 to 12

uint16_t year

Year

uint8_t day

Day in a week, from 1 to 7, 0 = invalid

uint8_t hours

Hours in a day, from 0 to 23

uint8_t minutes

Minutes in a hour, from 0 to 59

uint8_t seconds

Seconds in a minute, from 0 to 59

struct lwgsm_linbuff_t
#include <lwgsm_types.h>

Linear buffer structure.

Public Members

uint8_t *buff

Pointer to buffer data array

size_t len

Length of buffer array

size_t ptr

Current buffer pointer