1、问题描述
MTK平台 实验室白卡测试TDSCDMA,默认无法注册。使用移动卡测试,无此问题。
2、问题分析
查看Radio log,Radio中反复下发EFUN去开关飞行模式。
39191: 08-14 22:45:57.159210 1469 1512 D RmcWp : [0] +ECSRA info = +ECSRA: 1,0,1,1,1
39192: 08-14 22:45:57.159289 1469 1512 D RmcWp : [0] handleWorldModeUrc begin
39202: 08-14 22:45:57.175594 1469 1512 D RmcWp : [0] handleWorldModeUrc state = 0
39248: 08-14 22:45:57.180389 1469 1505 D RtcRadioCont: [0] moduleRequestRadioPower: slot0, requestPower:0, caller: 1
39263: 08-14 22:45:57.181777 1469 1505 D RtcRadioCont: [1] moduleRequestRadioPower: slot1, requestPower:0, caller: 1
39280: 08-14 22:45:57.182438 1469 1533 I AT : [0] AT> AT+EFUN=0,1 (RIL_CMD_RADIO_9 tid:513481129200)
39286: 08-14 22:45:57.182725 1469 1505 D RtcRadioCont: [2] moduleRequestRadioPower: slot2, requestPower:0, caller: 1
39774: 08-14 22:45:57.233753 1469 1533 I AT : [0] AT> AT+EFUN=0,1 (RIL_CMD_RADIO_9 tid:513481129200)
39910: 08-14 22:45:57.242045 1469 1533 I AT : [0] AT> AT+EFUN=0,1 (RIL_CMD_RADIO_9 tid:513481129200)
40586: 08-14 22:45:57.313208 1469 1505 D RtcRadioCont: [0] moduleRequestRadioPower: slot0, requestPower:1, caller: 1
40652: 08-14 22:45:57.315556 1469 1533 I AT : [0] AT> AT+EFUN=1 (RIL_CMD_RADIO_9 tid:513481129200)
41065: 08-14 22:45:57.345131 1469 1533 I AT : [0] AT> AT+EFUN=1 (RIL_CMD_RADIO_9 tid:513481129200)
为什么上层不停下发EFUN呢?调查代码整理如下
从代码逻辑来看,相关逻辑主要来源于AT命令主动触发 +ESCRA上报。导致上层主动下发EFUN。查看该AT命令
查看ESCRA相关代码,在RmmWpRequestHandler.cpp中,
int RmmWpRequestHandler::isWorldPhoneSupport() {if (RatConfig_isWcdmaSupported() && RatConfig_isTdscdmaSupported()) {logD(WP_LOG_TAG, "isWorldPhoneSupport() true");return 1;} else {logD(WP_LOG_TAG, "isWorldPhoneSupport() false");return 0;}
}void RmmWpRequestHandler::worldPhoneInitialize(int slot_id) {if (isWorldPhoneSupport()) {atSendCommand("AT+ECSRA=1");logD(WP_LOG_TAG, "AT+ECSRA=1 sent");setWorldPhonePolicy();} else {// 4M & 5M setWorldPhonePolicy.SVLTE_PROJ_TYPE svlteProjectType = getSvlteProjectType();if (isSvlteLcgSupport() || svlteProjectType == SVLTE_PROJ_DC_5M || svlteProjectType == SVLTE_PROJ_SC_5M) {setWorldPhonePolicy();}}// notify world mode change donechar worldModeState[RFX_PROPERTY_VALUE_MAX] = {0};rfx_property_get("persist.vendor.radio.wm_state", worldModeState, "1");logD(WP_LOG_TAG, "World Mode State = %s", worldModeState);if (strcmp("0", worldModeState) == 0) {int status[2] = {1, -1};logD(WP_LOG_TAG, "[worldPhoneInitialize] status[0] = %d, slot_id = %d", status[0], slot_id);// inform telcore to world mode change donesp<RfxMclMessage> urc = RfxMclMessage::obtainUrc(RFX_MSG_URC_WORLD_MODE_CHANGED, slot_id, RfxIntsData(status, 2));responseToTelCore(urc);rfx_property_set("persist.vendor.radio.wm_state", "1");}
}
如果是TDSCDMA 和UMTS都支持的话,RILD会去监听modem +ECSRA的主动上报。导致不停下发EFUN。同步提交MTK CASE确认。
MTK 回复如下
EHPLMN list contains 001012. World mode is 0x3f (LWCTG). Both TDSCDMA and WCDMA are enabled in world mode.
Initially the UMTS duplex mode was TDSCDMA_DUPLEX_MODE.
PLMN search is initiated on HPLMN_001012_UMTS. PLMN_00101F is found and UE camps on it.
As 00101F is not a China PLMN, a duplex mode switch from TDSCDMA to WCDMA is triggered.
Because of duplex mode switch procedure, AP triggers RF off due to which UE could not register to UMTS_00101F.
Could you please help to retest after changing the world mode to LTG (0x33) ?
3、解决方案
MTK工模->Telephony->World phone设置为LTG模式