Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Cellular Interface

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.
 

Enumerations

enum  cellular_access_technology {
  CELLULAR_ACCESS_TECHNOLOGY_GSM = 0 , CELLULAR_ACCESS_TECHNOLOGY_GPRS , CELLULAR_ACCESS_TECHNOLOGY_UMTS , CELLULAR_ACCESS_TECHNOLOGY_EDGE ,
  CELLULAR_ACCESS_TECHNOLOGY_LTE , CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M1 , CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M2 , CELLULAR_ACCESS_TECHNOLOGY_NB_IOT
}
 Cellular access technologies. More...
 
enum  cellular_signal_type { CELLULAR_SIGNAL_RSSI , CELLULAR_SIGNAL_RSRP , CELLULAR_SIGNAL_RSRQ }
 Cellular signal type. More...
 
enum  cellular_modem_info_type {
  CELLULAR_MODEM_INFO_IMEI , CELLULAR_MODEM_INFO_MODEL_ID , CELLULAR_MODEM_INFO_MANUFACTURER , CELLULAR_MODEM_INFO_FW_VERSION ,
  CELLULAR_MODEM_INFO_SIM_IMSI , CELLULAR_MODEM_INFO_SIM_ICCID
}
 Cellular modem info type. More...
 
enum  cellular_registration_status {
  CELLULAR_REGISTRATION_NOT_REGISTERED = 0 , CELLULAR_REGISTRATION_REGISTERED_HOME , CELLULAR_REGISTRATION_SEARCHING , CELLULAR_REGISTRATION_DENIED ,
  CELLULAR_REGISTRATION_UNKNOWN , CELLULAR_REGISTRATION_REGISTERED_ROAMING
}
 

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.
 

Detailed Description

Cellular interface.

Typedef Documentation

◆ cellular_api_configure_networks

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.

◆ cellular_api_get_modem_info

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.

◆ cellular_api_get_registration_status

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.

◆ cellular_api_get_signal

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.

◆ cellular_api_get_supported_networks

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.

Enumeration Type Documentation

◆ cellular_access_technology

#include <zephyr/drivers/cellular.h>

Cellular access technologies.

Enumerator
CELLULAR_ACCESS_TECHNOLOGY_GSM 
CELLULAR_ACCESS_TECHNOLOGY_GPRS 
CELLULAR_ACCESS_TECHNOLOGY_UMTS 
CELLULAR_ACCESS_TECHNOLOGY_EDGE 
CELLULAR_ACCESS_TECHNOLOGY_LTE 
CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M1 
CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M2 
CELLULAR_ACCESS_TECHNOLOGY_NB_IOT 

◆ cellular_modem_info_type

#include <zephyr/drivers/cellular.h>

Cellular modem info type.

Enumerator
CELLULAR_MODEM_INFO_IMEI 

International Mobile Equipment Identity.

CELLULAR_MODEM_INFO_MODEL_ID 

Modem model ID.

CELLULAR_MODEM_INFO_MANUFACTURER 

Modem manufacturer.

CELLULAR_MODEM_INFO_FW_VERSION 

Modem fw version.

CELLULAR_MODEM_INFO_SIM_IMSI 

International Mobile Subscriber Identity.

CELLULAR_MODEM_INFO_SIM_ICCID 

Integrated Circuit Card Identification Number (SIM)

◆ cellular_registration_status

#include <zephyr/drivers/cellular.h>

Enumerator
CELLULAR_REGISTRATION_NOT_REGISTERED 
CELLULAR_REGISTRATION_REGISTERED_HOME 
CELLULAR_REGISTRATION_SEARCHING 
CELLULAR_REGISTRATION_DENIED 
CELLULAR_REGISTRATION_UNKNOWN 
CELLULAR_REGISTRATION_REGISTERED_ROAMING 

◆ cellular_signal_type

#include <zephyr/drivers/cellular.h>

Cellular signal type.

Enumerator
CELLULAR_SIGNAL_RSSI 
CELLULAR_SIGNAL_RSRP 
CELLULAR_SIGNAL_RSRQ 

Function Documentation

◆ cellular_configure_networks()

static int cellular_configure_networks ( const struct device dev,
const struct cellular_network networks,
uint8_t  size 
)
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).

Parameters
devCellular network device instance.
networksList of cellular network configurations to apply.
sizeSize of list of cellular network configurations.
Return values
0if successful.
-EINVALif any provided cellular network configuration is invalid or unsupported.
-ENOTSUPif API is not supported by cellular network device.
Negativeerrno-code otherwise.

◆ cellular_get_modem_info()

static int cellular_get_modem_info ( const struct device dev,
const enum cellular_modem_info_type  type,
char *  info,
size_t  size 
)
inlinestatic

#include <zephyr/drivers/cellular.h>

Get modem info for the device.

Parameters
devCellular network device instance
typeType of the modem info requested
infoInfo string destination
sizeInfo string size
Return values
0if successful.
-ENOTSUPif API is not supported by cellular network device.
-ENODATAif modem does not provide info requested
Negativeerrno-code from chat module otherwise.

◆ cellular_get_registration_status()

static int cellular_get_registration_status ( const struct device dev,
enum cellular_access_technology  tech,
enum cellular_registration_status status 
)
inlinestatic

#include <zephyr/drivers/cellular.h>

Get network registration status for the device.

Parameters
devCellular network device instance
techWhich access technology to get status for
statusRegistration status for given access technology
Return values
0if successful.
-ENOSYSif API is not supported by cellular network device.
-ENODATAif modem does not provide info requested
Negativeerrno-code from chat module otherwise.

◆ cellular_get_signal()

static int cellular_get_signal ( const struct device dev,
const enum cellular_signal_type  type,
int16_t value 
)
inlinestatic

#include <zephyr/drivers/cellular.h>

Get signal for the device.

Parameters
devCellular network device instance
typeType of the signal information requested
valueSignal strength destination (one of RSSI, RSRP, RSRQ)
Return values
0if successful.
-ENOTSUPif API is not supported by cellular network device.
-ENODATAif device is not in a state where signal can be polled
Negativeerrno-code otherwise.

◆ cellular_get_supported_networks()

static int cellular_get_supported_networks ( const struct device dev,
const struct cellular_network **  networks,
uint8_t size 
)
inlinestatic

#include <zephyr/drivers/cellular.h>

Get supported cellular networks for the device.

Parameters
devCellular network device instance
networksPointer to list of supported cellular network configurations.
sizeSize of list of cellular network configurations.
Return values
0if successful.
-ENOTSUPif API is not supported by cellular network device.
Negativeerrno-code otherwise.