65
CellCore and RIL Overview

CellCore and RIL Overview. CellCore Goals Improve key Win32 APIs to seamlessly support digital cellular Focus on TAPI and Win32 Fortify Win32 API

Embed Size (px)

Citation preview

Page 1: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

CellCore and RILOverview

Page 2: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

CellCore GoalsCellCore Goals Improve key Win32 APIs to seamlessly Improve key Win32 APIs to seamlessly

support digital cellularsupport digital cellular Focus on TAPI and Win32Focus on TAPI and Win32

Fortify Win32 API deficiencies Fortify Win32 API deficiencies How to handle SIM? SMS? WAP? GPRS?How to handle SIM? SMS? WAP? GPRS?

Abstract the underlying cellular networks Abstract the underlying cellular networks and hardwareand hardware Developers should have one API for PDC, GSM Developers should have one API for PDC, GSM

or CDMAor CDMA Hardware partners should have only one driver Hardware partners should have only one driver

(RIL)(RIL)

Enable innovation on top of new APIsEnable innovation on top of new APIs WAP SupportWAP Support ““Push to talk” chatPush to talk” chat OTA SMS configurationOTA SMS configuration

Page 3: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Telephony Telephony ArchitectureArchitecture

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

WinsockSMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

WTP

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

WTLS

WDP

AssistedTAPI

VSP

Page 4: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

What is a RIL driver?What is a RIL driver? The “Radio Interface Layer” (RIL) driver is The “Radio Interface Layer” (RIL) driver is

the interface between the system software the interface between the system software and the radio stack.and the radio stack.

The RIL driver services system requests for The RIL driver services system requests for radio functionality (voice, data, SMS, etc.), radio functionality (voice, data, SMS, etc.), and notifies the system of changes in the and notifies the system of changes in the radio state (coverage, signal strength, radio state (coverage, signal strength, incoming calls, etc.)incoming calls, etc.)

RIL contains all of the radio specific code. It RIL contains all of the radio specific code. It must be custom written for each radio stack.must be custom written for each radio stack.

Microsoft provides a sample driver that Microsoft provides a sample driver that works with several AT command based GSM works with several AT command based GSM radios stacks (WaveComm and Condat).radios stacks (WaveComm and Condat).

Page 5: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Radio Interface LayerRadio Interface Layer Easy partner integrationEasy partner integration Flexible interfaceFlexible interface Technology independentTechnology independent

SIMSMS

EmergencyWAP

StingTSP

RIL Driver

Interface (DeviceIOControl)

VSP

Radio Hardware

Interface (RS232, Shared memory, Bluetooth)

RIL Proxy RIL Proxy RIL Proxy RIL Proxy

Data Stack

Page 6: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Virtual Serial PortVirtual Serial Port One serial port, one COM interfaceOne serial port, one COM interface

User virtual serial port to multiplex control + dataUser virtual serial port to multiplex control + data Difficult to implement, especially on GPRSDifficult to implement, especially on GPRS

Single serial port, dual COM interfaceSingle serial port, dual COM interface Implements multiplexing in serial driverImplements multiplexing in serial driver

Dual serial port, dual COM interfaceDual serial port, dual COM interface Easier software integration, but added hardware Easier software integration, but added hardware

requirementrequirement

RIL

Protocol Stack

VSP

SMS Router PPP

Serial Driver

RIL

Protocol Stack

SMS Router PPP

MUX Serial Driver

RIL

Protocol Stack

SMS Router PPP

Serial Driver Serial Driver

One UART, One COM One UART, Two COM Two UART, Two COM

Page 7: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Design ConsiderationsDesign Considerations Must be capable of handling requests from Must be capable of handling requests from

multiple clients.multiple clients. Must not block calling threads. Must not block calling threads.

Asynchronous.Asynchronous. Must have a mechanism for delivering Must have a mechanism for delivering

notifications of network and radio events to notifications of network and radio events to interested clients.interested clients.

Must have a mechanism for device specific Must have a mechanism for device specific function calls and notifications. Microsoft function calls and notifications. Microsoft cannot anticipate all possible requirements.cannot anticipate all possible requirements.

Minimize number of threads to conserve Minimize number of threads to conserve memory.memory.

Page 8: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

RIL ProxyRIL Proxy Microsoft supplied moduleMicrosoft supplied module Loaded separately by each RIL client.Loaded separately by each RIL client. Maintains handles to RIL driver for each Maintains handles to RIL driver for each

client.client. Translates RIL_XXXX function to Translates RIL_XXXX function to

RIL_IOCTL_XXX calls into RIL_IOControl in RIL RIL_IOCTL_XXX calls into RIL_IOControl in RIL driver.driver.

Example: RIL_Dial results inExample: RIL_Dial results inRIL_IOControl(IhRil, IOCTL_RIL_DIAL, …)RIL_IOControl(IhRil, IOCTL_RIL_DIAL, …)

Responsible for calling back into client Responsible for calling back into client processes for notifications and asynchronous processes for notifications and asynchronous RIL function results.RIL function results.

Filters out notifications the client is not Filters out notifications the client is not interested in.interested in.

Page 9: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Notification ClassNotification Class

#define RIL_NCLASS_FUNCRESULT#define RIL_NCLASS_FUNCRESULT (0x00000000) // API call results (0x00000000) // API call results#define RIL_NCLASS_CALLCTRL#define RIL_NCLASS_CALLCTRL (0x00010000) // Call control notifications (0x00010000) // Call control notifications#define RIL_NCLASS_MESSAGE (0x00020000) // Messaging notifications#define RIL_NCLASS_MESSAGE (0x00020000) // Messaging notifications#define RIL_NCLASS_NETWORK (0x00040000) // Network-related notifications#define RIL_NCLASS_NETWORK (0x00040000) // Network-related notifications#define RIL_NCLASS_SUPSERVICE (0x00080000) // Supplementary service notifications#define RIL_NCLASS_SUPSERVICE (0x00080000) // Supplementary service notifications#define RIL_NCLASS_PHONEBOOK (0x00100000) // Phonebook notifications#define RIL_NCLASS_PHONEBOOK (0x00100000) // Phonebook notifications#define RIL_NCLASS_SIMTOOLKIT (0x00200000) // SIM Toolkit notifications#define RIL_NCLASS_SIMTOOLKIT (0x00200000) // SIM Toolkit notifications#define RIL_NCLASS_MISC (0x00400000) // Miscellaneous notifications#define RIL_NCLASS_MISC (0x00400000) // Miscellaneous notifications#define RIL_NCLASS_RADIOSTATE (0x00800000) // Pertaining to Radio State#define RIL_NCLASS_RADIOSTATE (0x00800000) // Pertaining to Radio State#define RIL_NCLASS_DEVSPECIFIC (0x80000000) // OEM owned#define RIL_NCLASS_DEVSPECIFIC (0x80000000) // OEM owned

