Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Cellular interface. More...
Data Structures | |
struct | cellular_network |
Cellular network structure. More... | |
struct | cellular_driver_api |
Cellular driver API. More... | |
Typedefs | |
typedef int(* | cellular_api_configure_networks) (const struct device *dev, const struct cellular_network *networks, uint8_t size) |
API for configuring networks. | |
typedef int(* | cellular_api_get_supported_networks) (const struct device *dev, const struct cellular_network **networks, uint8_t *size) |
API for getting supported networks. | |
typedef int(* | cellular_api_get_signal) (const struct device *dev, const enum cellular_signal_type type, int16_t *value) |
API for getting network signal strength. | |
typedef int(* | cellular_api_get_modem_info) (const struct device *dev, const enum cellular_modem_info_type type, char *info, size_t size) |
API for getting modem information. | |
typedef int(* | cellular_api_get_registration_status) (const struct device *dev, enum cellular_access_technology tech, enum cellular_registration_status *status) |
API for getting registration status. | |
Functions | |
static int | cellular_configure_networks (const struct device *dev, const struct cellular_network *networks, uint8_t size) |
Configure cellular networks for the device. | |
static int | cellular_get_supported_networks (const struct device *dev, const struct cellular_network **networks, uint8_t *size) |
Get supported cellular networks for the device. | |
static int | cellular_get_signal (const struct device *dev, const enum cellular_signal_type type, int16_t *value) |
Get signal for the device. | |
static int | cellular_get_modem_info (const struct device *dev, const enum cellular_modem_info_type type, char *info, size_t size) |
Get modem info for the device. | |
static int | cellular_get_registration_status (const struct device *dev, enum cellular_access_technology tech, enum cellular_registration_status *status) |
Get network registration status for the device. | |
Cellular interface.
typedef int(* cellular_api_configure_networks) (const struct device *dev, const struct cellular_network *networks, uint8_t size) |
#include <zephyr/drivers/cellular.h>
API for configuring networks.
typedef int(* cellular_api_get_modem_info) (const struct device *dev, const enum cellular_modem_info_type type, char *info, size_t size) |
#include <zephyr/drivers/cellular.h>
API for getting modem information.
typedef int(* cellular_api_get_registration_status) (const struct device *dev, enum cellular_access_technology tech, enum cellular_registration_status *status) |
#include <zephyr/drivers/cellular.h>
API for getting registration status.
typedef int(* cellular_api_get_signal) (const struct device *dev, const enum cellular_signal_type type, int16_t *value) |
#include <zephyr/drivers/cellular.h>
API for getting network signal strength.
typedef int(* cellular_api_get_supported_networks) (const struct device *dev, const struct cellular_network **networks, uint8_t *size) |
#include <zephyr/drivers/cellular.h>
API for getting supported networks.
#include <zephyr/drivers/cellular.h>
Cellular access technologies.
#include <zephyr/drivers/cellular.h>
Cellular modem info type.
#include <zephyr/drivers/cellular.h>
enum cellular_signal_type |
#include <zephyr/drivers/cellular.h>
Cellular signal type.
Enumerator | |
---|---|
CELLULAR_SIGNAL_RSSI | |
CELLULAR_SIGNAL_RSRP | |
CELLULAR_SIGNAL_RSRQ |
|
inlinestatic |
#include <zephyr/drivers/cellular.h>
Configure cellular networks for the device.
Cellular network devices support at least one cellular access technology. Each cellular access technology defines a set of bands, of which the cellular device will support all or a subset of.
The cellular device can only use one cellular network technology at a time. It must exclusively use the cellular network configurations provided, and will prioritize the cellular network configurations in the order they are provided in case there are multiple (the first cellular network configuration has the highest priority).
dev | Cellular network device instance. |
networks | List of cellular network configurations to apply. |
size | Size of list of cellular network configurations. |
0 | if successful. |
-EINVAL | if any provided cellular network configuration is invalid or unsupported. |
-ENOTSUP | if API is not supported by cellular network device. |
Negative | errno-code otherwise. |
|
inlinestatic |
#include <zephyr/drivers/cellular.h>
Get modem info for the device.
dev | Cellular network device instance |
type | Type of the modem info requested |
info | Info string destination |
size | Info string size |
0 | if successful. |
-ENOTSUP | if API is not supported by cellular network device. |
-ENODATA | if modem does not provide info requested |
Negative | errno-code from chat module otherwise. |
|
inlinestatic |
#include <zephyr/drivers/cellular.h>
Get network registration status for the device.
dev | Cellular network device instance |
tech | Which access technology to get status for |
status | Registration status for given access technology |
0 | if successful. |
-ENOSYS | if API is not supported by cellular network device. |
-ENODATA | if modem does not provide info requested |
Negative | errno-code from chat module otherwise. |
|
inlinestatic |
#include <zephyr/drivers/cellular.h>
Get signal for the device.
dev | Cellular network device instance |
type | Type of the signal information requested |
value | Signal strength destination (one of RSSI, RSRP, RSRQ) |
0 | if successful. |
-ENOTSUP | if API is not supported by cellular network device. |
-ENODATA | if device is not in a state where signal can be polled |
Negative | errno-code otherwise. |
|
inlinestatic |
#include <zephyr/drivers/cellular.h>
Get supported cellular networks for the device.
dev | Cellular network device instance |
networks | Pointer to list of supported cellular network configurations. |
size | Size of list of cellular network configurations. |
0 | if successful. |
-ENOTSUP | if API is not supported by cellular network device. |
Negative | errno-code otherwise. |