Embedded Wireless Framework
Functions
Modem adapter common API

The common modem functions. More...

Functions

ewf_result ewf_adapter_modem_eps_network_registration_urc_set (ewf_adapter *adapter_ptr, const char *n_str)
 EPS Network Registration (+cereg) More...
 
ewf_result ewf_adapter_modem_eps_network_registration_read (ewf_adapter *adapter_ptr, ewf_adapter_modem_network_status *epsregistrationstatus_ptr, ewf_adapter_modem_act *act_ptr, uint32_t *tac_ptr, uint32_t *ci_ptr, uint32_t rac_ptr, uint8_t *cause_type_ptr, uint8_t *reject_cause_ptr)
 Read EPS Network Registration (+cereg?) More...
 
ewf_result ewf_adapter_modem_gprs_network_registration_urc_set (ewf_adapter *adapter_ptr, const char *n_str)
 GPRS Network Registration (+cgreg) More...
 
ewf_result ewf_adapter_modem_gprs_network_registration_read (ewf_adapter *adapter_ptr, ewf_adapter_modem_network_status *status_ptr, ewf_adapter_modem_act *act_ptr, uint32_t *tac_ptr, uint32_t *ci_ptr, uint32_t *rac_ptr, uint8_t *cause_type_ptr, uint8_t *reject_cause_ptr)
 Read GPRS Network Registration (+cgreg) More...
 
ewf_result ewf_adapter_modem_init_pdp_activate (ewf_adapter *adapter_ptr, uint32_t n, bool attachPDN)
 Initial PDP context activation (+cipca) More...
 
ewf_result ewf_adapter_modem_init_pdp_activation_config_read (ewf_adapter *adapter_ptr, uint32_t *n_ptr, bool *attachpdn_ptr)
 Read Initial PDP context activation config(+cipca) More...
 
ewf_result ewf_adapter_modem_pdp_apn_set (ewf_adapter *adapter_ptr, uint32_t context_id, const char *pdptype_ptr, const char *apn_ptr)
 Set PDP context APN (+cgdcont) More...
 
ewf_result ewf_adapter_modem_pdp_apn_read (ewf_adapter *adapter_ptr, uint32_t context_id, char *pdptype_ptr, char *apn_ptr, uint8_t apn_str_len)
 Read PDP context APN (+cgdcont?) More...
 
ewf_result ewf_adapter_modem_pdp_context_authentication_set (ewf_adapter *adapter_ptr, uint32_t context_id, const char *userid_str, const char *password_str)
 Set PDP context authentication parameter (+cgauth) More...
 
ewf_result ewf_adapter_modem_pdp_data_mode_enter (ewf_adapter *adapter_ptr, const char *l2p_str, uint32_t context_id)
 Enter data state (+cgdata) More...
 
ewf_result ewf_adapter_modem_packet_service_activate (ewf_adapter *adapter_ptr, uint32_t context_id)
 Activate context (+cgact) More...
 
ewf_result ewf_adapter_modem_packet_service_deactivate (ewf_adapter *adapter_ptr, uint32_t context_id)
 De-activate context (+cgact) More...
 
ewf_result ewf_adapter_modem_packet_service_attach (ewf_adapter *adapter_ptr)
 Attach to the Packet domain service (+cgatt) More...
 
ewf_result ewf_adapter_modem_packet_service_detach (ewf_adapter *adapter_ptr)
 Detach form the Packet domain service (+cgatt) More...
 
ewf_result ewf_adapter_modem_network_attach_status_read (ewf_adapter *adapter_ptr, bool *state_ptr)
 Read the network attach status (+cgatt?) More...
 

Detailed Description

The common modem functions.

Function Documentation

◆ ewf_adapter_modem_eps_network_registration_read()

ewf_result ewf_adapter_modem_eps_network_registration_read ( ewf_adapter adapter_ptr,
ewf_adapter_modem_network_status *  epsregistrationstatus_ptr,
ewf_adapter_modem_act *  act_ptr,
uint32_t *  tac_ptr,
uint32_t *  ci_ptr,
uint32_t  rac_ptr,
uint8_t *  cause_type_ptr,
uint8_t *  reject_cause_ptr 
)

Read EPS Network Registration (+cereg?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]n_ptrPointer to integer value for network registration URC options
[out]epsregistrationstatus_ptrPointer to eps network registration status
[out]act_ptrAccess technology integer
[out]tac_ptrPointer to integer value for tracking area code in hex format
[out]ci_ptrPointer to integer value for cell id in hex format
[out]rac_ptrPointer to integer value for routing area code in hex format
[out]cause_type_ptrPointer to integer value for cause type for registration rejection
[out]reject_cause_ptrPointer to integer value for reject cause for registration
Returns
ewf_result status code

◆ ewf_adapter_modem_eps_network_registration_urc_set()

ewf_result ewf_adapter_modem_eps_network_registration_urc_set ( ewf_adapter adapter_ptr,
const char *  n_str 
)

EPS Network Registration (+cereg)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]n_strString indicating EPS network registration URC options
Returns
ewf_result status code

◆ ewf_adapter_modem_gprs_network_registration_read()

ewf_result ewf_adapter_modem_gprs_network_registration_read ( ewf_adapter adapter_ptr,
ewf_adapter_modem_network_status *  status_ptr,
ewf_adapter_modem_act *  act_ptr,
uint32_t *  tac_ptr,
uint32_t *  ci_ptr,
uint32_t *  rac_ptr,
uint8_t *  cause_type_ptr,
uint8_t *  reject_cause_ptr 
)