Clients register with the proxy to be notified Clients register with the proxy to be notified of certain classes of notificationsof certain classes of notifications

RIL driver generates notifications and sets RIL driver generates notifications and sets “RILNotificationCancelEvent” for each client.“RILNotificationCancelEvent” for each client.

Proxy uses Proxy uses IOCTL_RIL_GETNEXTNOTIFICATION to get IOCTL_RIL_GETNEXTNOTIFICATION to get next notificationnext notification

The proxy calls the client’s notify or result The proxy calls the client’s notify or result callback function with the new notification callback function with the new notification data.data.

Page 10: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Sample Driver Thread Sample Driver Thread ModelModel

COM Port Driver

RIL

_IO

CO

ntr

ol

RIL

Fu

nct

ion

Ca

ll

Get

HR

ES

UL

T

CommandQueue

Wa

it

Ca

llba

ck

NotificationQueue

CallingProcess

ProxyWorkerThread

System / Application

RIL ProxyRIL.DLL

ResponseQueue

Wri

te

RIL Driver

Wait

Wait

Pa

rse

Put

CommandThread

CommandResponse?

ReadThread

RIL_Dial RIL_Dial 55512125551212

ATD5551212;ATD5551212;

ATD5551212;ATD5551212;

ATD5551212;ATD5551212;

ATD5551212;ATD5551212;

RIL_RESULT_OKRIL_RESULT_OK

00

00

00

00

RIL_RESULT_OKRIL_RESULT_OK

RIL_RESULT_OKRIL_RESULT_OK

00

Page 11: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Sample Driver Thread Sample Driver Thread Model Continued Model Continued

Application / System calling threadApplication / System calling thread Enters driver from RIL Proxy via Enters driver from RIL Proxy via

RIL_IOControlRIL_IOControl Generate AT commandGenerate AT command Places command on “Command Queue”Places command on “Command Queue” Does not block.Does not block. Returns < 0 HRESULT error or > 0 command Returns < 0 HRESULT error or > 0 command

ID of the queued command.ID of the queued command.

Page 12: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Sample Driver Thread Sample Driver Thread Model ContinuedModel ContinuedCommand ThreadCommand Thread Waits for command to arrive on command Waits for command to arrive on command

queue.queue. Writes AT command to serial port.Writes AT command to serial port. Waits for response in response queue.Waits for response in response queue. Constructs notification object.Constructs notification object. Places object in notification queue of each Places object in notification queue of each

RIL handle.RIL handle. Triggers “RILNotificationCancelEvent” for Triggers “RILNotificationCancelEvent” for

each RIL handle to alert proxy of new each RIL handle to alert proxy of new notification.notification.

Page 13: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Sample Driver Thread Sample Driver Thread Model ContinuedModel ContinuedReadThreadReadThread Waits for data to read on COM port.Waits for data to read on COM port. Buffer up data until a complete response is Buffer up data until a complete response is

received.received. Checks to see if it is a command response or Checks to see if it is a command response or

an unsolicited notification.an unsolicited notification. If it is a command response, place it in the If it is a command response, place it in the

response queue.response queue. If it is a notification, place it in the If it is a notification, place it in the

notification queue for each RIL handle and notification queue for each RIL handle and trigger “RILNotificationCancelEvent” for trigger “RILNotificationCancelEvent” for each RIL handleeach RIL handle

Page 14: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Sample Driver Thread Sample Driver Thread Model ContinuedModel ContinuedProxy Worker ThreadProxy Worker Thread One for each RIL handleOne for each RIL handle Waits for “RILNotificationCancelEvent”Waits for “RILNotificationCancelEvent” Calls through RIL_IOControl with Calls through RIL_IOControl with

IOCTL_RIL_GETNEXTNOTIFICATION.IOCTL_RIL_GETNEXTNOTIFICATION. IOCTL_RIL_GETNEXTNOTIFICATION gets the IOCTL_RIL_GETNEXTNOTIFICATION gets the

next notification out of the queue and next notification out of the queue and returns.returns.

If the function result, call client function If the function result, call client function callback.callback.

If unsolicited notification, call client If unsolicited notification, call client notification callback (IF client is registered notification callback (IF client is registered for this NCLASS).for this NCLASS).

Page 15: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

RIL Driver Entry Points RIL Driver Entry Points

RIL_InitRIL_Init Called by system during bootCalled by system during boot Startup for RIL driver. Creates worker Startup for RIL driver. Creates worker

threads, initializes global data structures, threads, initializes global data structures, initialize COM ports, etc.initialize COM ports, etc.

Kicks off thread to perform radio Kicks off thread to perform radio initializationinitialization

Sets “RILDrv_Present” event to inform the Sets “RILDrv_Present” event to inform the RIL Proxy that the driver was loaded and RIL Proxy that the driver was loaded and initialized successfully.initialized successfully.

Page 16: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

RIL Driver Entry PointsRIL Driver Entry Points

RIL_DeinitRIL_Deinit Called before driver is unloaded.Called before driver is unloaded. Perform cleanupPerform cleanup Clear “RILDrv_Present” event to inform the Clear “RILDrv_Present” event to inform the

RIL Proxy that the driver was unloaded.RIL Proxy that the driver was unloaded.

Page 17: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

RIL Driver Entry PointsRIL Driver Entry Points

RIL_OpenRIL_Open Called by proxy during RIL_InitializeCalled by proxy during RIL_Initialize Prepare RIL for use by a new clientPrepare RIL for use by a new client

