Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
simcom-sim7080.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 metraTec GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_MODEM_SIMCOM_SIM7080_H
8#define ZEPHYR_INCLUDE_DRIVERS_MODEM_SIMCOM_SIM7080_H
9
10#include <zephyr/types.h>
11
12#include <stdint.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#define SIM7080_GNSS_DATA_UTC_LEN 20
19#define SIM7080_SMS_MAX_LEN 160
20
58};
59
69};
70
75 /* Operation finished correctly. */
77 /* Session finished. */
79 /* An error occurred. */
81};
82
87 /* First octet of the sms. */
89 /* Message protocol identifier. */
91 /* Status of the sms in memory. */
93 /* Index of the sms in memory. */
95 /* Time the sms was received. */
96 struct {
105 /* Buffered sms. */
107 /* Length of the sms in buffer. */
109};
110
115 /* sms structures to read to. */
117 /* Number of sms structures. */
119};
120
127
134
141
148
156
161
165const char *mdm_sim7080_get_model(void);
166
170const char *mdm_sim7080_get_revision(void);
171
175const char *mdm_sim7080_get_imei(void);
176
190
198
209int mdm_sim7080_ftp_get_start(const char *server, const char *user, const char *passwd,
210 const char *file, const char *path);
211
220int mdm_sim7080_ftp_get_read(char *dst, size_t *size);
221
222#ifdef __cplusplus
223}
224#endif
225
226#endif /* ZEPHYR_INCLUDE_DRIVERS_MODEM_SIMCOM_SIM7080_H */
sim7080_sms_stat
Possible sms states in memory.
Definition: simcom-sim7080.h:63
@ SIM7080_SMS_STAT_REC_READ
Definition: simcom-sim7080.h:65
@ SIM7080_SMS_STAT_REC_UNREAD
Definition: simcom-sim7080.h:64
@ SIM7080_SMS_STAT_STO_UNSENT
Definition: simcom-sim7080.h:66
@ SIM7080_SMS_STAT_ALL
Definition: simcom-sim7080.h:68
@ SIM7080_SMS_STAT_STO_SENT
Definition: simcom-sim7080.h:67
const char * mdm_sim7080_get_imei(void)
Get the sim7080 imei number.
int mdm_sim7080_power_off(void)
Power off the Sim7080.
sim7080_ftp_rc
Possible ftp return codes.
Definition: simcom-sim7080.h:74
@ SIM7080_FTP_RC_FINISHED
Definition: simcom-sim7080.h:78
@ SIM7080_FTP_RC_OK
Definition: simcom-sim7080.h:76
@ SIM7080_FTP_RC_ERROR
Definition: simcom-sim7080.h:80
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.
const char * mdm_sim7080_get_model(void)
Get the sim7080 model information.
int mdm_sim7080_start_gnss(void)
Starts the modem in gnss operation mode.
int mdm_sim7080_ftp_get_read(char *dst, size_t *size)
Read data from a ftp get session.
const char * mdm_sim7080_get_manufacturer(void)
Get the sim7080 manufacturer.
int mdm_sim7080_power_on(void)
Power on the Sim7080.
const char * mdm_sim7080_get_revision(void)
Get the sim7080 revision.
int mdm_sim7080_read_sms(struct sim7080_sms_buffer *buffer)
Read sms from sim module.
#define SIM7080_SMS_MAX_LEN
Definition: simcom-sim7080.h:19
int mdm_sim7080_query_gnss(struct sim7080_gnss_data *data)
Query gnss position form the modem.
#define SIM7080_GNSS_DATA_UTC_LEN
Definition: simcom-sim7080.h:18
int mdm_sim7080_start_network(void)
Starts the modem in network operation mode.
int mdm_sim7080_delete_sms(uint16_t index)
Delete a sms at a given index.
__INT32_TYPE__ int32_t
Definition: stdint.h:74
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Definition: simcom-sim7080.h:21
int32_t lon
Longitude in 10^-7 degree.
Definition: simcom-sim7080.h:41
int32_t lat
Latitude in 10^-7 degree.
Definition: simcom-sim7080.h:37
uint16_t kmh
Speed in 10^-1 km/h.
Definition: simcom-sim7080.h:57
uint16_t cog
Course over ground un 10^-2 degree.
Definition: simcom-sim7080.h:53
bool fix_status
Whether fix is acquired or not.
Definition: simcom-sim7080.h:29
char utc[20]
UTC in format yyyyMMddhhmmss.sss.
Definition: simcom-sim7080.h:33
int32_t alt
Altitude in mm.
Definition: simcom-sim7080.h:45
bool run_status
Whether gnss is powered or not.
Definition: simcom-sim7080.h:25
uint16_t hdop
Horizontal dilution of precision in 10^-2.
Definition: simcom-sim7080.h:49
Buffer structure for sms reads.
Definition: simcom-sim7080.h:114
uint8_t nsms
Definition: simcom-sim7080.h:118
struct sim7080_sms * sms
Definition: simcom-sim7080.h:116
Buffer structure for sms.
Definition: simcom-sim7080.h:86
struct sim7080_sms::@188 time
uint8_t day
Definition: simcom-sim7080.h:99
uint8_t second
Definition: simcom-sim7080.h:102
uint8_t month
Definition: simcom-sim7080.h:98
uint8_t minute
Definition: simcom-sim7080.h:101
char data[160+1]
Definition: simcom-sim7080.h:106
uint8_t first_octet
Definition: simcom-sim7080.h:88
enum sim7080_sms_stat stat
Definition: simcom-sim7080.h:92
uint8_t tp_pid
Definition: simcom-sim7080.h:90
uint16_t index
Definition: simcom-sim7080.h:94
uint8_t timezone
Definition: simcom-sim7080.h:103
uint8_t hour
Definition: simcom-sim7080.h:100
uint8_t data_len
Definition: simcom-sim7080.h:108
uint8_t year
Definition: simcom-sim7080.h:97