Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Cellular

Data Structures

class  CellularContext
 CellularContext is CellularInterface/NetworkInterface with extensions for cellular connectivity. More...
class  CellularDevice
 Class CellularDevice. More...
class  CellularInformation
 Class CellularInformation. More...
class  CellularNetwork
 An abstract interface for connecting to a network and getting information from it. More...
class  CellularSMS
 Class CellularSMS. More...
class  CellularInterface
 Common interface that is shared between cellular interfaces. More...
class  ControlPlane_netif
 Implements support for data transfer using Control Plane CIoT EPS optimization specified in 3GPP 23.401(4.10), 3GPP 23.682(4.5.14). More...

Functions

virtual void set_credentials (const char *apn, const char *uname=0, const char *pwd=0)=0
 Set the cellular network credentials.
virtual void set_plmn (const char *plmn)=0
 Set the plmn.
virtual void set_sim_pin (const char *sim_pin)=0
 Set the PIN code for SIM card.
virtual nsapi_error_t connect (const char *sim_pin, const char *apn=0, const char *uname=0, const char *pwd=0)=0
 Attempt to connect to a cellular network with a PIN and credentials.
virtual nsapi_error_t connect ()=0
 Attempt to connect to a cellular network.
virtual nsapi_error_t disconnect ()=0
 Stop the interface.
virtual bool is_connected ()=0
 Check if the connection is currently established.
virtual nsapi_error_t get_ip_address (SocketAddress *address)=0
virtual nsapi_error_t get_netmask (SocketAddress *address)=0
virtual nsapi_error_t get_gateway (SocketAddress *address)=0
virtual CellularInterfacecellularInterface ()
static CellularInterfaceget_target_default_instance ()
 Get the target's default cellular interface.
virtual void set_default_parameters ()
 Set default parameters on a cellular interface.

Function Documentation

virtual CellularInterface* cellularInterface (  ) [virtual, inherited]

Return pointer to a CellularInterface.

Returns:
Pointer to requested interface type or NULL if this class doesn't implement the interface.

Reimplemented from NetworkInterface.

Definition at line 118 of file CellularInterface.h.

virtual nsapi_error_t connect (  ) [pure virtual, inherited]

Attempt to connect to a cellular network.

If the SIM requires a PIN, and it is invalid or not set, NSAPI_ERROR_AUTH_ERROR is returned.

Returns:
NSAPI_ERROR_OK on success, or negative error code on failure.

Implements NetworkInterface.

Implemented in CellularContext.

virtual nsapi_error_t connect ( const char *  sim_pin,
const char *  apn = 0,
const char *  uname = 0,
const char *  pwd = 0 
) [pure virtual, inherited]

Attempt to connect to a cellular network with a PIN and credentials.

Parameters:
sim_pinPIN for the SIM card.
apnAccess point name (optional).
unameUsername (optional).
pwdPassword (optional).
Returns:
NSAPI_ERROR_OK on success, or negative error code on failure.

Implemented in CellularContext.

virtual nsapi_error_t disconnect (  ) [pure virtual, inherited]

Stop the interface.

Returns:
NSAPI_ERROR_OK on success, or error code on failure.

Implements NetworkInterface.

Implemented in CellularContext.

virtual nsapi_error_t get_gateway ( SocketAddress address ) [pure virtual, inherited]

Get the local gateway.

Parameters:
addressSocketAddress representation of gateway address
Return values:
NSAPI_ERROR_OKon success
NSAPI_ERROR_UNSUPPORTEDif this feature is not supported
NSAPI_ERROR_PARAMETERif the provided pointer is invalid
NSAPI_ERROR_NO_ADDRESSif the address cannot be obtained from stack

Reimplemented from NetworkInterface.

Implemented in CellularContext.

virtual nsapi_error_t get_ip_address ( SocketAddress address ) [pure virtual, inherited]

Get the local IP address.

Parameters:
addressSocketAddress representation of the local IP address
Return values:
NSAPI_ERROR_OKon success
NSAPI_ERROR_UNSUPPORTEDif this feature is not supported
NSAPI_ERROR_PARAMETERif the provided pointer is invalid
NSAPI_ERROR_NO_ADDRESSif the address cannot be obtained from stack

Reimplemented from NetworkInterface.

Implemented in CellularContext.

virtual nsapi_error_t get_netmask ( SocketAddress address ) [pure virtual, inherited]

Get the local network mask.

Parameters:
addressSocketAddress representation of netmask
Return values:
NSAPI_ERROR_OKon success
NSAPI_ERROR_UNSUPPORTEDif this feature is not supported
NSAPI_ERROR_PARAMETERif the provided pointer is invalid
NSAPI_ERROR_NO_ADDRESSif the address cannot be obtained from stack

Reimplemented from NetworkInterface.

Implemented in CellularContext.

MBED_WEAK CellularInterface * get_target_default_instance (  ) [static, protected, inherited]

Get the target's default cellular interface.

This is provided as a weak method so targets can override. The default implementation configures and returns the OnBoardModemInterface, if available.

Returns:
Pointer to interface, if any.

Reimplemented from NetworkInterface.

Definition at line 21 of file CellularContext.cpp.

virtual bool is_connected (  ) [pure virtual, inherited]

Check if the connection is currently established.

Returns:
`true` if the cellular module have successfully acquired a carrier and is connected to an external packet data network using PPP, `false` otherwise.

Implemented in CellularContext.

virtual void set_credentials ( const char *  apn,
const char *  uname = 0,
const char *  pwd = 0 
) [pure virtual, inherited]

Set the cellular network credentials.

Please check documentation of connect() for default behavior of APN settings.

Parameters:
apnAccess point name.
unameUsername (optional).
pwdPassword (optional).

Implemented in CellularContext.

void set_default_parameters (  ) [virtual, inherited]

Set default parameters on a cellular interface.

A cellular interface instantiated directly or using CellularInterface::get_default_instance() is initially unconfigured. This call can be used to set the default parameters that would have been set if the interface had been requested using NetworkInterface::get_default_instance() (see nsapi JSON configuration).

Reimplemented from NetworkInterface.

Definition at line 90 of file NetworkInterfaceDefaults.cpp.

virtual void set_plmn ( const char *  plmn ) [pure virtual, inherited]

Set the plmn.

PLMN controls to what network device registers.

Parameters:
plmnuser to force what network to register.

Implemented in CellularContext.

virtual void set_sim_pin ( const char *  sim_pin ) [pure virtual, inherited]

Set the PIN code for SIM card.

Parameters:
sim_pinPIN for the SIM card.

Implemented in CellularContext.