ǰλãҳ >> Ϣͨ >>

չѶƽ̨Ӧѵ̲


2G/2.5G Ӧƽ̨

Software Dept.

Jakle zhu 11.09.2004

Ҫ
? Ӧƽ̨ ? Ӧƽ̨ӿ ? ֹ֧߽ ? ʹǵƽ̨

2

Ӧƽ̨(SAP)

>Software Application Platform

3

Ӧƽ̨
Call SMS CBS SS PB Game . MMI E-Mail

MMS/WEB
ATC

Multimedia Applications Audio/Video/Test

Java App

PTT SIP

H.324/M RTP/RTCP

J2ME

WAP

SOFTWARE APPLICATION PLATFORM MMI Platform OSA EFS DALLCD,KPD,CHR AUDIO, VIDEO MIDI MP3 MPEG4 H.263 Engines

MN (Call,CB,NV,SS,SMS,GPRS) TCP/UDP IP/PPP Layer 3 Layer 2

RTOS

Diagnostics

Drivers(HAL)

Layer 1

4

ƽ̨ṩFeatures ? GSM/GPRSͨźݷ. ? ͳһRTOSAPIs * ThreadƣTimer, Memory Management, Message Queue ? ṩTBIOS APIs,ܿٵӦӲĸġ * LCD, Keypad, Charging, EFS, RTC, Audio. ? ˲ֵṩĽ ? ʹclient-serverƣͬʱֶ֧Ӧ ? ṩAPIs

5

ЭĻṹ
Applications PPP smscb call,ss sms SMRL CM MM RR GRR LLC DL RLC/MAC Physical Layer SIM SM SNDCP GMM MN phone
(data mng) (GPRS)

TCP/IP

6

ЭṩFeatures ? Based on 3GPP Release 1999 (200.6). ? Qual Band.(850/900/1800/1900) ? Basic Call Functions.

? ? ? ?

Multiparty Call. SMS, SMSCB SS Service GPRS Class 10.

7

Ӧƽ̨ӿڽ
1 OSAļϵͳӿ 2 TBIOS(Terminal Basic I/O System)ӿ 3 Эӿ 4 MMIƽ̨ӿ

8

OSAļϵͳӿ
? OSAOS Abstract layerṩOSķװ ? ṩ̡߳ʱԴСԴӡϢע ᡢڴжϵȽӿ ? ṩݱ׼Cļӿ ? OSAӿڶos_api.h ? ļϵͳӿڶefs.h

9

OSAӿ
? ? ? ? ? ? ? ? ڴ ̹߳ ʱ Դ ע Ϣ ж ӡ

10

ӿͨŷʽ
? Client-Server ? APIs & Call back ? עȥע
uint32 SCI_RegisterMsg(uint32 server_ID, uint32 ui_start_event,uint32 ui_end_event, reg_callback func); úע¼ȡijijЩ ķ¼ע ? uint32 SCI_UnregisterMsg(uint32 server_ID, uint32 ui_start_event,uint32 ui_end_event, reg_callback func); úעע¼
ע

Client

APIs

call back

ע ʱ

Server

11

ļϵͳĽ

? ļϵͳ֧8192ļʹÿռFlash ûԸFlashĴСļϵͳʹÿ 䣬Ķɲμû˵ĵ ? ṩݱ׼Cļϵͳӿ ? ṩһּ򵥶ֱӵķʽȡûСݣԸ ӿٵʵֶһЩСIJĴȡ ? Ŀǰļϵͳֻ֧NorFlash ? ֧Fat16ļϵͳ20053µã֧Nand FlashĴȡ

12

ļϵͳĻ

ļ E F S

ļϵͳ

ļ



ļ



13

ļϵͳĻܣ
? ûӿڲ(API) ûӿڲṩļAPIӦIJ͸ ļϵͳ㣬á ? ļϵͳ òṩļϵͳռȡƣд òΪһ߳УIO ? 豸 òṩһ豸㣬Ը豸 ֲͬ豸 ? 豸 òṩʵʵ豸ȫĶдȲ

14

