|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
SIMCom SIM7080 cellular modems. More...
Files | |
| file | simcom-sim7080.h |
| Simcom SIM7080 modem public API header file. | |
Data Structures | |
| struct | sim7080_gnss_data |
| Sim7080 gnss data structure. More... | |
| struct | sim7080_sms |
| Buffer structure for sms. More... | |
| struct | sim7080_sms_buffer |
| Buffer structure for sms reads. More... | |
| struct | sim7080_ue_sys_info_gsm |
| Sim7080 ue system information structure for gsm. More... | |
| struct | sim7080_ue_sys_info_lte |
| Sim7080 ue system information structure for LTE. More... | |
| struct | sim7080_ue_sys_info |
| Sim7080 ue system information structure. More... | |
Macros | |
| #define | SIM7080_GNSS_DATA_UTC_LEN 20 |
| Maximum Length of GNSS UTC data. | |
| #define | SIM7080_SMS_MAX_LEN 160 |
| Maximum SMS length. | |
| #define | SIM7080_UE_SYS_INFO_BAND_SIZE 32 |
| Maximum UE system information band size. | |
| #define | SIM7080_DNS_MAX_RECOUNT 10 |
| Maximum number of DNS retries. | |
| #define | SIM7080_DNS_MAX_TIMEOUT_MS 60000 |
| Maximum timeout for DNS queries in milliseconds. | |
| #define | SIM7080_LTE_CHANNEL_MASK_NB1 0x7BEFFU |
| Channel Mask for NB-IoT. | |
| #define | SIM7080_LTE_CHANNEL_MASK_M1 0x5FFFFU |
| Channel Mask for CAT-M1. | |
| #define | SIM7080_NUM_LTE_CHANNELS 19U |
| Number of LTE channels supported by the modem. | |
Functions | |
| enum sim7080_state | mdm_sim7080_get_state (void) |
| Get the current state of the modem. | |
| int | mdm_sim7080_power_on (void) |
| Power on the Sim7080. | |
| int | mdm_sim7080_power_off (void) |
| Power off the Sim7080. | |
| void | mdm_sim7080_force_reset (void) |
| Forcefully reset the modem by pulling pwrkey for 15 seconds. | |
| int | mdm_sim7080_start_network (void) |
| Activates the network operation mode of the modem. | |
| int | mdm_sim7080_stop_network (void) |
| Stops the networking operation mode of the modem. | |
| int | mdm_sim7080_start_gnss (void) |
| Starts the modem in gnss operation mode. | |
| int | mdm_sim7080_start_gnss_xtra (void) |
| Starts the modem in gnss operation mode with xtra functionality. | |
| int | mdm_sim7080_stop_gnss (void) |
| Stops the modem gnss operation mode. | |
| int | mdm_sim7080_download_xtra (uint8_t server_id, const char *f_name) |
| Download the XTRA file for assisted gnss. | |
| int | mdm_sim7080_query_xtra_validity (int16_t *diff_h, int16_t *duration_h, struct tm *inject) |
| Query the validity of the XTRA file. | |
| int | mdm_sim7080_query_gnss (struct sim7080_gnss_data *data) |
| Query gnss position form the modem. | |
| const char * | mdm_sim7080_get_manufacturer (void) |
| Get the sim7080 manufacturer. | |
| const char * | mdm_sim7080_get_model (void) |
| Get the sim7080 model information. | |
| const char * | mdm_sim7080_get_revision (void) |
| Get the sim7080 revision. | |
| const char * | mdm_sim7080_get_imei (void) |
| Get the sim7080 imei number. | |
| const char * | mdm_sim7080_get_iccid (void) |
| Get the sim7080 iccid number. | |
| int | mdm_sim7080_read_sms (struct sim7080_sms_buffer *buffer) |
| Read sms from sim module. | |
| int | mdm_sim7080_delete_sms (uint16_t index) |
| Delete a sms at a given index. | |
| int | mdm_sim7080_set_gpio (int gpio, int level) |
| Set the level of one of the module's GPIO pins. | |
| int | mdm_sim7080_ftp_get_start (const char *server, const char *user, const char *passwd, const char *file, const char *path) |
| Start a ftp get session. | |
| int | mdm_sim7080_ftp_get_read (char *dst, size_t *size) |
| Read data from a ftp get session. | |
| int | mdm_sim7080_get_battery_charge (uint8_t *bcs, uint8_t *bcl, uint16_t *voltage) |
| Read voltage, charge status and battery connection level. | |
| int | mdm_sim7080_get_ue_sys_info (struct sim7080_ue_sys_info *info) |
| Read the ue system information. | |
| int | mdm_sim7080_get_local_time (struct tm *t) |
| Get the local time of the modem. | |
| int | mdm_sim7080_dns_set_lookup_params (uint8_t recount, uint16_t timeout) |
| Set the dns query lookup parameters. | |
| void | mdm_sim7080_dns_get_lookup_params (uint8_t *recount, uint16_t *timeout) |
| Get the dns query lookup parameters. | |
| void | mdm_sim7080_get_rat (enum sim7080_rat *rat) |
| Get the currently selected radio technology. | |
| int | mdm_sim7080_set_rat (enum sim7080_rat rat) |
| Set the radio technology. | |
| void | mdm_sim7080_get_lte_bands (uint32_t *nb1, uint32_t *m1) |
| Get the currently used LTE bands. | |
| int | mdm_sim7080_set_lte_bands (uint32_t nb1, uint32_t m1) |
| Set the LTE bands to use. | |
SIMCom SIM7080 cellular modems.
| #define SIM7080_DNS_MAX_RECOUNT 10 |
#include <simcom-sim7080.h>
Maximum number of DNS retries.
| #define SIM7080_DNS_MAX_TIMEOUT_MS 60000 |
#include <simcom-sim7080.h>
Maximum timeout for DNS queries in milliseconds.
| #define SIM7080_GNSS_DATA_UTC_LEN 20 |
#include <simcom-sim7080.h>
Maximum Length of GNSS UTC data.
| #define SIM7080_LTE_CHANNEL_MASK_M1 0x5FFFFU |
#include <simcom-sim7080.h>
Channel Mask for CAT-M1.
| #define SIM7080_LTE_CHANNEL_MASK_NB1 0x7BEFFU |
#include <simcom-sim7080.h>
Channel Mask for NB-IoT.
| #define SIM7080_NUM_LTE_CHANNELS 19U |
#include <simcom-sim7080.h>
Number of LTE channels supported by the modem.
| #define SIM7080_SMS_MAX_LEN 160 |
#include <simcom-sim7080.h>
Maximum SMS length.
| #define SIM7080_UE_SYS_INFO_BAND_SIZE 32 |
#include <simcom-sim7080.h>
Maximum UE system information band size.
| enum sim7080_ftp_rc |
#include <simcom-sim7080.h>
Possible ftp return codes.
| Enumerator | |
|---|---|
| SIM7080_FTP_RC_OK | Operation finished correctly. |
| SIM7080_FTP_RC_FINISHED | Session finished. |
| SIM7080_FTP_RC_ERROR | An error occurred. |
| enum sim7080_lte_chan |
#include <simcom-sim7080.h>
Supported LTE channels.
| enum sim7080_rat |
#include <simcom-sim7080.h>
Modem radio access technology.
| Enumerator | |
|---|---|
| SIM7080_RAT_LTE_NB1 | NB-IoT only. |
| SIM7080_RAT_LTE_M1 | LTE CAT M1 only. |
| SIM7080_RAT_LTE_AUTO | Modem automatically selects M1 or NB1. |
| SIM7080_RAT_GSM | GSM. |
| enum sim7080_sms_stat |
#include <simcom-sim7080.h>
Possible sms states in memory.
| enum sim7080_state |
#include <simcom-sim7080.h>
Sim7080 modem state.
| Enumerator | |
|---|---|
| SIM7080_STATE_INIT | Initial modem state. |
| SIM7080_STATE_IDLE | Modem idle. |
| SIM7080_STATE_NETWORKING | Network active. |
| SIM7080_STATE_GNSS | GNSS active. |
| SIM7080_STATE_OFF | Modem off. |
| enum sim7080_ue_op_mode |
#include <simcom-sim7080.h>
UE operating mode.
| enum sim7080_ue_sys_mode |
#include <simcom-sim7080.h>
UE system mode.
| Enumerator | |
|---|---|
| SIM7080_UE_SYS_MODE_NO_SERVICE | No service. |
| SIM7080_UE_SYS_MODE_GSM | GSM. |
| SIM7080_UE_SYS_MODE_LTE_CAT_M1 | LTE CAT M1. |
| SIM7080_UE_SYS_MODE_LTE_NB_IOT | LTE NB IOT. |
| int mdm_sim7080_delete_sms | ( | uint16_t | index | ) |
#include <simcom-sim7080.h>
Delete a sms at a given index.
| index | The index of the sms in memory. |
#include <simcom-sim7080.h>
Get the dns query lookup parameters.
| recount | [out] Number of retries per query. |
| timeout | [out] Timeout for a dns query in milliseconds. |
#include <simcom-sim7080.h>
Set the dns query lookup parameters.
| recount | Number of retries per query. Maximum SIM7080_DNS_MAX_RECOUNT |
| timeout | Timeout for a dns query in milliseconds. Maximum SIM7080_DNS_MAX_TIMEOUT_MS |
| int mdm_sim7080_download_xtra | ( | uint8_t | server_id, |
| const char * | f_name ) |
#include <simcom-sim7080.h>
Download the XTRA file for assisted gnss.
| server_id | Id of the server to download XTRA file from. |
| f_name | The name of the XTRA file to download. |
| void mdm_sim7080_force_reset | ( | void | ) |
#include <simcom-sim7080.h>
Forcefully reset the modem by pulling pwrkey for 15 seconds.
| int mdm_sim7080_ftp_get_read | ( | char * | dst, |
| size_t * | size ) |
#include <simcom-sim7080.h>
Read data from a ftp get session.
| dst | The destination buffer. |
| size | Initialize to the size of dst. Gets set to the number of bytes actually read. |
| int mdm_sim7080_ftp_get_start | ( | const char * | server, |
| const char * | user, | ||
| const char * | passwd, | ||
| const char * | file, | ||
| const char * | path ) |
#include <simcom-sim7080.h>
Start a ftp get session.
| server | The ftp servers address. |
| user | User name for the ftp server. |
| passwd | Password for the ftp user. |
| file | File to be downloaded. |
| path | Path to the file on the server. |
#include <simcom-sim7080.h>
Read voltage, charge status and battery connection level.
| bcs | [out] Charge status. |
| bcl | [out] Battery connection level. |
| voltage | [out] Battery voltage in mV. |
| const char * mdm_sim7080_get_iccid | ( | void | ) |
#include <simcom-sim7080.h>
Get the sim7080 iccid number.
| const char * mdm_sim7080_get_imei | ( | void | ) |
#include <simcom-sim7080.h>
Get the sim7080 imei number.
| int mdm_sim7080_get_local_time | ( | struct tm * | t | ) |
#include <simcom-sim7080.h>
Get the local time of the modem.
| t | Time structure to fill. |
#include <simcom-sim7080.h>
Get the currently used LTE bands.
| nb1 | [out] Used NB-IoT bands. May be NULL. |
| m1 | [out] Used CAT-M1 bands. May be NULL. |
| const char * mdm_sim7080_get_manufacturer | ( | void | ) |
#include <simcom-sim7080.h>
Get the sim7080 manufacturer.
| const char * mdm_sim7080_get_model | ( | void | ) |
#include <simcom-sim7080.h>
Get the sim7080 model information.
| void mdm_sim7080_get_rat | ( | enum sim7080_rat * | rat | ) |
#include <simcom-sim7080.h>
Get the currently selected radio technology.
| rat | [out] Gets set to the current technology. |
| const char * mdm_sim7080_get_revision | ( | void | ) |
#include <simcom-sim7080.h>
Get the sim7080 revision.
| enum sim7080_state mdm_sim7080_get_state | ( | void | ) |
| int mdm_sim7080_get_ue_sys_info | ( | struct sim7080_ue_sys_info * | info | ) |
#include <simcom-sim7080.h>
Read the ue system information.
| info | Destination buffer for information. |
| int mdm_sim7080_power_off | ( | void | ) |
| int mdm_sim7080_power_on | ( | void | ) |
| int mdm_sim7080_query_gnss | ( | struct sim7080_gnss_data * | data | ) |
#include <simcom-sim7080.h>
Query gnss position form the modem.
#include <simcom-sim7080.h>
Query the validity of the XTRA file.
| diff_h | Difference between the local time and the XTRA inject time in hours. |
| duration_h | Valid time of the XTRA file in hours. |
| inject | Injection time of the XTRA file. |
| int mdm_sim7080_read_sms | ( | struct sim7080_sms_buffer * | buffer | ) |
#include <simcom-sim7080.h>
Read sms from sim module.
| buffer | Buffer structure for sms. |
| int mdm_sim7080_set_gpio | ( | int | gpio, |
| int | level ) |
#include <simcom-sim7080.h>
Set the level of one of the module's GPIO pins.
| gpio | GPIO pin number |
| level | New logical level of the GPIO |
#include <simcom-sim7080.h>
Set the LTE bands to use.
| nb1 | NB-IoT bands to use. 0 to not change the bands. |
| m1 | CAT-M1 bands to use. 0 to not change the bands. |
| 0 | Success. |
| -EINVAL | The band selection is illegal. |
| int mdm_sim7080_set_rat | ( | enum sim7080_rat | rat | ) |
#include <simcom-sim7080.h>
Set the radio technology.
| rat | The radio technology. |
| 0 | Success. |
| -EINVAL | The selected technology is not available. |
| int mdm_sim7080_start_gnss | ( | void | ) |
#include <simcom-sim7080.h>
Starts the modem in gnss operation mode.
| int mdm_sim7080_start_gnss_xtra | ( | void | ) |
#include <simcom-sim7080.h>
Starts the modem in gnss operation mode with xtra functionality.
| int mdm_sim7080_start_network | ( | void | ) |
#include <simcom-sim7080.h>
Activates the network operation mode of the modem.
| int mdm_sim7080_stop_gnss | ( | void | ) |
#include <simcom-sim7080.h>
Stops the modem gnss operation mode.
| int mdm_sim7080_stop_network | ( | void | ) |
#include <simcom-sim7080.h>
Stops the networking operation mode of the modem.