RIL_CloseRIL_Close Called by proxy during RIL_DeinitializeCalled by proxy during RIL_Deinitialize Free resources used by an old clientFree resources used by an old client

RIL_Read, RIL_Write, RIL_SeekRIL_Read, RIL_Write, RIL_Seek Not usedNot used

Page 18: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

RIL Driver Entry PointsRIL Driver Entry Points

RIL_IOControlRIL_IOControl Most of the RIL API passes through Most of the RIL API passes through

RIL_IOControlRIL_IOControl Typically this is implemented as a large Typically this is implemented as a large

switch : case expression.switch : case expression.

switch (dwCode)switch (dwCode) {{ // RIL_GetSubscriberNumbers()// RIL_GetSubscriberNumbers() case IOCTL_RIL_GETSUBSCRIBERNUMBERS:case IOCTL_RIL_GETSUBSCRIBERNUMBERS: result = RILDrv_GetSubscriberNumbers(...);result = RILDrv_GetSubscriberNumbers(...); break;break;

// RIL_GetOperatorList()// RIL_GetOperatorList() case IOCTL_RIL_GETOPERATORLIST:case IOCTL_RIL_GETOPERATORLIST: result = RILDrv_GetOperatorList(…);result = RILDrv_GetOperatorList(…); break;break; … … }}

Page 19: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

VoiceVoice

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

WinsockWTP

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

WTLS

WDP

AssistedTAPI

VSP

Page 20: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Simple Voice Control – Simple Voice Control – Assisted TAPIAssisted TAPI Assisted TAPI is a simplified telephony Assisted TAPI is a simplified telephony

interfaceinterface Only one function: “Make a voice call”Only one function: “Make a voice call”

tapiRequestMakeCall(….)tapiRequestMakeCall(….)

RIL Proxy

TAPI

Telephony Service Provider

Connection Manager

Voice Data Etc

Assisted TAPI

Page 21: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Advanced Voice ControlAdvanced Voice Control

TAPI is provides advanced telephony controlTAPI is provides advanced telephony control Dial, answer, hold, conference, forward, transfer, Dial, answer, hold, conference, forward, transfer,

deflect, etc.deflect, etc.

ExTAPI support additional cellular featuresExTAPI support additional cellular features Uses TAPI lineDevSpecific functionUses TAPI lineDevSpecific function HSCSD, USSD, operator selection, call barring, etc.HSCSD, USSD, operator selection, call barring, etc.

Cellular TSP implements TAPI and ExTAPI Cellular TSP implements TAPI and ExTAPI callscalls

RIL Proxy

Telephony API

Telephony Service Provider

Extended TAPI

Telephony Service Provider

Page 22: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Call Control FunctionsCall Control FunctionsFunction GSM Comments

RIL_Dial D +FCLASS Dials a number

RIL_Answer A Answers an incoming call

RIL_Hangup H End all voice and data calls (not GPRS)

RIL_SendDTMF +VTS Sends DTMF tones (e.g. during a call)

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

RIL_SendFlash Send CDMA hook flash

Page 23: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Call Control Call Control NotificationsNotificationsdwCode lpData Comments

RIL_NOTIFY_RING RILRINGINFO Structure Incoming call

RIL_NOTIFY_CONNECT RILCONNECTINFO Structure

Call connected

RIL_NOTIFY_DISCONNECT RIL_DISCINIT_* Constant Call disconnected

RIL_NOTIFY_CALLSTATECHANGED

<NULL> Call state of one or more calls may have changed

Page 24: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Phone Volume Phone Volume FunctionsFunctionsFunction GSM Comments

RIL_GetAudioGain +VGR +VGT Gets receive gain of the audio device

RIL_SetAudioGain +VGR +VGT Sets receive gain of the audio device

RIL_GetAudioMuting +CMUT Gets muting state

RIL_SetAudioMuting +CMUT Sets muting state

Page 25: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Scenario - Voice DialScenario - Voice DialRIL API: RIL_Dial(hRil, "14255551212", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE) RIL API: RIL_Dial(hRil, "14255551212", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE)

Returns dwCommandID = 1Returns dwCommandID = 1Com out: ATD14255551212;<cr>Com out: ATD14255551212;<cr>Com in: 0<cr><lf>Com in: 0<cr><lf>Async result: dwCommandID=1 RIL_RESULT_OK pData = NULLAsync result: dwCommandID=1 RIL_RESULT_OK pData = NULLNotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICENotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICERIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Returns dwCommandID = 2Returns dwCommandID = 2Com out: AT+CLCC<cr>Com out: AT+CLCC<cr>Com in: <cr><lf>+CLCC: 1,0,2,0,0,"14255551212",129<cr><lf>0<cr>Com in: <cr><lf>+CLCC: 1,0,2,0,0,"14255551212",129<cr><lf>0<cr>Async Result: dwCommandID=2 RIL_RESULT_OK pData = RILCALLINFOAsync Result: dwCommandID=2 RIL_RESULT_OK pData = RILCALLINFO

dwID = 1dwID = 1dwDirection = RIL_CALLDIR_OUTGOINGdwDirection = RIL_CALLDIR_OUTGOINGdwStatus = RIL_CALLSTAT_DIALINGdwStatus = RIL_CALLSTAT_DIALINGdwType = RIL_CALLTYPE_VOICEdwType = RIL_CALLTYPE_VOICEdwMultiparty = RIL_CALL_SINGLEPARTYdwMultiparty = RIL_CALL_SINGLEPARTYraAddress = "14255551212“raAddress = "14255551212“

RIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)Returns dwCommandID = 3Returns dwCommandID = 3

Com out: AT+CLCC<cr>Com out: AT+CLCC<cr>Com in: <cr><lf>+CLCC: 1,0,0,0,0,"14255551212",129<cr><lf>0<cr>Com in: <cr><lf>+CLCC: 1,0,0,0,0,"14255551212",129<cr><lf>0<cr>Async Result: dwCommandID=3 RIL_RESULT_OK pData = RILCALLINFOAsync Result: dwCommandID=3 RIL_RESULT_OK pData = RILCALLINFO

dwStatus = RIL_CALLSTAT_ACTIVEdwStatus = RIL_CALLSTAT_ACTIVECom in: 3<cr>Com in: 3<cr>Notification: RIL_NOTIFY_DISCONNECT pData = RIL_DISCINIT_REMOTENotification: RIL_NOTIFY_DISCONNECT pData = RIL_DISCINIT_REMOTERIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Returns dwCommandID = 4Returns dwCommandID = 4Com out: AT+CLCC<cr>Com out: AT+CLCC<cr>Com In: 0<cr>Com In: 0<cr>Async Result: dwCommandID=4 RIL_RESULT_OK pData = NULLAsync Result: dwCommandID=4 RIL_RESULT_OK pData = NULL

Page 26: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Scenario – Conference Scenario – Conference CallCallRIL API: RIL_Dial(hRil, "14255551212", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE) RIL API: RIL_Dial(hRil, "14255551212", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE)

Async result: RIL_RESULT_OK pData = NULLAsync result: RIL_RESULT_OK pData = NULLNotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICENotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICE

RIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Async Result: RIL_RESULT_OK pData = RILCALLINFOAsync Result: RIL_RESULT_OK pData = RILCALLINFO

dwID = 1 RIL_CALLSTAT_ACTIVE "14255551212“ RIL_CALL_SINGLEPARTYdwID = 1 RIL_CALLSTAT_ACTIVE "14255551212“ RIL_CALL_SINGLEPARTY

RIL API: RIL_ManageCallsRIL API: RIL_ManageCallsRIL_CALLCMD_HOLDACTIVE_ACCEPTHELDRIL_CALLCMD_HOLDACTIVE_ACCEPTHELD

Async result: RIL_RESULT_OK pData = NULLAsync result: RIL_RESULT_OK pData = NULL

RIL_NOTIFY_CALLSTATECHANGEDRIL_NOTIFY_CALLSTATECHANGED

RIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Async Result: RIL_RESULT_OK pData = RILCALLINFOAsync Result: RIL_RESULT_OK pData = RILCALLINFO

dwID = 1 RIL_CALLSTAT_ONHOLD "14255551212“ RIL_CALL_SINGLEPARTYdwID = 1 RIL_CALLSTAT_ONHOLD "14255551212“ RIL_CALL_SINGLEPARTY

RIL API: RIL_Dial(hRil, "17025550321", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE) RIL API: RIL_Dial(hRil, "17025550321", RIL_CALLTYPE_VOICE, RIL_DIALOPT_NONE)

Async result: RIL_RESULT_OK pData = NULLAsync result: RIL_RESULT_OK pData = NULLNotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICENotification: RIL_NOTIFY_CONNECT pData = RIL_CALLTYPE_VOICE

RIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Async Result: RIL_RESULT_OK pData = RILCALLINFOAsync Result: RIL_RESULT_OK pData = RILCALLINFO

dwID = 1 RIL_CALLSTAT_ONHOLD "14255551212“ RIL_CALL_SINGLEPARTYdwID = 1 RIL_CALLSTAT_ONHOLD "14255551212“ RIL_CALL_SINGLEPARTY

dwID = 2 RIL_CALLSTAT_ACTIVE " 17025550321“ RIL_CALL_SINGLEPARTYdwID = 2 RIL_CALLSTAT_ACTIVE " 17025550321“ RIL_CALL_SINGLEPARTY

RIL API: RIL_ManageCallsRIL API: RIL_ManageCallsRIL_CALLCMD_ADDHELDTOCONFRIL_CALLCMD_ADDHELDTOCONF

Async result: RIL_RESULT_OK pData = NULLAsync result: RIL_RESULT_OK pData = NULL

RIL_NOTIFY_CALLSTATECHANGEDRIL_NOTIFY_CALLSTATECHANGED

RIL API: RIL_GetCallList(hRil)RIL API: RIL_GetCallList(hRil)

Async Result: RIL_RESULT_OK pData = RILCALLINFOAsync Result: RIL_RESULT_OK pData = RILCALLINFO

dwID = 1 RIL_CALLSTAT_ACTIVE "14255551212“RIL_CALL_MULTIPARTYdwID = 1 RIL_CALLSTAT_ACTIVE "14255551212“RIL_CALL_MULTIPARTY

dwID = 2 RIL_CALLSTAT_ACTIVE " 17025550321“RIL_CALL_MULTIPARTYdwID = 2 RIL_CALLSTAT_ACTIVE " 17025550321“RIL_CALL_MULTIPARTY

Page 27: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Supplemental Service Supplemental Service NotificationsNotificationsdwCode LpData Comments

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_SUPSERVICEDATA

( RILSUPSERVICEDATA * )

Incoming USSD message

Page 28: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Network Service Network Service FunctionsFunctionsFunction GSM Comments

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

RIL_GetCurrentPrivacyStatus

Gets the privacy status of the current system

RIL_GetGPRSAttached +CGATT Get GPRS Attach or Detach (used in Ozone only)

RIL_SetGPRSAttached +CGATT Set GPRS Attach or Detach (unused – auto attach is used instead)

RIL_GPRSRegistrationStatus +CGREG GPRS Network Registration Status

RIL_GetCurrentSystemType Gets system type (GSM, IS95A, 1XRTT, etc.)

Page 29: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Network Service Network Service NotificationsNotifications

dwCode lpData Comments

RIL_NOTIFY_SIGNALQUALITY RILSIGNALQUALITY Bit error rate is ignored

RIL_NOTIFY_SYSTEMCHANGEDRIL_NOTIFY_SYSTEMCHANGED (RIL_SYSTEMTYPE_) (RIL_SYSTEMTYPE_) ConstantConstant

Used for CDMA 1XRTT Used for CDMA 1XRTT coverage detection onlycoverage detection only

RIL_NOTIFY_GPRSREGSTATUSCHANGED

( RIL_REGSTAT_ * ) Constant

Sent with change in GPRS attach status

RIL_NOTIFY_REGSTATUSCHANGED

( RIL_REGSTAT_ * ) Constant

Sent with change in registration status

Page 30: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Supplemental Service Supplemental Service FunctionsFunctionsFunction GSM Comments

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_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

RIL_CancelSupServiceDataSession

+CUSD

Cancel a USSD session

RIL_SendSupServiceData +CUSD

Send a USSD message

Page 31: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Circuit-Switched dataCircuit-Switched data TAPI still used, but with “Data Mode” flagTAPI still used, but with “Data Mode” flag PPP obtains COM handle to the virtual serial PPP obtains COM handle to the virtual serial

portport

RIL

Hardware

Virtual Serial Port

Winsock

TAPIExTAPI

TSP

TCP/IP

RAS PPP

Connection Manager

VoiceData Etc

Application

Page 32: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

GPRS DataGPRS Data Again TAPI is used but with additional Again TAPI is used but with additional

DevConfig fieldsDevConfig fields Looks like a quickly setup RAS connecitonLooks like a quickly setup RAS conneciton

RIL

Hardware

Virtual Serial Port

Winsock

TAPIExTAPI

TSP

TCP/IP

RAS PPP

Connection Manager

VoiceData GPRS

Application

Page 33: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Connection ManagerConnection Manager

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

Winsock

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

AssistedTAPI

WTP

WTLS

WDP

VSP

Page 34: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Connection ManagerConnection Manager

Connection Manager

Voice

Intelligent data connectivityIntelligent data connectivity Network based vs. Connection basedNetwork based vs. Connection based Scheduled ConnectionsScheduled Connections

Each CSP has connection criteriaEach CSP has connection criteria Error rate, cost, bandwidth, latency, connect Error rate, cost, bandwidth, latency, connect

time, etc.time, etc. Can add CSPs to support new connection typesCan add CSPs to support new connection types

Planner arbitrates connection decisionsPlanner arbitrates connection decisions Pre-configurable by carrier/Corp ITPre-configurable by carrier/Corp IT

RAS Proxy PPTP GPRS etc

Planner

ConnectionServiceProviders

Page 35: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Connection ManagerConnection Manager Common CSP examplesCommon CSP examples

ISPISP CorpnetCorpnet Secure Tunnelling (PPTP)Secure Tunnelling (PPTP) ProxyProxy

Internet

Corpnet

ISP Corpnet Tunnelling Proxy

Page 36: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

GPRS FunctionsGPRS FunctionsFunction GSM Comments

RIL_GetGPRSContextList +CGDCONT Get PDP Context

RIL_SetGPRSContext +CGDCONT Set PDP Context

RIL_GetRequestedQualityOfServiceList +CGQREQ Get Quality of Service (requested)

RIL_SetRequestedQualityOfService +CGQREQ Set Quality of Service (requested)

RIL_DeleteRequestedQualityOfService +CGQREQ Delete Quality of Service (requested)

RIL_GetMinimumQualityOfServiceList +CGQMIN Get Quality of Service Profile (Minimum Acceptable)

RIL_SetMinimumQualityOfService +CGQMIN Delete Quality of Service Profile (Minimum Acceptable)

RIL_GetGPRSContextActivatedList +CGACT Get PDP Context activate or Deactivate

RIL_SetGPRSContextActivated +CGACT Set PDP Context activate or Deactivate (should be NOOP, this should be handled during PPP negotiation)

RIL_EnterGPRSDataMode D*99# Enter Data State

Page 37: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Data CallsData Calls Applications can initiate data calls in two Applications can initiate data calls in two

different ways. different ways. ConnMgrEstablishConnection or RasDial.ConnMgrEstablishConnection or RasDial.

ConnMgrEstablishConnection uses RasDial ConnMgrEstablishConnection uses RasDial internally.internally.

RasDial – uses TAPI lineSetDevConfig and RasDial – uses TAPI lineSetDevConfig and lineMakeCall. lineMakeCall.

All of these API's are detailed in the Pockect All of these API's are detailed in the Pockect PC and Smart Phone SDK.PC and Smart Phone SDK.

Page 38: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Data Calls ContinuedData Calls Continued From RIL's perspective, all data calls are From RIL's perspective, all data calls are

established in two phases. established in two phases. lineSetDevConfig is the first phase. This API lineSetDevConfig is the first phase. This API

results in potentially several RIL calls which results in potentially several RIL calls which configure data mode options.configure data mode options.

In the second phase, the call is dialed. In the second phase, the call is dialed. Here's the typical sequence of events...Here's the typical sequence of events...

Page 39: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

GPRS Data CallsGPRS Data Calls For GPRS calls, Microsoft relies on the radio For GPRS calls, Microsoft relies on the radio

stack to automatically GPRS attach stack to automatically GPRS attach whenever the device registers on the whenever the device registers on the network.network.

Phase 1: lineSetDevConfigPhase 1: lineSetDevConfig

1.1. RIL_SetGPRSContextRIL_SetGPRSContext

2.2. RILDrv_SetRequestedQualityOfService - RILDrv_SetRequestedQualityOfService - NOOPNOOP

3.3. RIL_SetMinimumQualityOfService - NOOPRIL_SetMinimumQualityOfService - NOOP

4.4. RILDrv_SetGPRSContextActivated - NOOP RILDrv_SetGPRSContextActivated - NOOP (PPP)(PPP)

Phase 2: lineMakeCallPhase 2: lineMakeCall

1.1. RILDrv_EnterGPRSDataMode – Dial ATD*99#RILDrv_EnterGPRSDataMode – Dial ATD*99#

2.2. PPP negotiation will then activate the data PPP negotiation will then activate the data context.context.

Page 40: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

GPRS Data Calls GPRS Data Calls ContinuedContinuedHangUpHangUp Because RILDrv_SetGPRSContextActivated Because RILDrv_SetGPRSContextActivated

should use CMDOPT_NOOP, Microsoft code should use CMDOPT_NOOP, Microsoft code never expects to deactivate a GPRS context never expects to deactivate a GPRS context using an AT command.using an AT command.

Instead, when the PPP server sees a link Instead, when the PPP server sees a link down from the client, the PPP server should down from the client, the PPP server should deactivate the GPRS context.deactivate the GPRS context.

Page 41: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

CSD / 1XRTT Data CallsCSD / 1XRTT Data Calls

For CSD/1x data calls, the procedure is very For CSD/1x data calls, the procedure is very similar.similar.

Phase 1: lineSetDevConfig -Phase 1: lineSetDevConfig -RILDrv_SetBearerServiceOptions AT+CBST. RILDrv_SetBearerServiceOptions AT+CBST. (can use CMDOPT_NOOP)(can use CMDOPT_NOOP)

Phase 2: lineMakeCall - RILDrv_DialPhase 2: lineMakeCall - RILDrv_Dial Hangup works like voice calls via Hangup works like voice calls via

RILDrv_Hangup.RILDrv_Hangup.

Page 42: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Short Messaging Short Messaging ServiceService

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

Radio Stack

Radio Interface Layer (RIL)

SMS API

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

Winsock

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

AssistedTAPI

WTP

WTLS

WDP

VSP

Page 43: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Short Messaging Short Messaging ServiceService Store receives all messagesStore receives all messages

Providers support different message typesProviders support different message types GSMText (with multipart)GSMText (with multipart) WDP (GSM 03.40)WDP (GSM 03.40) Other custom typesOther custom types

RIL

Hardware

SMS API

RouterText

WDP

Etc

SMSStore

InboxPOPIMAP SMS

Providers

ProvisioningRouter

Page 44: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Messaging FunctionsMessaging FunctionsFunction GSM Comments

RIL_GetMsgServiceOptions +CSMS +CPMS +CMGF

Gets messaging service options

RIL_SetMsgServiceOptions +CSMS +CPMS +CMGF

Sets messaging service options

RIL_GetMsgConfig +CSCA +CSMP +CSDH +CSCB

Gets message configuration options

RIL_SetMsgConfig +CSCA +CSMP +CSDH +CSCB +CSAS

Sets message configuration options

RIL_ReadMsg +CMGR +CMGD Read (optionally delete) a message

RIL_DeleteMsg +CMGD Delete a message

RIL_WriteMsg +CMGW +CMGS +CMMS

Writes (optionally send) a message

RIL_SendMsg +CMGS +CMSS +CMMS +CMGC

Send a message

RIL_SendMsgAcknowledgement

+CMGS +CMSS+CMMS +CNMA

Send a message ACK when requested by an incoming message

Page 45: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Messaging Messaging NotificationsNotificationsdwCode lpData Comments

RIL_NOTIFY_MESSAGE ( RILMESSAGE * ) Indicates a new message

RIL_NOTIFY_BCMESSAGE ( RILMESSAGE * ) Indicates a new broadcast message

RIL_NOTIFY_STATUSMESSAGE ( RILMESSAGE * ) Indicates a 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_MSGSTORAGECHANGED

RILMSGSTORAGEINFO Structure

One of the message storage locations has been changed

Page 46: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SMS MessagingSMS Messaging

RIL

Radio Stack

Router

TextWDPWCMP

SMSStore

SMS API

CEMAPI

Inbox

Notify Status Raw

WAP Stack

Voice Mail Indicator WAP Wakeup Provisioning Router

RecognizeRecognizeRILMESSAGERILMESSAGE

RIL_NOTIFY_MESSAGE - RILMESSAGERIL_NOTIFY_MESSAGE - RILMESSAGE

RIL_NOTIFY_MESSAGE - RILMESSAGERIL_NOTIFY_MESSAGE - RILMESSAGE

RILMESSAGERILMESSAGE

RecognizeRecognizeRILMESSAGERILMESSAGE

RecognizeRecognizeRILMESSAGERILMESSAGE

GetSizeGetSize

GetSizeGetSizeRILMESSAGERILMESSAGE

ReadRead

ReadRead

RILMESSAGERILMESSAGE

Provider Specific DataProvider Specific Data

Provider Specific DataProvider Specific Data

Page 47: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SMS Message StructureSMS Message Structuretypedef struct rilmessage_tag {typedef struct rilmessage_tag { DWORD cbSize; // @field structure size in bytesDWORD cbSize; // @field structure size in bytes DWORD dwParams; // @field indicates valid parametersDWORD dwParams; // @field indicates valid parameters RILADDRESS raSvcCtrAddress; // @field service center addressRILADDRESS raSvcCtrAddress; // @field service center address DWORD dwType; // @field type of messageDWORD dwType; // @field type of message DWORD dwFlags; // @field message flagsDWORD dwFlags; // @field message flags union { // @field UNION MEMBERunion { // @field UNION MEMBER struct { // @field RIL_MSGTYPE_IN_DELIVERstruct { // @field RIL_MSGTYPE_IN_DELIVER RILADDRESS raOrigAddress; // @field originating addressRILADDRESS raOrigAddress; // @field originating address DWORD dwProtocolID; // @field message protocolDWORD dwProtocolID; // @field message protocol RILMSGDCS rmdDataCoding; // @field data coding schemeRILMSGDCS rmdDataCoding; // @field data coding scheme SYSTEMTIME stSCReceiveTime; // @field receive time (UTC)SYSTEMTIME stSCReceiveTime; // @field receive time (UTC) DWORD cbHdrLength; // @field length of header in bytesDWORD cbHdrLength; // @field length of header in bytes DWORD cchMsgLength; // @field length of body in bytesDWORD cchMsgLength; // @field length of body in bytes BYTE rgbHdr[MAXLENGTH_HDR]; // @field header bufferBYTE rgbHdr[MAXLENGTH_HDR]; // @field header buffer BYTE rgbMsg[MAXLENGTH_MSG]; // @field body bufferBYTE rgbMsg[MAXLENGTH_MSG]; // @field body buffer } msgInDeliver; // @field End RIL_MSGTYPE_IN_DELIVER} msgInDeliver; // @field End RIL_MSGTYPE_IN_DELIVER

… …

};};} RILMESSAGE, *LPRILMESSAGE;} RILMESSAGE, *LPRILMESSAGE;