ļϵͳAPIs
? ׼ļӿ
? EFS_fopen ? EFS_fclose ? EFS_fread ? EFS_fwrite ? EFS_fputc ? EFS_fgetc ? EFS_fseek ? EFS_ftell ? EFS_feof ? EFS_chsize

? 첽ļӿ
?EFS_Create ?EFS_Close ?EFS_GetLength ?EFS_Seek ?EFS_Read ?EFS_Write ?EFS_Delete ?EFS_Rename ?EFS_CreateDir ?EFS_DeleteDir..
15

NVӿ
? ˱׼ļϵͳӿڣչѶṩһ׻ò ķʽӿڣҪԤƵijԼûڲ ֻʱȡ ? ŵڶȡЩʱԷdzĿ죬ÿ ϵͳӰ

16

OSAļϵͳӿڡοļ
οOS_api.hefs.hĵ

17

TBIOSӿ

TBIOS: Terminal Basic IO System
? Device Abstract Layer ? Hardware Abstract Layer

18

TBIOSӿڽ
? TBIOSҪṹһ 豸ĽӿDAL(Device Abstract Layer)֮һӲĽӿ HAL(Hardware Abstract Layer) DALҪLCDΧ豸ķ ʽӿ HALҪǻչѶоƬij㣬 ȷоƬ漰ϲʵֵı ֻΧ豸ڲϵĸ£û ԼҪʵԼΧ ݽҪļΧ豸 Ľӿ
APP DAL DALʵ HAL HALʵ Ӳ

? ?

? ?

19

DALӿ---LCD
? LCDӿͷļdal_lcd.h ? LCDӿں
? LCDʼLCD_Init ? رLCDLCD_Close ? ȡLCDϢLCD_GetInfo ? ˢLCDijLCD_InvalidateRect ? LCDȫˢ£LCD_Invalidate ? /Ƴ˯ģʽLCD_EnterSleep ? LCDԱȶȣLCD_SetContrast

20

DALӿ----Keypad
? ӦóͨעӦ Ϣ֪ͨKeypad ServerҪʲôϢ Keypad Serverյ ļϢʱͨ Ϣ֪ͨϲAPP
APP Register Signal

Keypad Server Callback function Keypad ISR

? Keypadӿļdal_keypad.h

21

DAL ӿڡflashĽӿ
? ? ? ? ? ? ? ? ? ? Flash_Init Flash_Close Flash_Read Flash_Write Flash_Copy Flash_Erase Flash_(Un)Lock Flash_GetDeviceInfo ԰ļϵͳNVֲͬ豸磺ͬflash SRAMļģ⡣Ҫ޸豸д ʵ֣flash.cҲflashгĹܡ

22

DALӿ---Audioӿ
ֵ֧Audio types: Generic Tone Customer Tone(Ƶʵĺϳ) DTMF Ring(MIDI, Customer Tone, WAV etc.) MP3 ? Voice ͨĹ ? ֧Audioģʽ Handhold Hand free Earphone μDAL_Audio.h ?

23

DALӿڲο
οDALӿĵͷļ DAL_XXX.h

24

ЭӿڣMN
PSͨMNϲṩӿڡ MNҪɼɣ ? ػģPhone ? пCALL ControlCC ? ϢSMS ? 㲥ϢSMSCB ? GPRSҵ ? ҵSS ? ݹData ManagerDM

25

MNӿͨž
Call
MNCALL_StartCall

עCall ¼ ṩص cc_callBack

EV_MN_APP_CONNECTING_IND_F cc_callBack

Phone Server

Call Server

SMS Server

飻ص÷Ϣķʽ ṩĬϵcall back
26

עʾ
#include mn.h void MyCallBackFunc( uint32 taskid,//taskid which task want to receive the event uint32 msgtype, // event id void *argv // data follow the event ); SCI_RegisterMsg( MN_APP_PHONE_SERVICE, EV_MN_APP_NETWORK_STATUS_IND_F, EV_MN_APP_PLMN_SELECT_IND_F, &MyCallBackFunc );

27

