IoT::MobileConnection

class MobileConnectionService

File Information

Library: IoT/MobileConnection
Package: MobileConnection
Header: IoT/MobileConnection/MobileConnectionService.h

Description

The MobileConnectionService interface is used to configure and establish a mobile data connection.

Member Summary

Member Functions: authenticate, connectData, deviceName, disconnectData, enableRadio, enterPIN, getAPN, getPDPType, iccid, imei, imsi, isDataConnected, isRadioEnabled, lockSIM, networkOperator, phoneNumber, radioAccessTechnology, registrationStatus, setAPN, setPDPType, signalStrength, simState, unlockSIM

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < MobileConnectionService >;

Constructors

MobileConnectionService

MobileConnectionService();

Destructor

~MobileConnectionService virtual

virtual ~MobileConnectionService();

Destroys the MobileConnectionService.

Member Functions

authenticate virtual

virtual void authenticate(
    AuthMethod method,
    const std::string & username,
    const std::string & password
) = 0;

Provide the credentials for the mobile data connection.

connectData virtual

virtual void connectData() = 0;

Establishes the data connection.

deviceName virtual

virtual std::string deviceName() const = 0;

Returns the modem device name.

disconnectData virtual

virtual void disconnectData() = 0;

Closes the data connection.

enableRadio virtual

virtual void enableRadio(
    bool enable
) = 0;

Enables or disables the radio.

enterPIN virtual

virtual void enterPIN(
    const std::string & pin
) = 0;

Provides the given PIN to the SIM.

getAPN virtual

virtual std::string getAPN() const = 0;

Returns the configured Access Point Name (APN) for the mobile data connection.

getPDPType virtual

virtual PDPType getPDPType() const = 0;

Returns the PDP Type for the mobile data connection.

iccid virtual

virtual std::string iccid() const = 0;

Returns the SIMs ICCID (Integrated Circuit Card Identifier).

imei virtual

virtual std::string imei() const = 0;

Returns the IMEI (International Mobile Equipment Identity).

imsi virtual

virtual std::string imsi() const = 0;

Returns the SIM's IMSI (International Mobile Subscriber Identity).

isDataConnected virtual

virtual bool isDataConnected() = 0;

Returns true if the data connection is available.

isRadioEnabled virtual

virtual bool isRadioEnabled() const = 0;

Returns true if the radio is enabled, otherwise false.

lockSIM virtual

virtual void lockSIM(
    const std::string & pin
) = 0;

Locks the SIM, using the given PIN.

networkOperator virtual

virtual std::string networkOperator() const = 0;

Returns the name of the network operator, if available, or an empty string otherwise.

phoneNumber virtual

virtual std::string phoneNumber() const = 0;

Returns the phone number associated with the SIM.

radioAccessTechnology virtual

virtual RadioAccessTechnology radioAccessTechnology() const = 0;

Returns the radio access technology (RAT) used to connect to the mobile network.

registrationStatus virtual

virtual RegistrationStatus registrationStatus() const = 0;

Returns the network registration status.

setAPN virtual

virtual void setAPN(
    const std::string & apn
) = 0;

Sets the Access Point Name (APN) for the mobile data connection.

setPDPType virtual

virtual void setPDPType(
    PDPType type
) = 0;

Sets the PDP Type for the mobile data connection.

signalStrength virtual

virtual int signalStrength() const = 0;

Returns the signal strength in a range from 0 to 5 (suitable for displaying corresponding "signal strength bars").

  • 0: No signal.
  • 1: Very weak signal.
  • 2: Weak signal strength.
  • 3: Good signal strength.
  • 4: Strong signal strength.
  • 5: Very strong signal strength.

Returns -1 if the signal strength cannot be obtained.

simState virtual

virtual SIMState simState() const = 0;

Returns the current state of the SIM.

unlockSIM virtual

virtual void unlockSIM(
    const std::string & pin
) = 0;

Unlocks the SIM, using the given PIN.

Variables

dataConnected

Poco::BasicEvent < void > dataConnected;

The data connection has become available.

dataDisconnected

Poco::BasicEvent < void > dataDisconnected;

The data connection no longer is available.

Securely control IoT edge devices from anywhere   Connect a Device