Page 48: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SMS Message Structure SMS Message Structure Cont.Cont.typedef struct rilmessage_tag {typedef struct rilmessage_tag { DWORD cbSize; // @field structure size in bytesDWORD cbSize; // @field structure size in bytes DWORD dwParams; // @field indicates valid parametersDWORD dwParams; // @field indicates valid parameters RILADDRESS raSvcCtrAddress; // @field service center addressRILADDRESS raSvcCtrAddress; // @field service center address DWORD dwType; // @field type of messageDWORD dwType; // @field type of message DWORD dwFlags; // @field message flagsDWORD dwFlags; // @field message flags

… …

union { // @field UNION MEMBERunion { // @field UNION MEMBER struct { // @field RIL_MSGTYPE_OUT_SUBMITstruct { // @field RIL_MSGTYPE_OUT_SUBMIT RILADDRESS raDestAddress; // @field destination addressRILADDRESS raDestAddress; // @field destination address DWORD dwProtocolID; // @field message protocolDWORD dwProtocolID; // @field message protocol RILMSGDCS rmdDataCoding; // @field data coding schemeRILMSGDCS rmdDataCoding; // @field data coding scheme DWORD dwVPFormat; // @field format of VP (relative, absolute, etc)DWORD dwVPFormat; // @field format of VP (relative, absolute, etc) SYSTEMTIME stVP; // @field validity periodSYSTEMTIME stVP; // @field validity period DWORD cbHdrLength; // @field length of header in bytesDWORD cbHdrLength; // @field length of header in bytes DWORD cchMsgLength; // @field length of body in bytesDWORD cchMsgLength; // @field length of body in bytes BYTE rgbHdr[MAXLENGTH_HDR]; // @field header bufferBYTE rgbHdr[MAXLENGTH_HDR]; // @field header buffer BYTE rgbMsg[MAXLENGTH_MSG]; // @field body bufferBYTE rgbMsg[MAXLENGTH_MSG]; // @field body buffer } msgOutSubmit; // @field End RIL_MSGTYPE_OUT_SUBMIT} msgOutSubmit; // @field End RIL_MSGTYPE_OUT_SUBMIT

… …

};};} RILMESSAGE, *LPRILMESSAGE;} RILMESSAGE, *LPRILMESSAGE;

