Mistake on this page?
Report an issue in GitHub or email us
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
AT_CellularInformation Class Reference

Class AT_CellularInformation. More...

#include <AT_CellularInformation.h>

Inheritance diagram for AT_CellularInformation:
CellularInformation AT_CellularBase

Public Types

Public Member Functions

virtual nsapi_error_t get_manufacturer (char *buf, size_t buf_size)
 Request manufacturer identification of cellular device. More...
 
virtual nsapi_error_t get_model (char *buf, size_t buf_size)
 Request model identification of cellular device. More...
 
virtual nsapi_error_t get_revision (char *buf, size_t buf_size)
 Request revision identification of cellular device. More...
 
virtual nsapi_error_t get_imsi (char *imsi, size_t buf_size)
 Get IMSI from the sim card. More...
 
virtual nsapi_error_t get_iccid (char *buf, size_t buf_size)
 Get serial number from the SIM card. More...
 
ATHandlerget_at_handler ()
 Getter for at handler. More...
 
device_err_t get_device_error () const
 Gets the device error that happened when using AT commands/responses. More...
 

Static Public Member Functions

static void set_cellular_properties (const intptr_t *property_array)
 Cellular module need to define an array of cellular properties which defines module supported property values. More...
 
static intptr_t get_property (CellularProperty key)
 Get value for the given key. More...
 

Protected Member Functions

nsapi_error_t get_info (const char *cmd, char *buf, size_t buf_size)
 Request information text from cellular device. More...
 

Detailed Description

Class AT_CellularInformation.

Class that provides information about cellular device.

Definition at line 31 of file AT_CellularInformation.h.

Member Enumeration Documentation

enum SerialNumberType
inherited

Request serial number identification of cellular device.

Parameters
bufserial number as zero terminated string
buf_sizemax length of serial number is 2048 characters
typeserial number type to read
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if buf is null or buf_size is zero NSAPI_ERROR_UNSUPPORTED if the modem does not support SerialNumberType NSAPI_ERROR_DEVICE_ERROR on other failures

Definition at line 89 of file CellularInformation.h.

Member Function Documentation

ATHandler& get_at_handler ( )
inherited

Getter for at handler.

Common method for all AT-classes.

Returns
reference to ATHandler
device_err_t get_device_error ( ) const
inherited

Gets the device error that happened when using AT commands/responses.

This is at error returned by the device. Returned CME/CMS errors can be found from 3gpp documents 27007 and 27005.

Returns
at error (CME/CMS) while communicating with the device
virtual nsapi_error_t get_iccid ( char *  buf,
size_t  buf_size 
)
virtual

Get serial number from the SIM card.

Parameters
bufSIM ICCID as zero terminated string
buf_sizemax length of SIM ICCID is MAX_ICCID_LENGTH
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if buf is null or buf_size is zero NSAPI_ERROR_DEVICE_ERROR on failure

Implements CellularInformation.

virtual nsapi_error_t get_imsi ( char *  imsi,
size_t  buf_size 
)
virtual

Get IMSI from the sim card.

Remarks
Given imsi buffer length must be 16 or more as imsi max length is 15!
Parameters
imsipreallocated char* which after successful request contains imsi
buf_sizesize of imsi buffer
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if imsi is null or buf_size is zero or buf_size is smaller than MAX_IMSI_LENGTH + 1 NSAPI_ERROR_DEVICE_ERROR on other failures

Implements CellularInformation.

nsapi_error_t get_info ( const char *  cmd,
char *  buf,
size_t  buf_size 
)
protected

Request information text from cellular device.

Parameters
cmd3gpp command string
bufbuffer for response
buf_sizebuffer size
Returns
on success read character count, on failure negative error code
virtual nsapi_error_t get_manufacturer ( char *  buf,
size_t  buf_size 
)
virtual

Request manufacturer identification of cellular device.

Parameters
bufmanufacturer identification as zero terminated string
buf_sizemax length of manufacturer identification is 2048 characters
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if buf is null or buf_size is zero NSAPI_ERROR_DEVICE_ERROR on failure

Implements CellularInformation.

virtual nsapi_error_t get_model ( char *  buf,
size_t  buf_size 
)
virtual

Request model identification of cellular device.

Parameters
bufmodel identification as zero terminated string
buf_sizemax length of model identification is 2048 characters
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if buf is null or buf_size is zero NSAPI_ERROR_DEVICE_ERROR on failure

Implements CellularInformation.

static intptr_t get_property ( CellularProperty  key)
staticinherited

Get value for the given key.

Parameters
keykey for value to be fetched
Returns
property value for the given key. Value type is defined in enum CellularProperty
virtual nsapi_error_t get_revision ( char *  buf,
size_t  buf_size 
)
virtual

Request revision identification of cellular device.

Parameters
bufrevision identification as zero terminated string
buf_sizemax length of revision identification is 2048 characters
Returns
NSAPI_ERROR_OK on success NSAPI_ERROR_PARAMETER if buf is null or buf_size is zero NSAPI_ERROR_DEVICE_ERROR on failure

Implements CellularInformation.

static void set_cellular_properties ( const intptr_t *  property_array)
staticinherited

Cellular module need to define an array of cellular properties which defines module supported property values.

Parameters
property_arrayarray of module properties
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.