1、问题现象
MTK平台项目中出现一个5G图标显示问题,注册5G时,拨打电话,对比机图标显示回落到4G,测试机一直显示5G。
2、原因分析
2.1、NSA显示规则
根据GSMA协议,NSA架构下5G图标显示有如下4种.
2.2、Android中显示5G逻辑
对于Android手机来说,状态栏显示NSA注册了5G,有如下两个条件
条件1:UNSOL_PHYSICAL_CHANNEL_CONFIG有辅小区存在
04-19 10:18:38.690358 2200 2357 D RILJ : [UNSL]< UNSOL_PHYSICAL_CHANNEL_CONFIG [{mConnectionStatus=PrimaryServing,mCellBandwidthDownlinkKhz=15000,mCellBandwidthUplinkKhz=15000,mNetworkType=LTE,mFrequencyRange=MID,mDownlinkChannelNumber=3075,mUplinkChannelNumber=21075,mContextIds=[1500, 1601],mPhysicalCellId=159,mBand=7,mDownlinkFrequency=2652500,mUplinkFrequency=2532500}, {mConnectionStatus=SecondaryServing,mCellBandwidthDownlinkKhz=80000,mCellBandwidthUplinkKhz=80000,mNetworkType=NR,mFrequencyRange=HIGH,mDownlinkChannelNumber=622656,mUplinkChannelNumber=620062,mContextIds=[1500, 1601],mPhysicalCellId=45,mBand=78,mDownlinkFrequency=3339840,mUplinkFrequency=3300930}] [PHONE0]
04-19 10:18:38.690758 2200 2200 D MTKSST : [GsmSST0] NR state changed from NOT_RESTRICTED to CONNECTED.
条件2:Modem上报SIB2中ULI有指示eNB支持5G锚点
参考如下文档
https://www.sharetechnote.com/html/5G/5G_NR_Indication.html
对应的AP log
04-19 10:19:26.256647 2200 2357 D RILJ : [7907]< DATA_REGISTRATION_STATE {.regState = REG_HOME, .rat = LTE, .reasonForDenial = NONE, .cellIdentity = {.lte = {.base = {.base = {.mcc = 732, .mnc = 101, .ci = 3965953, .pci = 159, .tac = 20006, .earfcn = 3075}, .operatorNames = {.alphaLong = #CoberturaCLARO, .alphaShort = CLARO}, .bandwidth = 10000}, .additionalPlmns = [], .optionalCsgInfo = {.noinit = {}}, .bands = [7]}}, .registeredPlmn = 732101, .accessTechnologySpecificInfo = {.eutranInfo = {.lteVopsInfo = {.isVopsSupported = true, .isEmcBearerSupported = false}, .nrIndicators = {.isEndcAvailable = true, .isDcNrRestricted = false, .isNrAvailable = true}}}} [PHONE0]
2.3、Log分析定位
对于UNSOL_PHYSICAL_CHANNEL_CONFIG,对比机和测试表现一样,当时SIB2标签的表现,确截然不同。
测试机相关变量打印一直是true
04-19 10:19:26.256647 2200 2357 D RILJ : [7907]< DATA_REGISTRATION_STATE {.regState = REG_HOME, .rat = LTE, .reasonForDenial = NONE, .cellIdentity = {.lte = {.base = {.base = {.mcc = 732, .mnc = 101, .ci = 3965953, .pci = 159, .tac = 20006, .earfcn = 3075}, .operatorNames = {.alphaLong = #CoberturaCLARO, .alphaShort = CLARO}, .bandwidth = 10000}, .additionalPlmns = [], .optionalCsgInfo = {.noinit = {}}, .bands = [7]}}, .registeredPlmn = 732101, .accessTechnologySpecificInfo = {.eutranInfo = {.lteVopsInfo = {.isVopsSupported = true, .isEmcBearerSupported = false}, .nrIndicators = {.isEndcAvailable = true, .isDcNrRestricted = false, .isNrAvailable = true}}}} [PHONE0]
对比机 相关变量打印一直是false
04-24 09:55:34.010 1917 2026 D RILJ : [0476]< DATA_REGISTRATION_STATE {.regState = REG_HOME, .rat = LTE, .reasonForDenial = NONE, .cellIdentity = {.lte = {.base = {.base = {.mcc = 732, .mnc = 101, .ci = <MASKED>, .pci = <MASKED>, .tac = <MASKED>, .earfcn = -1}, .operatorNames = {.alphaLong = #CoberturaCLARO, .alphaShort = CLARO}, .bandwidth = -1}, .additionalPlmns = [], .optionalCsgInfo = {.noinit = {}}, .bands = []}}, .registeredPlmn = 732101, .accessTechnologySpecificInfo = {.eutranInfo = {.lteVopsInfo = {.isVopsSupported = true, .isEmcBearerSupported = false}, .nrIndicators = {.isEndcAvailable = false, .isDcNrRestricted = false, .isNrAvailable = false}}}} [PHONE0]
此处区别造成了5G显示不同。那运营商上,到底支持SIB2的ULI吗?
通过AT命令搜索EGREG,可以看到该运营商不支持SIB2的ULI
对比机Modem Log中未到EGREG AT命令,通过搜索CSCON来确认5G是否注册
结论:运营商并不支持SIB2的ULI,那测试机显示为什么显示5G呢?
MTK Case给出了结论,如果之前注册了5G,RILD会报错相关缓存,因此还会显示5G.
3、修改方案
MTK支持如下3中显示
MTK Mobile log里面有一个property文件:properties
可以在里面搜索persist.vendor.radio.nr_display_rule对应的值,没有没有搜索到任何定义,那代表贵司用的是Config D+Cache
如果property value为0,代表Config D
如果property value为1,代表Config D+Cache
如果property value为4,代表Config A+D+Timer1/2
默认没有配置即D + Cache。但是运营商不支持SIB2的ULI,对比机使用D config,但是没有Cache,而测试机有Cache,因此表现不一样。
配置为Config D后问题解决