Page 49: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM APISIM API

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

Winsock

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

AssistedTAPI

WTP

WTLS

WDP

VSP

Page 50: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM ManagerSIM Manager SIM Access – Exposes a SIM APISIM Access – Exposes a SIM API API Protection – Allows Concurrent Access to the SIM API Protection – Allows Concurrent Access to the SIM

CardCard Security functions (e.g. SIM locking, call barring)Security functions (e.g. SIM locking, call barring) PhonebookPhonebook SIM record accessSIM record access

RIL

Hardware

SIM Manager

Startup UI SMS Import Wizard Voicemail App

Page 51: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Security FunctionsSecurity FunctionsFunction GSM Comments

RIL_GetUserIdentity +CIMI Retrieve the customer’s mobile identity

RIL_UnlockPhone +CPIN Sends a pending password

RIL_ChangeCallBarringPassword

+CPIN +CPWD

Changes the call barring password

RIL_ChangeLockingPassword

+CPIN +CPWD

Changes the locking password

RIL_GetPhoneLockedState +CPIN Gets phone lock state (PIN, PUK, etc.)

RIL_GetCallBarringStatus +CLCK Gets call barring status

RIL_SetCallBarringStatus +CLCK Sets call barring status

RIL_GetLockingStatus +CLCK Gets locking status (enabled or disabled)