PhoneģҪAPI
? ? ? ? ? ? ? ? ? ? ? ? ? MNPHONE_SelectPLMNѡ MNPHONE_ListPLMNб MNPHONE_PowerOffػ MNPHONE_SetServiceTypeֻ MNPHONE_EnableRoaming MNPHONE_VoiceControl MNPHONE_ResponseCHVSIMӦ MNPHONE_OperateCHVSIMCHV MNPHONE_GetRSSIOfNCELLȡڽСźǿ MNPHONE_StartupPs MNPHONE_GprsDetachGPRS Detach MNPHONE_GSMDetachGSM detach

28

PhoneģEvents

? ? ? ? ? ? ? ? ? ?

EV_MN_APP_SIMCARD_READY_IND_F, /* simcard worked ok */ EV_MN_APP_SIMCARD_NOT_READY_IND_F, /* simcard not ready */ EV_MN_APP_SCELL_RSSI_IND_F, /* SCELL power indicator */ EV_MN_APP_DEACTIVE_PS_CNF_F, /* power off now */ EV_MN_APP_NCELL_RSSI_CNF_F, /* response for ncell rssi req */ EV_MN_APP_AOC_MODIFIED_IND_F, /* ind acm increased */ EV_MN_APP_FDN_SERVICE_IND_F, /* ind fdn enable or disable */ EV_MN_APP_PIN_FUNC_CNF_F, /* pin func cnf */ EV_MN_APP_PLMN_LIST_CNF_F, /* plmn list result to app */ EV_MN_APP_PLMN_SELECT_CNF_F, /* plmn select result to app */

29

CALLģAPI
? ? ? ? ? ? ? ? ? ? ? ? ? ? MNCALL_StartCall MNCALL_ConnectCall Ӧ MNCALL_DisconnectCall ͷź MNCALL_ReleaseActiveCalls ͷеĺ MNCALL_HoldCall MNCALL_RetrieveCall MNCALL_SwapCalls ʵ MNCALL_ModifyCall ı MNCALL_StartDTMF ʼDTMF MNCALL_StopDTMF ֹͣDTMF MNCALL_IndicateAlert ָʾ MNCALL_ReplyModification Ӧ޸ MNCALL_BuildMPTY ෽ͨ MNCALL_SplitMPTY ෽ͨ

30

SMSģAPI
? ? ? ? ? ? ? ? ? MNSMS_GetSmsStatuses õSIMжϢ״̬ MNSMS_ReadSms ȡϢ MNSMS_UpdateSmsStatus һϢ״̬ MNSMS_AppSendSms ͶϢ MNSMS_AppSendCommand Ϣ MNSMS_WriteMoSmsһMOϢ MNSMS_WriteMtSms һMTϢ MNSMS_ReadSimParam ȡSMS MNSMS_WriteSimParam ¶Ϣ

31

PhonebookģAPI
? ? ? ? ? ? PHONEBOOK_FindPhonebookEntryByAlpha:ĸ Ҽ¼ PHONEBOOK_FindPhonebookEntryByNum :ݺ Ҽ¼ PHONEBOOK_DeletePhonebookEntry :ɾ¼ PHONEBOOK_UpdatePhonebookEntry :ļ¼ PHONEBOOK_ReadPhonebookEntry :ȡ¼ PHONEBOOK_GetFileInfo ȡPhoneBookļϢ

Note:ṩĺǶ SIMеphonebook

32

Эӿڲο
οPSMNӿĵͷļ

33

MMIƽ̨ӿ

? Ϊ˱ڿͻƳԼIJƷչѶڵײƽ̨Ļ ƳMMIƽ̨ƽ̨ϣûԸ Ҫͨƽ̨ṩķʽ޸ͼƬ ˵Ӧ ? ûѡԼʹMMIƽ̨ ? MMIƽ̨Ľ

34

ֹ֧߽
1 ֻģMSDEV 2 LogTrace

35

ֻģ⿪ MSDEV

36

MSDEVṹ
MSDEV(WIN)

GUI / SIM simulator

OS( WIN)

MMI WAP
MN/MMI Interfaces SAP Interface( TD MN) MN/PS Interfaces TCP/UDP IP PPP
37