Read GPRS Network Registration (+cgreg)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]n_ptrPointer to integer value for network registration URC options
[out]status_ptrPointer to eps network registration status
[out]act_ptrAccess technology integer
[out]tac_ptrPointer to integer value for tracking area code in hex format
[out]ci_ptrPointer to integer value for cell If in hex format
[out]rac_ptrPointer to integer value for routing area code in hex format
[out]cause_type_ptrPointer to integer value for cause type for registration rejection
[out]reject_cause_ptrPointer to integer value for reject cause for registration
Returns
ewf_result status code

◆ ewf_adapter_modem_gprs_network_registration_urc_set()

ewf_result ewf_adapter_modem_gprs_network_registration_urc_set ( ewf_adapter adapter_ptr,
const char *  n_str 
)

GPRS Network Registration (+cgreg)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]n_strString indicating gprs network registration URC options
Note
This is an optional command as per 3GPP, not all modems will support this
Returns
ewf_result status code

◆ ewf_adapter_modem_init_pdp_activate()

ewf_result ewf_adapter_modem_init_pdp_activate ( ewf_adapter adapter_ptr,
uint32_t  n,
bool  attachPDN 
)

Initial PDP context activation (+cipca)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]nActivation option
[in]attachPDNEPS attach with or without PDN connection
Returns
ewf_result status code

◆ ewf_adapter_modem_init_pdp_activation_config_read()

ewf_result ewf_adapter_modem_init_pdp_activation_config_read ( ewf_adapter adapter_ptr,
uint32_t *  n_ptr,
bool *  attachpdn_ptr 
)

Read Initial PDP context activation config(+cipca)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]n_ptrActivation option
[out]attachpdn_ptrEPS attach with or without PDN connection
Returns
ewf_result status code

◆ ewf_adapter_modem_network_attach_status_read()

ewf_result ewf_adapter_modem_network_attach_status_read ( ewf_adapter adapter_ptr,
bool *  state_ptr 
)

Read the network attach status (+cgatt?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]state_ptrPointer to integer value indicating status of network attachment
Returns
ewf_result status code

◆ ewf_adapter_modem_packet_service_activate()

ewf_result ewf_adapter_modem_packet_service_activate ( ewf_adapter adapter_ptr,
uint32_t  context_id 
)

Activate context (+cgact)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]context_idInteger indicating context definition id
Returns
ewf_result status code

◆ ewf_adapter_modem_packet_service_attach()

ewf_result ewf_adapter_modem_packet_service_attach ( ewf_adapter adapter_ptr)

Attach to the Packet domain service (+cgatt)

Parameters
[in]adapter_ptrA pointer to the adapter structure
Returns
ewf_result status code

◆ ewf_adapter_modem_packet_service_deactivate()

ewf_result ewf_adapter_modem_packet_service_deactivate ( ewf_adapter adapter_ptr,
uint32_t  context_id 
)

De-activate context (+cgact)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]context_idInteger indicating context definition id
Returns
ewf_result status code

◆ ewf_adapter_modem_packet_service_detach()

ewf_result ewf_adapter_modem_packet_service_detach ( ewf_adapter adapter_ptr)

Detach form the Packet domain service (+cgatt)

Parameters
[in]adapter_ptrA pointer to the adapter structure
Returns
ewf_result status code

◆ ewf_adapter_modem_pdp_apn_read()

ewf_result ewf_adapter_modem_pdp_apn_read ( ewf_adapter adapter_ptr,
uint32_t  context_id,
char *  pdptype_ptr,
char *  apn_ptr,
uint8_t  apn_str_len 
)

Read PDP context APN (+cgdcont?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]contextidInteger value for PDP context definition id.
[out]pdptype_ptrInteger for PDP type
[out]apn_strPointer to string holding apn
[out]apn_str_lenPointer to lenght of apn string
Returns
ewf_result status code

◆ ewf_adapter_modem_pdp_apn_set()

ewf_result ewf_adapter_modem_pdp_apn_set ( ewf_adapter adapter_ptr,
uint32_t  context_id,
const char *  pdptype_ptr,
const char *  apn_ptr 
)

Set PDP context APN (+cgdcont)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]contextidInteger value for PDP context definition id.
[in]pdptypeInteger for PDP type
[in]apn_strPointer to string holding apn
Returns
ewf_result status code

◆ ewf_adapter_modem_pdp_context_authentication_set()

ewf_result ewf_adapter_modem_pdp_context_authentication_set ( ewf_adapter adapter_ptr,
uint32_t  context_id,
const char *  userid_str,
const char *  password_str 
)

Set PDP context authentication parameter (+cgauth)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]contextidInteger value for PDP context definition id.
[in]userid_strPointer to username/user id string
[in]pdptypeInteger for PDP type
[in]password_strPointer to a string with the password for accessing the facility
Returns
ewf_result status code

◆ ewf_adapter_modem_pdp_data_mode_enter()

ewf_result ewf_adapter_modem_pdp_data_mode_enter ( ewf_adapter adapter_ptr,
const char *  l2p_str,
uint32_t  context_id 
)

Enter data state (+cgdata)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]l2p_strString inidicating the layer 2 protocol to be used between TE and the MT
Note
Refer to modem user manual for supported Layer 2 protocol options. This command immplementation is 3GPP optional
Parameters
[in]contextidInteger value for PDP context definition id.
Returns
ewf_result status code