Telematics SDK - Interface Specification  v1.26.8

Data Structures

class  telux::tel::IRemoteSimListener
 A listener class for getting remote SIM notifications. More...
 
class  telux::tel::IRemoteSimManager
 IRemoteSimManager provides APIs for remote SIM related operations. This allows a device to use a SIM card on another device for its WWAN modem functionality. The SIM provider service is the endpoint that interfaces with the SIM card (e.g. over bluetooth) and sends/receives data to the other endpoint, the modem. The modem sends requests to the SIM provider service to interact with the SIM card (e.g. power up, transmit APDU, etc.), and is notified of events (e.g. card errors, resets, etc.). This API is used by the SIM provider endpoint to provide a SIM card to the modem. More...
 

Enumerations

enum  telux::tel::CardErrorCause {
  telux::tel::CardErrorCause::INVALID = -1, telux::tel::CardErrorCause::UNKNOWN_ERROR = 0, telux::tel::CardErrorCause::NO_LINK_ESTABLISHED = 1, telux::tel::CardErrorCause::COMMAND_TIMEOUT = 2,
  telux::tel::CardErrorCause::POWER_DOWN = 3
}
 

Detailed Description

This section contains APIs related to Remote SIM operations.


Data Structure Documentation

class telux::tel::IRemoteSimListener

A listener class for getting remote SIM notifications.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onApduTransfer (const unsigned int id, const std::vector< uint8_t > &apdu)
 
virtual void onCardConnect ()
 
virtual void onCardDisconnect ()
 
virtual void onCardPowerUp ()
 
virtual void onCardPowerDown ()
 
virtual void onCardReset ()
 
virtual void onServiceStatusChange (const telux::common::ServiceStatus status)
 
virtual ~IRemoteSimListener ()
 

Constructor & Destructor Documentation

virtual telux::tel::IRemoteSimListener::~IRemoteSimListener ( )
virtual

Destructor of IRemoteSimListener

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Member Function Documentation

virtual void telux::tel::IRemoteSimListener::onApduTransfer ( const unsigned int  id,
const std::vector< uint8_t > &  apdu 
)
virtual

This function is called when the modem wants to transmit a command APDU.

Parameters
[in]idIdentifier for a command and response APDU pair
[in]apduAPDU request sent to the control point (max size = 261, per ETSI TS 102 221, section 10.1.4)
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onCardConnect ( )
virtual

This function is called when the modem wants to establish a connection.

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onCardDisconnect ( )
virtual

This function is called when the modem wants to tear down a connection.

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onCardPowerUp ( )
virtual

This function is called when the modem wants to power up the card.

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onCardPowerDown ( )
virtual

This function is called when the modem wants to power down the card.

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onCardReset ( )
virtual

This function is called when the modem wants to warm reset the card.

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual void telux::tel::IRemoteSimListener::onServiceStatusChange ( const telux::common::ServiceStatus  status)
virtual

This function is called when the modem service goes down or comes up.

Parameters
[in]statusService status
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
class telux::tel::IRemoteSimManager

IRemoteSimManager provides APIs for remote SIM related operations. This allows a device to use a SIM card on another device for its WWAN modem functionality. The SIM provider service is the endpoint that interfaces with the SIM card (e.g. over bluetooth) and sends/receives data to the other endpoint, the modem. The modem sends requests to the SIM provider service to interact with the SIM card (e.g. power up, transmit APDU, etc.), and is notified of events (e.g. card errors, resets, etc.). This API is used by the SIM provider endpoint to provide a SIM card to the modem.

Public Member Functions

virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status sendReset (telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendConnectionAvailable (telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendConnectionUnavailable (telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendCardReset (const std::vector< uint8_t > &atr, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendCardError (const CardErrorCause cause=CardErrorCause::INVALID, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendCardInserted (const std::vector< uint8_t > &atr, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendCardRemoved (telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendCardWakeup (telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status sendApdu (const unsigned int id, const std::vector< uint8_t > &apdu, const bool isSuccess=true, const unsigned int totalSize=0, const unsigned int offset=0, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IRemoteSimListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IRemoteSimListener > listener)=0
 
virtual int getSlotId ()=0
 
virtual ~IRemoteSimManager ()
 

Constructor & Destructor Documentation

virtual telux::tel::IRemoteSimManager::~IRemoteSimManager ( )
virtual

Destructor of IRemoteSimManager

Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Member Function Documentation

virtual bool telux::tel::IRemoteSimManager::isSubsystemReady ( )
pure virtual

Checks the status of remote SIM subsystem and returns the result.

Returns
True if remote SIM subsystem is ready for service otherwise false.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual std::future<bool> telux::tel::IRemoteSimManager::onSubsystemReady ( )
pure virtual

Wait for remote SIM subsystem to be ready.

Returns
A future that caller can wait on to be notified when remote SIM subsystem is ready.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendReset ( telux::common::ResponseCallback  callback = nullptr)
pure virtual

Send reset command to the modem to reset state variables.

Parameters
[out]callbackCallback function pointer to get the response of sendReset.
Returns
Status of sendReset i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendConnectionAvailable ( telux::common::ResponseCallback  callback = nullptr)
pure virtual

Send connection available event to the modem.

Parameters
[out]callbackCallback function pointer to get the response.
Returns
Status of sendConnectionAvailable i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendConnectionUnavailable ( telux::common::ResponseCallback  callback = nullptr)
pure virtual

Send connection unavailable event to the modem.

Parameters
[out]callbackCallback function pointer to get the response.
Returns
Status of sendConnectionUnavailable i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendCardReset ( const std::vector< uint8_t > &  atr,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Send card reset event to the modem.

Parameters
[in]atrAnswer to Reset bytes (max size = 32, per ISO/IEC 7816-3:2006 section 8.1).
[out]callbackCallback function pointer to get the response of sendCardReset.
Returns
Status of sendCardReset i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendCardError ( const CardErrorCause  cause = CardErrorCause::INVALID,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Send card error event to the modem.

Parameters
[in]causeCard Error cause.
[out]callbackCallback function pointer to get the response of sendCardError.
Returns
Status of sendCardError i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendCardInserted ( const std::vector< uint8_t > &  atr,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Send card inserted event to the modem.

Parameters
[in]atrAnswer to Reset bytes (max size = 32, per ISO/IEC 7816-3:2006 section 8.1).
[out]callbackCallback function pointer to get the response of sendCardInserted.
Returns
Status of sendCardInserted i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendCardRemoved ( telux::common::ResponseCallback  callback = nullptr)
pure virtual

Send card removed event to the modem.

Parameters
[out]callbackCallback function pointer to get the response of sendCardRemoved.
Returns
Status of sendCardRemoved i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendCardWakeup ( telux::common::ResponseCallback  callback = nullptr)
pure virtual

Send card wakeup event to the modem.

Parameters
[out]callbackCallback function pointer to get the response of sendCardWakeup.
Returns
Status of sendCardWakeup i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::sendApdu ( const unsigned int  id,
const std::vector< uint8_t > &  apdu,
const bool  isSuccess = true,
const unsigned int  totalSize = 0,
const unsigned int  offset = 0,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Sends an APDU message to the modem, in response to a previous APDU sent by the modem.

Parameters
[in]idIdentifier for command and response APDU pair.
[in]apduResponse APDU (max size = 1024).
[in]isSuccessWhether APDU transaction completed successfully.
[in]totalSizeTotal length of the APDU message (used when the response is larger than 1024 bytes and must be passed in multiple segments).
[in]offsetOffset of this APDU segment in the original message.
[out]callbackCallback function pointer to get the response of sendApdu.
Returns
Status of sendApdu i.e. success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::registerListener ( std::weak_ptr< IRemoteSimListener listener)
pure virtual

Register a listener for specific updates from the modem.

Parameters
[in]listenerPointer of IRemoteSimListener object that processes the notification
Returns
Status of registerListener i.e success or suitable status code.
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual telux::common::Status telux::tel::IRemoteSimManager::deregisterListener ( std::weak_ptr< IRemoteSimListener listener)
pure virtual

Deregister the previously added listener.

Parameters
[in]listenerPreviously registered IRemoteSimListener that needs to be deregistered
Returns
Status of deregisterListener success or suitable status code
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual int telux::tel::IRemoteSimManager::getSlotId ( )
pure virtual

Get associated slot ID for the RemoteSimManager

Returns
The slot ID associated with this IRemoteSimManager
Note
Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.

Enumeration Type Documentation

Defines the card error cause, sent to the modem by the SIM provider

Enumerator
INVALID 

Card error cause value will not be passed to modem

UNKNOWN_ERROR 

Unknown error

NO_LINK_ESTABLISHED 

No link was established

COMMAND_TIMEOUT 

Command timeout

POWER_DOWN 

Error due to a card power down