资源描述:
《android 无线启动过程分析》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、android无线启动过程分析寮€鏈鸿繃绋嬩腑鏃犵嚎妯″潡鐨勫垵濮嬪寲杩囩▼锛?rild璋冪敤鍙傝€冨疄鐜?Reference-ril.c(hardwarerilreference-ril)涓殑鍑芥暟锛?constRIL_RadioFunctions*RIL_Init(conststructRIL_Env*env,intargc,char**argv)ret=pthread_create(&s_tid_mainloop,&attr,mainLoop,NULL);staticvoid*mainLoo
2、p(void*param)ret=at_open(fd,onUnsolicited);RIL_requestTimedCallback(initializeCallback,NULL,&TIMEVAL_0);鍦?initializeCallback鍑芥暟涓鐚繘琛屼簡鍒濆鍖栥€?staticvoidinitializeCallback(void*param){ATResponse*p_response=NULL;interr;setRadioState(RADIO_STATE_OFF);at_ha
3、ndshake();/*note:wedon'tcheckerrorshere.EverythingimportantwillbehandledinonATTimeoutandonATReaderClosed*//*atchannelistolerantofechobutitmust*//*haveverboseresultcodes*/at_send_command("ATE0Q0V1",NULL);/*Noauto-answer*/at_send_command("ATS0=0",NULL);/*E
4、xtendederrors*/at_send_command("AT+CMEE=1",NULL);/*Networkregistrationevents*/err=at_send_command("AT+CREG=2",&p_response);/*somehandsets--intetheredmode--don'tsupportCREG=2*/if(errsuccess==0){at_send_command("AT+CREG=1",NULL);}at_response_free(p_respons
5、e);/*GPRSregistrationevents*/at_send_command("AT+CGREG=1",NULL);/*CallWaitingnotifications*/at_send_command("AT+CCWA=1",NULL);/*Alternatingvoice/dataoff*/at_send_command("AT+CMOD=0",NULL);/*Notmuted*/at_send_command("AT+CMUT=0",NULL);/*+CSSUunsolicitedsu
6、ppservicenotifications*/at_send_command("AT+CSSN=0,1",NULL);/*noconnectedlineidentification*/at_send_command("AT+COLP=0",NULL);/*HEXcharacterset*/at_send_command("AT+CSCS="HEX"",NULL);/*USSDunsolicited*/at_send_command("AT+CUSD=1",NULL);/*Enable+CGEVGP
7、RSeventnotifications,butdon'tbuffer*/at_send_command("AT+CGEREP=1,0",NULL);/*SMSPDUmode*/at_send_command("AT+CMGF=0",NULL);#ifdefUSE_TI_COMMANDSat_send_command("AT%CPI=3",NULL);/*TIspecific--notificationswhenSMSisready(currentlyignored)*/at_send_command(
8、"AT%CSTAT=1",NULL);#endif/*USE_TI_COMMANDS*//*assumeradioisoffonerror*/if(isRadioOn()>0){setRadioState(RADIO_STATE_SIM_NOT_READY);}}榛樿鐘跺喌涓嬪亣璁惧皠棰戞ā鍧楁槸濂界殑锛?閫氳繃setRadioState(RADIO_STATE_SIM_NOT_READY)鏉ヨЕ鍙戝鏃犵嚎妯″潡鐨勫垵濮嬪寲銆?閫氳繃s