Socket

Control Panel

MSDEVص ? ? ? ? ? ? PCMMI . ȫSAPinterface,targetһ ƵĻվģ⡣ ƵӲģ. Ӳͬʱпtime-to-market period VCǿĵԹܣӦĿ

38

Log,trace

39

LogelߵҪ ? ʱϺͼֻ״Ĺ . ? Trace . ? Layer 3ĿϢ ? ӦôڵϢ ? ʱϢ.غͼ¼(Ncell, Scell etc.) ? ֻʱϢռͼ¼. ? طŹ.

40

ʹǵƽ̨

41

Target뿪 ARM ADS 1.2(ARM Developer Suite) * ṩGUIĿ뻷 * dzʹá

οARM ADSʹֲᡣ

42

mmi Task1

1 use_task_ID.h task_ID
#define P_APP 21 ûID붨40C50֮䡣

ûstatic tasksĿΪ10 2 APP_task.c жStack, Queueȡ
#define P_APP_STACK_SIZE 8000 uint32 P_APP_THREAD_ADDR[P_APP_STACK_SIZE >> 2]; #define P_APP_QUEUE_NUM 40 uint32 P_APP_QUEUE_ADDR[P_APP_QUEUE_NUM * SCI_QUEUE_ITEM_SIZE];

43

mmi Task2