RIL_SetLockingStatus +CLCK Sets locking status

Page 52: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Phonebook FunctionsPhonebook FunctionsFunction GSM Comments

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

Page 53: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Phonebook Phonebook NotificationsNotificationsdwCode lpData Comments

RIL_NOTIFY_PHONEBOOKENTRYSTORED

dwIndex Phonebook entry has been added

RIL_NOTIFY_PHONEBOOKENTRYDELETED

dwIndex Phonebook entry has been deleted

RIL_NOTIFY_PHONEBOOKSTORAGECHANGED

(RIL_PBLOC *) Constant

Phonebook storage location has been changed

Page 54: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Radio State FuntionsRadio State FuntionsFunction GSM Comments

RIL_GetRadioPresence Proxy Determined whether or not a radio module is present

RIL_GetEquipmentState +CFUN Manages phone state (power management)

RIL_SetEquipmentState +CFUN Manages phone state (power management)

Radio State Radio State NotificationsNotificationsdwCode lpData Comments

RIL_NOTIFY_RADIOEQUIPTMENTSTATECHANGED

<NULL>

The radio power state has changed

RIL_NOTIFY_RADIOPRESENCECHANGED <NULL>

A radio module has been inserted or removed

Page 55: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Miscellaneous Miscellaneous FunctionsFunctionsFunction GSM Comments

