Embedded Wireless Framework
Functions
Modem adapter general API

The general modem functions. More...

Functions

ewf_result ewf_adapter_modem_manufacturer_read (ewf_adapter *adapter_ptr, char *info_str, uint16_t *info_str_len_ptr)
 Read manufacturer info (+cgmi) More...
 
ewf_result ewf_adapter_modem_model_read (ewf_adapter *adapter_ptr, char *info_str, uint16_t *info_str_len_ptr)
 Read manufacturer model info (+cgmm) More...
 
ewf_result ewf_adapter_modem_revision_read (ewf_adapter *adapter_ptr, char *info_str, uint16_t *info_str_len_ptr)
 Read manufacturer model revision info (+cgmr) More...
 
ewf_result ewf_adapter_modem_serial_number_read (ewf_adapter *adapter_ptr, const char *snt_str, char *info_str, uint16_t *info_str_len_ptr)
 Read manufacturer product serial number info (+cgsn) More...
 
ewf_result ewf_adapter_modem_imsi_read (ewf_adapter *adapter_ptr, char *info_str, uint32_t *info_str_len_ptr)
 Read the modem IMSI (+cimi) More...
 
ewf_result ewf_adapter_modem_message_character_set (ewf_adapter *adapter_ptr, const char *chset_str)
 Set TE character set (+cscs) More...
 
ewf_result ewf_adapter_modem_message_character_read (ewf_adapter *adapter_ptr, char *chset_str, uint32_t *chset_len_ptr)
 Read the TE character set (+cscs?) More...
 
ewf_result ewf_adapter_modem_multiplexing_mode_set (ewf_adapter *adapter_ptr, bool transparency, uint8_t subset, uint8_t port_speed, uint32_t n1, uint8_t t1, uint8_t n2, uint8_t t2, uint8_t t3, uint8_t k)
 Set Multiplexing mode (+cmux) More...
 
ewf_result ewf_adapter_modem_multiplexing_mode_read (ewf_adapter *adapter_ptr, bool *transparency_ptr, uint8_t *subset_ptr, uint8_t *port_speed_ptr, uint32_t *n1_ptr, uint8_t *t1_ptr, uint8_t *n2_ptr, uint8_t *t2_ptr, uint8_t *t3_ptr, uint8_t *k_ptr)
 Read Multiplexing mode (+cmux?) More...
 

Detailed Description

The general modem functions.

Function Documentation

◆ ewf_adapter_modem_imsi_read()

ewf_result ewf_adapter_modem_imsi_read ( ewf_adapter adapter_ptr,
char *  info_str,
uint32_t *  info_str_len_ptr 
)

Read the modem IMSI (+cimi)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]info_strA pointer to the buffer that will contain the IMSI
[out]info_str_len_ptrPointer to the length of the buffer
Returns
ewf_result status code

◆ ewf_adapter_modem_manufacturer_read()

ewf_result ewf_adapter_modem_manufacturer_read ( ewf_adapter adapter_ptr,
char *  info_str,
uint16_t *  info_str_len_ptr 
)

Read manufacturer info (+cgmi)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]info_ptrA pointer holding manufacturer info string
[out]info_str_len_ptrA pointer to lenght of info buffer
Returns
ewf_result status code

◆ ewf_adapter_modem_message_character_read()

ewf_result ewf_adapter_modem_message_character_read ( ewf_adapter adapter_ptr,
char *  chset_str,
uint32_t *  chset_len_ptr 
)

Read the TE character set (+cscs?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]chset_strA pointer to buffer that will contain the character set
[out]chset_len_ptrPointer to length of chset buffer data
Returns
ewf_result status code

◆ ewf_adapter_modem_message_character_set()

ewf_result ewf_adapter_modem_message_character_set ( ewf_adapter adapter_ptr,
const char *  chset_str 
)

Set TE character set (+cscs)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]chset_strString indicating character set
Returns
ewf_result status code

◆ ewf_adapter_modem_model_read()

ewf_result ewf_adapter_modem_model_read ( ewf_adapter adapter_ptr,
char *  info_str,
uint16_t *  info_str_len_ptr 
)

Read manufacturer model info (+cgmm)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]info_strA pointer to a string with the model info
[out]info_str_len_ptrA pointer to lenght of info buffer
Returns
ewf_result status code

◆ ewf_adapter_modem_multiplexing_mode_read()

ewf_result ewf_adapter_modem_multiplexing_mode_read ( ewf_adapter adapter_ptr,
bool *  transparency_ptr,
uint8_t *  subset_ptr,
uint8_t *  port_speed_ptr,
uint32_t *  n1_ptr,
uint8_t *  t1_ptr,
uint8_t *  n2_ptr,
uint8_t *  t2_ptr,
uint8_t *  t3_ptr,
uint8_t *  k_ptr 
)

Read Multiplexing mode (+cmux?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]transparency_ptrPointer to integer indicating multiplexer transperency mechanism
[out]subset_ptrPointer to integer indicating multiplexer control channel option
[out]port_speed_ptrPointer to integer indicating Transmission rate
[out]n1_ptrPointer to integer indicating Maximum framesize (Default 31 for Basic transperency option and 64 for advanced option)
[out]t1_ptrPointer to integer indicating Timer in units of temn millisecods
[out]n2_ptrPointer to integer indicating Maximum number of re-transmissions
[out]t2_ptrPointer to integer indicating response timer for the multiplexer control channel in units of ten milliseconds (t2>t1)
[out]t3_ptrPointer to integer indicating Wake up response timer in seconds
[out]k_ptrPointer to integer indicating Window size, for Advanced option with Error-Recovery Mode
Returns
ewf_result status code

◆ ewf_adapter_modem_multiplexing_mode_set()

ewf_result ewf_adapter_modem_multiplexing_mode_set ( ewf_adapter adapter_ptr,
bool  transparency,
uint8_t  subset,
uint8_t  port_speed,
uint32_t  n1,
uint8_t  t1,
uint8_t  n2,
uint8_t  t2,
uint8_t  t3,
uint8_t  k 
)

Set Multiplexing mode (+cmux)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]transparencyInteger indicating multiplexer transperency mechanism
[in]subsetInteger indicating multiplexer control channel option
[in]port_speedInteger representing transmission rate
[in]n1Maximum framesize (Default 31 for Basic transperency option and 64 for advanced option)
[in]t1Timer in units of temn millisecods
[in]n2Maximum number of re-transmissions
[in]t2response timer for the multiplexer control channel in units of ten milliseconds (t2>t1)
[in]t3Wake up response timer in seconds
[in]kWiindow size, for Advanced option with Error-Recovery Mode
Returns
ewf_result status code

◆ ewf_adapter_modem_revision_read()

ewf_result ewf_adapter_modem_revision_read ( ewf_adapter adapter_ptr,
char *  info_str,
uint16_t *  info_str_len_ptr 
)

Read manufacturer model revision info (+cgmr)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]info_ptrA pointer to a string with the model revision info
[out]info_str_len_ptrA pointer to lenght of info buffer
Returns
ewf_result status code

◆ ewf_adapter_modem_serial_number_read()

ewf_result ewf_adapter_modem_serial_number_read ( ewf_adapter adapter_ptr,
const char *  snt_str,
char *  info_str,
uint16_t *  info_str_len_ptr 
)

Read manufacturer product serial number info (+cgsn)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]snt_strString indicating serial number type that has been requested
Note
if snt_str is NULL, the function will provide IMEI. Not all modems will support this option.
Parameters
[out]info_ptrA pointer to a string with the serial number info
[out]info_str_len_ptrLenght of the serial number
Returns
ewf_result status code