3 APP task mmi_main.c
void APP_Task( uint32 argc, void * argv) { //ϵͳʼ // SCI_GetSignal(); Ϣ // Ϣ̡ // Free Signal; }

44

mmi Task3

4 taskĽSCI_InitAppTasks()еý μapp_task.c
#define CREATE_APP_STATIC_THREAD(NAME, THREAD_ENTRY, PRIO) \ SCI_CreateStaticThread( NAME, "T_"#NAME, HREAD_ENTRY, \ 0, 0, NAME##_THREAD_ADDR, NAME##_STACK_SIZE, PRIO, \ SCI_PREEMPT, "Q_"#NAME, NAME##_QUEUE_ADDR, \ NAME##_QUEUE_NUM, SCI_AUTO_START); SCI_InitAppTasks(void) { CREATE_APP_STATIC_THREAD(P_APP, APP_Task, SCI_PRIORITY_LOWEST); } Notes:ϵͳڳʼʱԴ˺ӦĴ
45

SignalĶʹ 1 SignalĽṹ Header: uint16 SignalCode; uint16 SignalSize; xSignalHeader Pre; xSignalHeader Suc; BLOCK_ID Sender; // Sender Body: Signal signal

46

SignalĶʹ

2 Signal Create
xSignalHeaderRec *signal_ptr = PNULL; // allocate signal memory // Fill the signal body

3 Signal Send
SCI_SendSignal( xSignalHeader signal_ptr, BLOCK_ID dest_id );

4 Signal Receive
xSignalHeader SCI_GetSignal(BLOCK_ID thread_id );

47

Signalʹ 1
1 SignalĶ mmi_siganl_ext.hж SignalID. (signal Code) type enum {. signal_1}; SignalĽṹ type struct { uint16 SignalCode; uint16 SignalSize; xSignalHeader Pre; xSignalHeader Suc; BLOCK_ID Sender; // Sender Signal_Body_T signal_1; }Signal_1_T;
48

Signalʹ 2

2 SignalCreateSend
xSignalHeaderRec *signal_ptr = PNULL; signal_ptr = xSignalHeaderRec*)SCI_ALLOC(size(Signal_1_T)); SCI_ASSERT((signal_ptr ) != SCI_NULL); SCI_MEMSET((void*)(signal_ptr ), 0 , size(Signal_1_T)); \ signal_ptr ->SignalSize = size(Signal_1_T); signal_ptr ->SignalCode = signal_1 signal_ptr ->Sender =my_task; // fill the signal_1 body . // send the signal.. sci_SendSignal(signal_ptr, dest_task_id);

49

Signalʹ 3

3 SignalĽպFree
xSignalHeaderRec *signal_ptr = PNULL signal_ptr = SCI_GetSignal(P_APP); switch(signal_ptr ->SignalCode) { siganlĴ̣ } SCI_FREE(signal_ptr );

50

NV Itemʹ(1)

NV ItemĽ
XXX_nv.hжNV ID type enum { NV_ITEM1_ID, } Notes: ֵķΧΪ500- 800 type struct { uint32 para1; uint16 para2; }NV_ITEM1_T;

51

NV Itemʹ(2) 2 NV itemʹ
NV_ITEM1_T nv_item1; If(MN_RETURN_FAILURE== MNNV_ReadItem(NV_ITEM1_ID, sizeof(NV_ITEM1_T), nv_item1)) { //罫defaultֵд MNNV_WriteItem(NV_ITEM1_ID, sizeof(NV_ITEM1_T), nv_item1) } //һʹãҪʹдĺdefaultֵд MNNV_WriteItem(NV_ITEM1_ID, sizeof(NV_ITEM1_T), nv_item1)

52

ʹLogel⣨ 1 LogelеTrace
ʹSCI_TRACE_LOWٺͲ쿴״ SCI_TRACE_LOW("HandleSimNotReadyInd:reason is %d",sim_not_ready_ind.reason);

53

ʹLogel⣨ 2 쿴Ϣ(Layer 3, Layer 2)

54

ʹLogel⣨3 3 쿴NcellScellϢ

55

ʹLogel⣨ ֻassert,쿴ʱϢ

56

Q&A
57

Thank You!
58


:
չѶƽ̨ѵ
ڲ ڲ ļ ļ:չѶƽ̨ѵ ļ: 汾:V0.1  ˻ǩ ׼ ׼ (ϲ) (...
չѶƽ̨˵
ĿάʹõGNU׼Ӧű,ЩӦ...ļͷļλ չѶſļ...չѶƽ̨ѵ 16ҳ չѶƽ̨ 9ҳ ...
չѶƽ̨ƵҪ
չѶƽ̨ƵҪ_Ӧ_IT/_רҵϡչѶƽ̨Ƶ...չѶƽ̨ܽ 15ҳ 3ȯ չѶƽ̨չѶƽ̨ѵ ...
չѶƽ̨ڴ
չѶƽ̨ڴ_Ӧ_IT/_רҵϡѡ,Ҫĵ...չѶƽ̨ѵ 16ҳ չѶƽ̨ѧϰ̳ 87ҳ 2ȯ չѶƽ̨ˢ...
չѶָ
5.1 Ӧó mmi_res_prj_def.h ļ,һģ RES_ADD_MODULE(...չѶƽ̨ѵ 16ҳ չѶƽ̨˵ 28ҳ 1ȯ չѶ...
ѵ
ѵ_Ӧ_IT/_רҵϡ ѵʲôǸûҪϵͳϵͳе ֵ...
ֻappѵγ
ֻappѵγ_Ӧ_IT/_רҵϡڹȥƶappƽ̨,ΪƶԱ,ΪiOSƽ̨һܿϲƽ̨...
ERPʵѵ̡̳
ERPʵѵ̡̳_Ӧ_IT/...ǹʵѵʵ̲, UAP ƽ̨...ѵγ̹ 1.2.3 ձ 1.2.4 ...
չѶƽ̨
չѶƽ̨չѶƽָ̨չѶ˾(spreadtrum)ֻƽ̨, ...չѶƽ̨ܹ_1 49ҳ չѶƽ̨ѵ 16ҳ չѶƽ̨ѧϰ...
չѶHRWƽ̨زļ˵
չѶHRWƽ̨زļ˵_Ӧ_IT/_רҵ...չѶƽ̨ѵ 16ҳ չѶƽ̨ѧϰ̳ 87ҳ 2ȯ չѶƽ̨...
رǩ:
չѶƽ̨ | Ӧñƽ̨ | ΢Ӧÿƽ̨ | ѶӦñƽ̨ | Ӧû㿪ƽ̨ | ٶӦÿƽ̨ | Ӧñƽ̨ | СӦÿƽ̨ |