RIL_GetEquipmentInfo +CGMI GMI+CGMM

GMM+CGMR GMR+CGSN GSN

Retrieves information 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 commands directly to a SIM

RIL_SendRestrictedSimCmd

+CRSM Sends a restricted set of commands to a SIM

RIL_GetSignalQuality +CSQ Gets signal quality

RIL_GetDevCaps Retrieves the capabilities of the radio device

RIL_DevSpecific OEM owned

Page 56: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM ToolkitSIM Toolkit

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

Winsock

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

AssistedTAPI

WTP

WTLS

WDP

VSP

Page 57: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM ToolkitSIM Toolkit Runs programs stored on the SIM CardRuns programs stored on the SIM Card

Display text with user inputDisplay text with user input Send SMSSend SMS Place a callPlace a call Context sensitive helpContext sensitive help

Supports Class 2 ToolkitSupports Class 2 Toolkit

Tool Kit

TK UI

SMS API

RIL

SMS Router

TAPI

TSP

Page 58: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM Toolkit FunctionsSIM Toolkit FunctionsFunction GSM Comments

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_SendSimToolkitCmdResponse

+CSIM Sends a response to a proactive toolkit command

RIL_SendSimToolkitEnvelopeCmd

+CSIM Sends an envelope command to the SIM

RIL_TerminateSimToolkitSession

+CSIM Terminates a toolkit session

Page 59: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

SIM Toolkit SIM Toolkit NotificationsNotificationsdwCode lpData Comments

RIL_NOTIFY_SIMTOOLKITCMD dwByteCount Proactive SIM command received

RIL_NOTIFY_SIMTOOLKITCALLSETUP

dwRedialTimeout

Proactive SIM command to setup a call

