Radio interface layer in a cell phone with a set of APIs having a hardware-independent proxy layer and a hardware-specific driver layer6826762Abstract A Radio Interface Layer (RIL) is disclosed. The RIL comprises an API set which provides a level of abstraction between the radio on a cell phone and the software of the cell phone. The API set of RIL is roughly based on the GSM AT interface as defined in GSM specifications 07.05 and 07.07. The API set provides access to functionality contained within a cellular telephone, such as a GSM or CDMA compatible telephone. These APIs allow applications running on an operating system in the cellular telephone to issue commands without knowledge of the underlying radio structure of the cellular telephone and specific knowledge of the GSM-type commands. For example, these APIs allow the applications to access to phonebook entries, restrict access to data and functionality using passwords, access file and message storage, and perform many other functions. The RIL is divided into a hardware-independent proxy layer, called by various software components, and a driver layer that is hardware-specific. Claims We claim: Description TECHNICAL FIELD
typedef struct changelockingpassword_params_tag {
DWORD dwfacility;
char szOldPassword[MAXLENGTH_PASSWORD];
char szNewPassword[MAXLENGTH_PASSWORD];
}
CHANGELOCKINGPASSWORD_PARAMS, *LPCHANGELOCKINGPA SSOWRD_PARAMS; The RIL driver will then take these constants and generate an AT command string as specified in GSM 07.07: AT+CPWD=SC,1234,5678 Note that if an OEM were to change the RIL driver to call a private API to their radio instead of using an AT command, they would make their change at this point. After sending this AT command (or private API) to the radio, the RIL driver returns, and RIL_ChangeLockingPassword returns. The radio has not yet processed the command at this point, so a unique ID is givenback to the user as the return value of this RIL API. After processing the command, the radio module will return a success or error code (in this case, there will be a success code or a possibly descriptive error code such as "wrong password"). The radio gives this response to the RIL driver, which has a separate thread waiting for responses from the radio module. This response is then matched with the unique ID from the API call and sent via a callback function to the calling process. The calling process can then note whether the locking password was successfully changed or not and act accordingly. Referring now to FIG. 4, an example illustrating a method for an application to establish a voice call using RIL in accordance with an embodiment of the present invention will be described. It should be understood that establishing a voice call is only one of many functions that may be performed using the RIL APIs. The method outlined in FIG. 4 is illustrative of one of these functions (establishing a voice call). The method is implemented in telephone 400 that includes an application layer 405, an ExTAPI layer 410, a TAPI layer 415, other core modules 420, a TSP 425, a radio interface layer (RIL) 430 in accordance with an embodiment of the invention, and OEM hardware 435. It should be understood that the method does not describe the IOCTLs which will be understood by those skilled in the art to be present in a preferred embodiment. It should be further understood that the present invention may be implemented without the use of IOCTLs. The method begins when application 405 calls the TAPI function: lineMakeCall (step 452). The TAPI layer 415 calls the TSP 425 with the following function call: TSPI_lineMakeCall (step 454). The TSP 425 calls the RIL with the following RIL function: RIL_Dial (step 456). The RIL initiates the phone call by sending the corresponding command to the OEM hardware (e.g. radio): e.g. ATDT 555-1234 (step 458). The TSP returns asynchronously a reply message to the TAPI layer indicating that the call has been initiated: LINE_REPLY message (step 460). The TAPI layer forwards the reply message (LINE_REPLY) to the application (step 462). When the OEM hardware detects that a connection to the number has been made, then it sends a CONNECT response to the RIL (step 464). The RIL sends a message (RIL_NOTIFY_CONNECT) to the TSP indicating that a connection has been made (step 466). The TSP sends a state change message (LINE_CALLSTATE) to the TAPI layer (step 468). The TAPI layer forwards the state change message (LINE_CALLSTATE) to the application 405 (step 470). When the application 405 wishes to drop the telephone call, it calls the TAPI layer with a hang-up request: (lineDrop) (step 472). The TAPI layer forwards the TSP the hang-up request: (TSPI_lineDrop) (step 474). The TSP handler passes the hang-up request to the RIL: (RIL_Hangup) (step 476). The RIL passes the hang-up request to the OEM hardware (e.g. ATH) (step 478). Features The following table describes some of the features that may be implemented using an embodiment of the present invention and a brief description of these features.
Name Description
Network Services Operator selection, signal status,
available operators, etc.
Call Control Dial, Hangup, Hold, Transfer, etc.
Supplemental Services Call waiting, call forwarding,
call meter, etc.
SMS Send, receive, SMSC selection, etc.
Data Connection Virtual serial port, bearer service types,
transparent data/online mode change
Security Functions Locking, unlocking, passwords, etc.
Interface Functions Initialization, notification registration, etc.
Phonebook Functions Accessing the SIM phonebooks
SIM SMS Functions Accessing SMS messages from the SIM
GPRS Functions Selecting profiles, attaching, activating, etc.
HSCSD Functions Managing channel allocations
SIM Record Access Access individual files on the SIM
SIM Toolkit 2.0 Support Engaging in a SIM toolkit session
Structure Listing This section describes the "data structures" passed as parameters to some RIL APIs and returned with some RIL notifications in an embodiment of the present invention.
Structure Comments
Network Service Structures
RILSUBSCRIBERINFO Defines an assigned phone
number and parameter
associated with it
RILOPERATORNAMES Defines the long, short,
and numeric format of
a single operator
RILOPERATORINFO Defines a network operator
Call Control Structures
RILCALLINFO Defines each call
instance (active, on
hold, in conference, etc.)
RILRINGINFO Indicates the type
of incoming call
Supplemental Service Structures
RILCALLFORWARDSETTINGS Defines call
forwarding
RILCALLWAITINGINFO Information about
an incoming call
RILCALLERIDSETTINGS Defines caller ID
RILHIDEIDSETTINGS Defines how to hide
your phone number when
calling someone else
RILDIALEDIDSETTINGS Defines the true
number that was dialed
RILCLOSEDGROUPSETTINGS Defines closed user
group settings
RILREMOTEPARTYINFO Structure used for
CallerID and
DialedID notifications
Voice Structures
RILGAININFO Defines audio gain
for the transmit and
receive channels
RILAUDIODEVICEINFO Defines transmit and
receive audio devices
Messaging Structures
RILMSGSERVICEINFO Messaging settings
such as storage
locations and usage info
RILMSGDCS Data coding scheme
RILMSGCONFIG Messaging configuration
RILMESSAGE An actual message
RILMESSAGEINFO Contains an
RILMESSAGE along
with additional info
RILMSGSTORAGEINFO Information about a
message storage location
Data Service Structures
RILCALLHSCSDINFO Defines HSCSD parameters
for the current call
RILHSCSDINFO Defines HSCSD parameters
RILDATACOMPINFO Defines parameters for
data compression
RILERRORCORRECTIONINFO Defines parameters for
error correction
RILBEARERSVCINFO Defines the current data
communication settings
RILRLPINFO Defines Radio Link
Protocol (RLP)
parameters for non-
transparent data calls
RILCONNECTINFO Defines connect
information on
a data call
RILSERIALPORTSTATS Defines statistics
of the virtual serial port
RILSERVICEINFO Defines parameters
of the data connection
RILSUPSERVICEDATA Defines elements
of a USSD message
Capability Structures
RILCAPSBEARERSVC Bearer service
capabilities
RILCAPSDIALSVC Dial capabilities
RILCAPSHSCSD HSCSD capabilities
RILCAPSLOCKINGPWD Locking password
LENGTH length capabilities
RILCAPSMSGMEMORY Message storage
LOCATIONS location capabilities
RILCAPSRLP RLP capabilities
SIM Toolkit Structures
RILSIMCMDPARAMETERS Elements of a
SIM command
RILSIMRESPONSE Elements of a SIM
command response
Miscellaneous Structures
RILEQUIPMENTINFO Defines miscellaneous
(generally static)
properties of radio
module
RILPHONEBOOKINFO Defines the state
of the phonebook
RILPHONEBOOKENTRY Defines an entry
in the phonebook
RILCOSTINFO Defines cost
information for the
current operator's rate
RILSIGNALQUALITY Defines the current
signal quality
RILADDRESS A phone number
RILSUBADDRESS More detailed information
about a phone number
RILCELLTOWERINFO Information about the currently
registered cell tower
RILRANGE Defines a min/max range
Notification Listing This section lists some of the unsolicited RIL notifications that get passed to the notification callback. Note that these notifications differ from the ones passed to the response callback as responses to earlier issued function calls. These notifications have been categorized for convenience. These notifications are in one embodiment of the invention and are not meant to limit the invention. dwCode is the numeric ID identifying the notification and lpData is the additional data returned with the notification.
DwCode IpData Comments
RIL_NOTIFY_REGSTATUS ( RIL_REGSTAT_ * ) Sent with change
CHANGED Constant in registration
status
RIL_NOTIFY_CALLMETER dwNewCallMeter Call meter
has changed
RIL_NOTIFY_CALLMETER <NULL> Maximum call
MAXREACHED meter has been
reached
Call Control Notifications
RIL_NOTIFY_RING RILRINGINFO Structure Incoming call
RIL_NOTIFY_CONNECT RILCONNECTINFO Call connected
Structure
RIL_NOTIFY_DISCONNECT RIL_DISCINIT_* Constant Call disconnected
RIL_NOTIFY_DATASVC RILSERVICEINFO Data call
NEGOTIATED Structure service has
been negotiated
RIL_NOTIFY_CALLSTATE <NULL> Call state of
CHANGED one or more calls
may have changed
RIL_NOTIFY_EMERGENCY <NULL> RIL has entered
MODEENTERED emergency mode
RIL_NOTIFY_EMERGENCY <NULL> RIL has exited
MODEEXITED emergency mode
RIL_NOTIFY_EMERGENCY <NULL> Existing calls
HANGUP (if any) were
hung up for
emergency mode
RIL_NOTIFY_HSCSDPARAMS RILCALLHSCSDINFO HSCSD parameters
NEGOTIATED Structure for a call
have been
negotiated
Supplemental Service Notifications
RIL_NOTIFY_CALLERID ( RILREMOTEPARTYINFO * ) The remote
address of the
incoming call
RIL_NOTIFY_DIALEDID ( RILREMOTEPARTYINFO * ) The destination
address of the
outgoing call
RIL_NOTIFY_CALLWAITING ( RILCALLWAITINGINFO * ) Call waiting
notification
RIL_NOTIFY_SUPSERVICE ( RILSUPSERVICEDATA* ) Incoming USSD
DATA message
Messaging Notifications
RIL_NOTIFY_MESSAGE ( RILMESSAGE * ) Indicates a
new message
RIL_NOTIFY_BCMESSAGE ( RILMESSAGE * ) Indicates a
new broadcast
message
RIL_NOTIFY_STATUS ( RILMESSAGE * ) Indicates a
MESSAGE new status
message
RIL_NOTIFY_MSGSTORED ( dwIndex ) Indicates a
message has
been stored
RIL_NOTIFY_MSGDELETED ( dwIndex ) Indicates a
message has
been deleted
RIL_NOTIFY_MSGSTORAGE RILMSGSTORAGEINFO One of the
CHANGED Structure message storage
locations has
been changed
Phonebook Notifications
RIL_NOTIFY_PHONEBOOK dwIndex Phonebook entry
ENTRYSTORED has been added
RIL_NOTIFY_PHONEBOOK dwIndex Phonebook entry
ENTRYDELETED has been deleted
RIL_NOTIFY_PHONEBOOK (RIL_PBLOC *) Phonebook storage
STORAGECHANGED Constant location has
been changed
SIM Toolkit Notifications
RIL_NOTIFY_SIMTOOLKIT dwByteCount Proactive SIM
CMD command received
RIL_NOTIFY_SIMTOOLKIT dwRedialTimeout Proactive SIM
CALLSETUP command to setup
a call
RIL_NOTIFY_SIMTOOLKIT dwByteCount Toolkit command
EVENT was handled by
the radio or radio
sent a toolkit
response to the SIM
Miscellaneous Notifications
RIL_NOTIFY_SMSNOT <NULL> Sim has been
ACCESSIBLE removed or has
failed to respond
RIL_NOTIFY_DTMFSIGNAL ( char* ) A DTMF signal has
been detected
Function Listing This section lists some of the RIL functions broken down by group. Each entry denotes the function name, and a brief description. Where applicable, the corresponding GSM AT command is included.
Function GSM Comments
Network Service Functions
RIL_GetSubscriberNumbers +CNUM Gets list
of assigned
phone numbers
RIL_GetOperatorList +COPS Gets a list
of available
operators
RIL_GetPreferredOperatorList +CPOL Gets a list
of preferred
operators
RIL_AddPreferredOperator +CPOL Adds to the list
of preferred
operators
RIL_RemovePreferredOperator +CPOL Removes from
the list of
preferred
operators
RIL_GetCurrentOperator +COPS Gets the operator
currently registered
RIL_RegisterOnNetwork +COPS Register with a
particular operator
RIL_UnregisterFromNetwork +COPS Unregister current
operator
RIL_GetRegistrationStatus +CREG Gets registration
status
Call Control Functions
RIL_Dial D +FCLASS Dials a number
RIL_Answer A Answers an incoming
call
RIL_Hangup H Sets operator
information
RIL_SendDTMF +VTS Sends DTMF tones
(e.g. during
a call)
RIL_GetDTMFDuration +VTD Gets tone
duration options
RIL_SetDTMFDuration +VTD Sets tone
duration options
RIL_SetDTMFMonitoring Turns on/off
DTMF monitoring
RIL_GetCallList +CLCC Retrieves list
of active calls
and their status
RIL_ManageCalls +CHLD Changes call status
(hold, conference, etc)
RIL_TransferCall +CTFR Explicitly transfers
a call
RIL_GetLineStatus +CPAS Gets line status
Supplemental Service Functions
RIL_SetCallerIDSettings +CLIP CallerID settings
RIL_GetHideIDSettings +CLIR Hides own number
from recipient
RIL_SetHideIDStatus +CLIR Hides own number
from recipient
RIL_GetDialedIDSettings +COLP Dialed number on
an outgoing call
RIL_SetDialedIDSettings +COLP Dialed number on
an outgoing call
RIL_GetClosedGroupSettings +CCUG Closed user group
settings
RIL_SetClosedGroupSettings +CCUG Closed user group
settings
RIL_GetCallForwardSettings +CCFC Call forward
settings
RIL_AddCallForwarding +CCFC Add a number
to the call
forwarding list
RIL_RemoveCallForwarding +CCFC Remove a number
from the call
forwarding list
RIL_SetCallForwardStatus +CCFC Enable/disable
call forwarding
RIL_GetCallWaitingSettings +CCWA Call waiting
settings
RIL_SetCallWaitingStatus +CCWA Call waiting
settings
Voice Functions
RIL_GetAudioGain +VGR Gets receive
+VGT gain of the
audio device
RIL_SetAudioGain +VGR Sets receive
+VGT gain of the
audio device
RIL_GetAudioDevices +VGS List connected
audio devices
(mic, speaker, etc)
RIL_SetAudioDevices +VGS Sets connected
audio devices
(mic, speaker, etc)
RIL_GetAudioMuting +CMUT Gets muting state
RIL_SetAudioMuting +CMUT Sets muting state
Messaging Functions
RIL_GetMsgServiceOptions +CSMS +CPMS Gets messaging
+CMGF +CESP service options
RIL_SetMsgServiceOptions +CSMS +CPMS Sets messaging
+CMGF +CESP service options
RIL_GetMsgConfig +CSCA +CSMP Gets message
+CSDH +CSCB configuration
options
RIL_SetMsgConfig +CSCA +CSMP Sets message
+CSDH +CSCB configuration
options
RIL_RestoreMsgConifg +CRES Restores messaging
settings
RIL_SaveMsgConfig +CSAS Saves messaging
settings
RIL_GetMsgList +CMGL Lists all messages
RIL_ReadMsg +CMGR +CMGD Read (optionally
delete)
a message
RIL_DeleteMsg +CMGD Delete a message
RIL_WriteMsg +CMGW +CMGS Writes (optionally
+CMMS send)
a message
RIL_SendMsg +CMGS +CMSS Send a message
+CMMS
RIL_SendStoredMsg +CMGS +CMSS Send a message
+CMMS from a storage
location
RIL_SendMsgAcknowledgement +CMGS +CMSS Send a message
+CMMS ACK when requested
by an incoming
message
Data Service Functions
RIL_GetSerialPortHandle Gets a virtual
serial port
handle
RIL_GetSerialPortStatistics Gets statistics
on the virtual
serial port
handle
RIL_GetHSCSDOptions +CHSD +CHDT Get settings
+CHSN +CHSC for circuit
+CHSR switched data
calls
RIL_SetHSCSDOptions +CHSD +CHDT Set settings
+CHSN +CHSC for circuit
+CHSR switched data
calls
RIL_GetDataCompression +DS Gets data
compression
options
RIL_SetDataCompression +DS Sets data
compression
options
RIL_GetErrorCorrection +EX Gets error
correction
options
RIL_SetErrorCorrection +EX Sets error
correction
options
RIL_GetBearerServiceOptions
RIL_SetBearerServiceOptions
RIL_GetRLPOptions Gets radio link protocol
options
RIL_SetRLPOptions Sets radio link protocol
options
RIL_CancelSupServiceDataSession +CUSD Cancel a USSD session
RIL_SendSupServiceData +CUSD Send a USSD message
Security Functions
RIL_GetUserIdentity +CIMI Retrieve the
customer's
mobile
identity
RIL_UnlockPhone +CPIN Sends a
pending
password
RIL_ChangeCallBarringPassword +CPIN Changes the
+CPWD call barring
password
RIL_ChangeLockingPassword +CPIN Changes the
+CPWD locking password
RIL_GetPhoneLockedState +CPIN Gets phone
lock status
RIL_GetCallBarringStatus +CLCK Gets call
barring status
RIL_SetCallBarringStatus +CLCK Sets call
barring status
RIL_GetLockingStatus +CLCK Gets locking
status
RIL_SetLockingStatus +CLCK Sets locking
status
Interface Functions
RIL_Initialize Registers RIL
proxy with RIL
driver
RIL_Deinitialize Unregisters
RIL proxy
from RIL driver
RIL_InitializeEmergency Registers an
emergency
application
RIL_DeinitializeEmergency Unregisters an
emergency
application
RIL_EnableNotifications Sets which
notification
classes to receive
RIL_DisableNotifications Disables
notification
classes from
being sent
Phonebook Functions
RIL_GetPhonebookOptions +CPBS Gets the
phonebook
options
RIL_SetPhonebookOptions +CPBS Sets the
phonebook
location
RIL_DeletePhonebookEntry +CPBW Deletes a
phonebook
entry
RIL_ReadPhonebookEntries +CPBR Get
phonebook
entry
RIL_WritePhonebookEntry +CPBW Writes a
phonebook
entry
SIM Toolkit Functions
RIL_FetchSimToolkitCmd +CSIM Retrieves a
proactive
toolkit command
RIL_GetSimToolkitProfile Retrieves a
current profile
for a profile
download
RIL_SetSimToolkitProfile Sets current
profile for a
profile download
RIL_SendSimToolkitCmd +CSIM Sends a response
Response to a proactive
toolkit command
RIL_SendSimToolkitEnvelope +CSIM Sends an envelope
Cmd command to the SIM
RIL_TerminateSimToolkit +CSIM Terminates a
Session toolkit session
Miscellaneous Functions
RIL_GetEquipmentInfo +CGMI GMI +CGMM Retrieves
GMM +CGMR GMR information
+CGSN GSN about the phone
equipment
RIL_GetEquipmentState +CFUN Manages phone
state (power
management)
RIL_SetEquipmentState +CFUN Manages phone
state (power
management)
RIL_SendSimCmd +CSIM Sends unrestricted
It should be understood from the foregoing description that the RIL proxy layer is hardware-independent. In contrast, it should be understood that in different embodiments, the RIL driver layer is hardware-specific. However, in one embodiment, a sample GSM implementation of the RIL driver is provided to function with generic GSM hardware (although, in practice, some modifications will probably be needed for almost any GSM system currently in existence because the GSM specifications may be interpreted and implemented slightly differently by different OEMs). It should be also understood from the foregoing description, that the present invention allows software applications to function on RIL-compatible phones independently of the hardware or the cellular network being used. For example, changing from a GSM to a CDMA network would only require replacing the RIL driver layer and the rest of the phone would work as it did in the GSM network. It should be understood from the foregoing description that the purpose of the RIL is to provide access to cellular functionality for any component in the phone, PDA, etc. Without the RIL, each component (TAPI, SIM manager, SMS manager, etc.) of the phone would have to understand how to communicate to the radio directly. Because it would be difficult for hardware manufacturers to implement a TAPI driver, a SMS driver, a SIM driver, etc., the RIL was created to sit between the radio and the TAPI driver, the SMS driver, the SIM driver, etc. It should be also be understood from the foregoing description, that because the RIL proxy is hardware-independent, RIL provides a platform for third party software developers. With the well-designed APIs and interfaces of the RIL of the present invention, a third party software developer may write his code once and have it work on all devices containing an implementation of RIL, such as telephones, PDAs, etc. Moreover, the software developer may use the well-defined telephony commands such as TAPI without worrying about whether the underlying device is using cellular technology, voice over IP, etc. It should be understood that one of the objectives of RIL is to ease the integration process of software components with an OEM's hardware components. To realize this, a single layer handles all communication between the core modules and an OEM's radio hardware. The single RIL allows software components to be designed without having to worry about differences in underlying hardware. It also allows OEMs to integrate the software components with their radio hardware by implementing a single set of functions. It should be understood that the foregoing description includes many implementation details that should not limit the scope of the present invention. For example, instead of using a proxy layer and a driver layer, the present invention may be implemented as a single abstraction layer between a telephony radio and a computer. The applications on the computer may communicate with the abstraction layer using top-level APIs. On the other hand, the telephony radio would respond to commands received from the abstraction layer. Because the difficulties of implementing specific modules to understand different protocols such as TAPI, ExTAPI, SMS, etc. is accomplished by the RIL itself, the present invention eases the implementation difficulties radio manufacturers often have. Moreover, radio manufacturers no longer have to worry about receiving and keeping track of calls from multiple client applications because all of these functions are handled by the RIL. Software application developers do not need to worry about the underlying hardware of a mobile device. Software applications may be easily written to work with RIL because the applications use well-known top-level APIs which are sent to the RIL. The RIL will then perform appropriate processing of these top-level APIs and, if necessary, send the appropriate command to the radio to perform a specific action. Other Supported Configurations It should also be understood from the foregoing description, that the present invention may be used with cellular telephones as well as other devices, such as hand-held PDA devices. Some of these other devices may not have a permanent radio module(s). Certain changes known to those skilled in the art may be necessary to implement the invention in a device without a permanent radio module(s). Specifically, the invention must support Removable Compact Flash (CF)/PCMCIA radio modules that support circuit-switched cellular network connections. Listed below are some possible device configurations: Configuration 1: Cellular telephone The device has a built in radio-module. It does not have any expansion slots that support CF or PCMCIA cards. Therefore the built-in radio module is guaranteed to be always present and no alternative form of cellular communications is permitted. Configuration 2: PDA with PCMCIA/CF support The device does not have a built in radio-module. However, it does contain a CF and/or PCMCIA expansion slot(s). In a preferred embodiment, the invention requires that a supported Radio module be inserted into the CF or PCMCIA slot. Configuration 3: PDA with built in Radio and PCMCIA/CF support The device has a built in radio module. It can be assumed that this radio module will always be present. Potentially, one can insert other devices (including radio modules) into any available expansion slot (PCMCIA, USB, Bluetooth, etc,). The devices described above may also require a few additions and modifications to the API set as described below in an illustrative embodiment: PDA Support API additions Error Codes: RIL_E_RADIONOTPRESENT Fails the RIL calls because there isn't a radio present in the system RIL_E_RADIOREMOVED Fails the RIL calls which were in the process of being executed because the radio was removed PDA Notifications RIL_NCLASS_RADIOSTATE Radio State notifications (RIL_NCLASS_RADIOSTATE) Notification Radio State Constants RIL_NOTIFY_RADIOPRESENT Notification corresponding to when the radio is inserted and the RIL Driver is ready to accept commands RIL_NOTIFY_RADIONOTPRESENT Notification corresponding to when the radio is removed and the RIL Driver is unloaded. Additional Unrelated Notifications RIL_NOTIFY_RADIOOFF For SetEquipmentState TxandRX off command RIL_NOTIFY_RADIOON For SetEquipmentState TxandRX on command Attached as Appendix A is a list of the RIL APIs of a preferred embodiment of the present invention. These APIs are provided as examples only and should not limit the present invention.
|
Same subclass Same class Consider this |
||||||||||
