Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
HL7800 modem public API header file. More...
#include <zephyr/types.h>
Go to the source code of this file.
Data Structures | |
struct | mdm_hl7800_apn |
struct | mdm_hl7800_site_survey |
struct | mdm_hl7800_compound_event |
struct | mdm_hl7800_polte_registration_event_data |
struct | mdm_hl7800_polte_location_data |
Typedefs | |
typedef void(* | mdm_hl7800_event_callback_t) (enum mdm_hl7800_event event, void *event_data) |
Functions | |
int32_t | mdm_hl7800_power_off (void) |
Power off the HL7800. More... | |
int32_t | mdm_hl7800_reset (void) |
Reset the HL7800 (and allow it to reconfigure). More... | |
void | mdm_hl7800_wakeup (bool awake) |
Control the wake signals to the HL7800. More... | |
int32_t | mdm_hl7800_send_at_cmd (const uint8_t *data) |
Send an AT command to the HL7800. More... | |
void | mdm_hl7800_get_signal_quality (int *rsrp, int *sinr) |
Get the signal quality of the HL7800. More... | |
char * | mdm_hl7800_get_iccid (void) |
Get the SIM card ICCID. More... | |
char * | mdm_hl7800_get_sn (void) |
Get the HL7800 serial number. More... | |
char * | mdm_hl7800_get_imei (void) |
Get the HL7800 IMEI. More... | |
char * | mdm_hl7800_get_fw_version (void) |
Get the HL7800 firmware version. More... | |
char * | mdm_hl7800_get_imsi (void) |
Get the IMSI. More... | |
int32_t | mdm_hl7800_update_apn (char *access_point_name) |
Update the Access Point Name in the modem. More... | |
int32_t | mdm_hl7800_update_rat (enum mdm_hl7800_radio_mode value) |
Update the Radio Access Technology (mode). More... | |
bool | mdm_hl7800_valid_rat (uint8_t value) |
void | mdm_hl7800_register_event_callback (mdm_hl7800_event_callback_t cb) |
Register a function that is called when a modem event occurs. More... | |
void | mdm_hl7800_generate_status_events (void) |
Force modem module to generate status events. More... | |
int32_t | mdm_hl7800_get_operator_index (void) |
Read the operator index from the modem. More... | |
int32_t | mdm_hl7800_get_functionality (void) |
Get modem functionality. More... | |
int32_t | mdm_hl7800_set_functionality (enum mdm_hl7800_functionality mode) |
Set airplane, normal, or reduced functionality mode. Airplane mode persists when reset. More... | |
int32_t | mdm_hl7800_set_gps_rate (uint32_t rate) |
When rate is non-zero: Put modem into Airplane mode. Enable GPS and generate HL7800_EVENT_GPS events. When zero: Disable GPS and put modem into normal mode. More... | |
int32_t | mdm_hl7800_polte_register (void) |
Register modem/SIM with polte.io. More... | |
int32_t | mdm_hl7800_polte_enable (char *user, char *password) |
Enable PoLTE. More... | |
int32_t | mdm_hl7800_polte_locate (void) |
Locate device using PoLTE. More... | |
int32_t | mdm_hl7800_perform_site_survey (void) |
Perform a site survey. This command may return different values each time it is run (depending on what is in range). More... | |
HL7800 modem public API header file.
Allows an application to control the HL7800 modem.
Copyright (c) 2020 Laird Connectivity
SPDX-License-Identifier: Apache-2.0
#define MDM_HL7800_APN_CMD_MAX_SIZE |
#define MDM_HL7800_APN_CMD_MAX_STRLEN (MDM_HL7800_APN_CMD_MAX_SIZE - 1) |
#define MDM_HL7800_APN_MAX_SIZE 64 |
#define MDM_HL7800_APN_MAX_STRLEN (MDM_HL7800_APN_MAX_SIZE - 1) |
#define MDM_HL7800_APN_PASSWORD_MAX_SIZE 65 |
#define MDM_HL7800_APN_PASSWORD_MAX_STRLEN (MDM_HL7800_APN_PASSWORD_MAX_SIZE - 1) |
#define MDM_HL7800_APN_USERNAME_MAX_SIZE 65 |
#define MDM_HL7800_APN_USERNAME_MAX_STRLEN (MDM_HL7800_APN_USERNAME_MAX_SIZE - 1) |
#define MDM_HL7800_ICCID_SIZE 21 |
#define MDM_HL7800_ICCID_STRLEN (MDM_HL7800_ICCID_SIZE - 1) |
#define MDM_HL7800_IMEI_SIZE 16 |
#define MDM_HL7800_IMEI_STRLEN (MDM_HL7800_IMEI_SIZE - 1) |
#define MDM_HL7800_IMSI_MAX_STR_SIZE 16 |
#define MDM_HL7800_IMSI_MAX_STRLEN (MDM_HL7800_IMSI_MAX_STR_SIZE - 1) |
#define MDM_HL7800_IMSI_MIN_STR_SIZE 15 |
#define MDM_HL7800_LTE_BAND_STR_SIZE 21 |
#define MDM_HL7800_LTE_BAND_STRLEN (MDM_HL7800_LTE_BAND_STR_SIZE - 1) |
#define MDM_HL7800_MAX_GPS_STR_SIZE 33 |
#define MDM_HL7800_MAX_POLTE_LOCATION_STR_SIZE 33 |
#define MDM_HL7800_MAX_POLTE_PASSWORD_SIZE 16 |
#define MDM_HL7800_MAX_POLTE_USER_ID_SIZE 16 |
#define MDM_HL7800_MODEM_FUNCTIONALITY_SIZE 2 |
#define MDM_HL7800_MODEM_FUNCTIONALITY_STRLEN (MDM_HL7800_MODEM_FUNCTIONALITY_SIZE - 1) |
#define MDM_HL7800_OPERATOR_INDEX_SIZE 3 |
#define MDM_HL7800_OPERATOR_INDEX_STRLEN (MDM_HL7800_OPERATOR_INDEX_SIZE - 1) |
#define MDM_HL7800_POLTE_SERVER_ERROR 10 |
#define MDM_HL7800_REVISION_MAX_SIZE 29 |
#define MDM_HL7800_REVISION_MAX_STRLEN (MDM_HL7800_REVISION_MAX_SIZE - 1) |
#define MDM_HL7800_SERIAL_NUMBER_SIZE 15 |
#define MDM_HL7800_SERIAL_NUMBER_STRLEN (MDM_HL7800_SERIAL_NUMBER_SIZE - 1) |
#define MDM_HL7800_SET_POLTE_USER_AND_PASSWORD_FMT_STR "AT%%POLTECMD=\"SERVERAUTH\",\"%s\",\"%s\"" |
typedef void(* mdm_hl7800_event_callback_t) (enum mdm_hl7800_event event, void *event_data) |
event - The type of event event_data - Pointer to event specific data structure HL7800_EVENT_NETWORK_STATE_CHANGE - compound event HL7800_EVENT_APN_UPDATE - struct mdm_hl7800_apn HL7800_EVENT_RSSI - int HL7800_EVENT_SINR - int HL7800_EVENT_STARTUP_STATE_CHANGE - compound event HL7800_EVENT_SLEEP_STATE_CHANGE - compound event HL7800_EVENT_RAT - int HL7800_EVENT_BANDS - string HL7800_EVENT_ACTIVE_BANDS - string HL7800_EVENT_FOTA_STATE - compound event HL7800_EVENT_FOTA_COUNT - uint32_t HL7800_EVENT_REVISION - string HL7800_EVENT_GPS - compound event HL7800_EVENT_GPS_POSITION_STATUS int HL7800_EVENT_POLTE_REGISTRATION mdm_hl7800_polte_registration_event_data HL7800_EVENT_POLTE mdm_hl7800_polte_location_data HL7800_EVENT_POLTE_LOCATE_STATUS int HL7800_EVENT_SITE_SURVEY mdm_hl7800_site_survey
enum mdm_hl7800_event |
Force modem module to generate status events.
Get modem functionality.
char * mdm_hl7800_get_fw_version | ( | void | ) |
Get the HL7800 firmware version.
char * mdm_hl7800_get_iccid | ( | void | ) |
Get the SIM card ICCID.
char * mdm_hl7800_get_imei | ( | void | ) |
Get the HL7800 IMEI.
char * mdm_hl7800_get_imsi | ( | void | ) |
Get the IMSI.
Read the operator index from the modem.
negative | error code, 0 on success |
void mdm_hl7800_get_signal_quality | ( | int * | rsrp, |
int * | sinr | ||
) |
Get the signal quality of the HL7800.
rsrp | Reference Signals Received Power (dBm) Range = -140 dBm to -44 dBm |
sinr | Signal to Interference plus Noise Ratio (dBm) Range = -128 dBm to 40dBm |
char * mdm_hl7800_get_sn | ( | void | ) |
Get the HL7800 serial number.
Perform a site survey. This command may return different values each time it is run (depending on what is in range).
HL7800_EVENT_SITE_SURVEY is generated for each response received from modem.
negative | error code, 0 on success |
int32_t mdm_hl7800_polte_enable | ( | char * | user, |
char * | password | ||
) |
Enable PoLTE.
user | from polte.io or register command callback |
password | from polte.io register command callback |
Locate device using PoLTE.
Register modem/SIM with polte.io.
void mdm_hl7800_register_event_callback | ( | mdm_hl7800_event_callback_t | cb | ) |
Register a function that is called when a modem event occurs.
cb | event callback |
Reset the HL7800 (and allow it to reconfigure).
Send an AT command to the HL7800.
data | AT command string |
int32_t mdm_hl7800_set_functionality | ( | enum mdm_hl7800_functionality | mode | ) |
Set airplane, normal, or reduced functionality mode. Airplane mode persists when reset.
mode |
When rate is non-zero: Put modem into Airplane mode. Enable GPS and generate HL7800_EVENT_GPS events. When zero: Disable GPS and put modem into normal mode.
rate | in seconds to query location |
int32_t mdm_hl7800_update_apn | ( | char * | access_point_name | ) |
Update the Access Point Name in the modem.
0 | on success, negative on failure. |
int32_t mdm_hl7800_update_rat | ( | enum mdm_hl7800_radio_mode | value | ) |
Update the Radio Access Technology (mode).
0 | on success, negative on failure. |