RIL_NOTIFY_SIMTOOLKITEVENT dwByteCount Toolkit command was handled by the radio or radio sent a toolkit response to the SIM

Page 60: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Scenario – Sample BootScenario – Sample BootRIL_InitRIL_InitRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGEDRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGED RIL_READYSTATE_INITIALIZEDRIL_READYSTATE_INITIALIZEDRIL_SetEquipmentStateRIL_SetEquipmentState RIL_RADIOSUPPORT_ONRIL_RADIOSUPPORT_ONRIL_SetCurrentAddressIdRIL_SetCurrentAddressId 00RIL_RegisterOnNetworkRIL_RegisterOnNetworkRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGEDRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGED RIL_READYSTATE_SIMRIL_READYSTATE_SIMRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGEDRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGED RIL_READYSTATE_SMSRIL_READYSTATE_SMSRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGEDRIL_NOTIFY_RADIOEQUIPMENTSTATECHANGED RIL_READYSTATE_UNLOCKEDRIL_READYSTATE_UNLOCKEDRIL_GetDevCapsRIL_GetDevCaps RIL_CAPSTYPE_LOCKFACILITIESRIL_CAPSTYPE_LOCKFACILITIESRIL_GetDevCapsRIL_GetDevCaps

RIL_CAPSTYPE_SIGNALQUALITYIMPLEMENTATIONRIL_CAPSTYPE_SIGNALQUALITYIMPLEMENTATIONRIL_GetEquipmentStateRIL_GetEquipmentStateRIL_GetRegistrationStatusRIL_GetRegistrationStatusRIL_GetGPRSRegistrationStatusRIL_GetGPRSRegistrationStatusRIL_GetCurrentPrivacyStatusRIL_GetCurrentPrivacyStatusRIL_GetCurrentSystemTypeRIL_GetCurrentSystemTypeRIL_GetDevCapsRIL_GetDevCaps RIL_CAPSTYPE_SIMSUPPORTRIL_CAPSTYPE_SIMSUPPORTRIL_SetEquipmentStateRIL_SetEquipmentState RIL_EQSTATE_FULLRIL_EQSTATE_FULLRIL_NOTIFY_REGSTATUSCHANGEDRIL_NOTIFY_REGSTATUSCHANGED RIL_REGSTAT_ATTEMPTINGRIL_REGSTAT_ATTEMPTINGRIL_NOTIFY_REGSTATUSCHANGEDRIL_NOTIFY_REGSTATUSCHANGED RIL_REGSTAT_HOMERIL_REGSTAT_HOMERIL_GetSignalQualityRIL_GetSignalQualityRIL_GetRegistrationStatusRIL_GetRegistrationStatusRIL_GetSubscriberNumbersRIL_GetSubscriberNumbersRIL_GetCurrentOperatorRIL_GetCurrentOperatorRIL_GetSimRecordStatusRIL_GetSimRecordStatus Operator Name StringOperator Name StringRIL_GetSimRecordStatusRIL_GetSimRecordStatus Operator Name Short FormOperator Name Short FormRIL_SetAudioGainRIL_SetAudioGainRIL_GetSimRecordStatusRIL_GetSimRecordStatus Voice Mail FlagVoice Mail FlagRIL_GetSimRecordStatusRIL_GetSimRecordStatus Call Forwarding FlagCall Forwarding FlagRIL_GetAudioMutingRIL_GetAudioMutingRIL_GetSimRecordStatusRIL_GetSimRecordStatus Voice Mail NumberVoice Mail Number

Page 61: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

DialParserDialParser Coupled with both RIL and Dialing applicationsCoupled with both RIL and Dialing applications Access supplemental services using a dial stringAccess supplemental services using a dial string

Call forwarding, call waiting, call hold, etc.Call forwarding, call waiting, call hold, etc. e.g. #31# +14259363938 <SEND>e.g. #31# +14259363938 <SEND>

Dialparser

Dialer App

AssistedTAPI

OtherModules

RIL

Page 62: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Modem Link (ATCI)Modem Link (ATCI)

AT Command Interpreter (ATCI)AT Command Interpreter (ATCI) Exposes an AT interface for laptop dial-upExposes an AT interface for laptop dial-up Only V.25ter support, but architecture is Only V.25ter support, but architecture is

extensibleextensible Laptop dialup using serial, IrDA, IrDial, USB, Laptop dialup using serial, IrDA, IrDial, USB,

Bluetooth Bluetooth

TAPIExTAPI

Telephony SP

VSP Radio Interface Layer (RIL)

ATCI

Page 63: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Wireless Application Wireless Application ProtocolProtocol

Applications / UI

Stinger Core API

Windows API

Logic Module

Core Provider

HW Interface

Radio Software

SMS API

Radio Stack

Radio Interface Layer (RIL)

Router

Text WDP Etc

SIMAPI

TAPIExTAPI

Telephony SP PPP

TCP/IP

Winsock

ToolKit

TK UI

Connection Manager

Voice Data EtcATCI

AssistedTAPI

WTP

WTLS

WDP

VSP

Page 64: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

WAPWAP WTP: reliable transactionsWTP: reliable transactions WTLS: secure datagramsWTLS: secure datagrams WDP: unreliable datagrams over many WDP: unreliable datagrams over many

bearersbearers

RIL

Hardware

SMS API

Router TCP/IP

Winsock

Wireless Datagram Protocol

Other Clients

Wireless Transaction Protocol

Wireless Transport Layer Security

PIE Browser

HTTPWAP

Page 65: CellCore and RIL Overview. CellCore Goals  Improve key Win32 APIs to seamlessly support digital cellular  Focus on TAPI and Win32  Fortify Win32 API

Legal Disclaimer  The presentation and this document (collectively, the “Materials”) are for informational purposes only.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THE MATERIALS. Complying with all applicable copyright laws is the responsibility of the user.  Without limiting the rights under copyright, no part of these Materials may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.  Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in these Materials.  Except as expressly provided in any written license agreement from Microsoft, the furnishing of these materials does not give you any license to these patents, trademarks, copyrights, or other intellectual property. © 2003 Microsoft Corporation.  All rights reserved. Microsoft is a registered trademark of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.