[DESCRIPTION]
如果想要关闭modem的某些band,可以在AP端下发 AT+EPBSE 命令来实现。
对该AT命令的说明如下:
•Used to query and set band mode
•Usage :
•Usage :
Query : AT+EPBSE?
其返回内容为: +EPBSE: <gsm_band>,<umts_band>,<lte_band_1_32>, <lte_band_33_64>
Set: AT+EPBSE=<gsm_band>,<umts_band>,<lte_band_1_32>,<lte_band_33_64>
其返回内容为: +EPBSE: <gsm_band>,<umts_band>,<lte_band_1_32>, <lte_band_33_64>
Set: AT+EPBSE=<gsm_band>,<umts_band>,<lte_band_1_32>,<lte_band_33_64>
[SOLUTION]
在Java层,可以调用 Phone.java 的 invokeOemRilRequestStrings()方法来下发AT命令。
API : invokeOemRilRequestStrings
Interface defined in Phone.java
Implemented in Phonebase.java
Interface defined in Phone.java
Implemented in Phonebase.java
![invokeOemRilRequestStrings](https://onlinesso.mediatek.com/FAQ%20PDF%20Picture%20Library/2016/1019//6356946473609759461627452762%E5%9B%BE%E7%89%871.png)
Example - Query
![query](https://onlinesso.mediatek.com/FAQ%20PDF%20Picture%20Library/2016/1019//635694648133660152504243036%E5%9B%BE%E7%89%872.png)
mPhone : Phone instance
Handler : used to receive response
EVENT_ID : response event ID
Handler : used to receive response
EVENT_ID : response event ID
Example – Set
![set](https://onlinesso.mediatek.com/FAQ%20PDF%20Picture%20Library/2016/1019//6356946487478132391210091476%E5%9B%BE%E7%89%873.png)
mPhone : Phone instance
Handler : used to receive response
EVENT_ID : response event ID
GSM_Band : GSM band mode
UMTS_Band : UMTS band mode
LTE_Band_1_32 : value for LTE Band 1~32
LTE_Band_33_64 : value for LTE Band 33~64
Handler : used to receive response
EVENT_ID : response event ID
GSM_Band : GSM band mode
UMTS_Band : UMTS band mode
LTE_Band_1_32 : value for LTE Band 1~32
LTE_Band_33_64 : value for LTE Band 33~64
这里的GSM_Band、UMTS_Band、LTE_Band_1_32、LTE_Band_33_64对应所要设置的频段。
一个例子是: AT+EPBSE=138,131,134217941,480
开机默认关闭某些band
如果需要在开机的情况下,默认就关闭某些band,可以在GSM RILD初始化时,在 initializeCallback() 函数中下发AT+EPBSE命令。
对应的代码文件列举如下:
M0.mp7/M0.mp9: vendor/mediatek/proprietary/hardware/ril/gsm/mtk-ril/ril_callbacks.c
M0.MP1/L版本: vendor/mediatek/proprietary/hardware/ril/mtk-ril/ril_callbacks.c
KK版本: mediatek/hardware/ril/mtk-ril/ril_callbacks.c
KK版本: mediatek/hardware/ril/mtk-ril/ril_callbacks.c
部分关键代码如下:
#ifdef MTK_RIL
static void initializeCallback(void *param)
static void initializeCallback(void *param)
{
......
/* Enable getting NITZ, include TZ and Operator Name*/
/* To Receive +CIEV: 9 and +CIEV: 10*/
at_send_command("AT+CTZR=1", NULL, getDefaultChannelCtx(rid));
/* To Receive +CIEV: 9 and +CIEV: 10*/
at_send_command("AT+CTZR=1", NULL, getDefaultChannelCtx(rid));
// 可以在这里添加代码来下发 AT+EPBSE 命令。
......
}