[Bugfix][T108][bug-view-1796]Fix the issue of SMS not being able to wake up in sleep mode
Only Configure: No
Affected branch: GSW_V1453
Affected module: sms
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: Ie543a5695bad08f79f734abe4f50f1e89c85f8c2
diff --git a/mbtk/libgsw_lib/gsw_nw_interface.c b/mbtk/libgsw_lib/gsw_nw_interface.c
index f1a8f56..e59e24b 100755
--- a/mbtk/libgsw_lib/gsw_nw_interface.c
+++ b/mbtk/libgsw_lib/gsw_nw_interface.c
@@ -1272,24 +1272,24 @@
}
/*
-typedef enum{
- MBTK_READY_INIT = -1,
- MBTK_READY_SUCCESS,
- MBTK_READY_MODEM_FAIL,
- MBTK_READY_RESPONSE_FAIL,
- MBTK_READY_SOCKET_FAIL,
- MBTK_READY_RIL_FAIL
+typedef enum{
+ MBTK_READY_INIT = -1,
+ MBTK_READY_SUCCESS,
+ MBTK_READY_MODEM_FAIL,
+ MBTK_READY_RESPONSE_FAIL,
+ MBTK_READY_SOCKET_FAIL,
+ MBTK_READY_RIL_FAIL
}mbtk_ready_status_type;
-typedef enum gsw_hal_nw_mode_state_type
-{
- GSW_MODEM_STATE_UNKNOWN = 0,
- GSW_MODEM_STATE_ONLINE,
- GSW_MODEM_STATE_OFFLINE,
- GSW_SDK_STATE_SERVICE_DOWN,
- GSW_SDK_STATE_SERVICE_UP,// service down->up 需要routectl 重启
- GSW_SDK_STATE_GPS_DOWN,
- GSW_SDK_STATE_GPS_UP,
+typedef enum gsw_hal_nw_mode_state_type
+{
+ GSW_MODEM_STATE_UNKNOWN = 0,
+ GSW_MODEM_STATE_ONLINE,
+ GSW_MODEM_STATE_OFFLINE,
+ GSW_SDK_STATE_SERVICE_DOWN,
+ GSW_SDK_STATE_SERVICE_UP,// service down->up 需要routectl 重启
+ GSW_SDK_STATE_GPS_DOWN,
+ GSW_SDK_STATE_GPS_UP,
} gsw_mode_state_e;
*/
@@ -1353,77 +1353,77 @@
}
/*typedef struct
-{
+{
0 mbtk_radio_technology_enum type : 8; // mbtk_radio_technology_enum
1 uint8 rssi; // 0: 113 dBm or less
- // 1: 111 dBm
- // 2��30: 109��53 dBm
- // 31: 51 dBm or greater
- // 99: not known or not detectable
+ // 1: 111 dBm
+ // 2��30: 109��53 dBm
+ // 31: 51 dBm or greater
+ // 99: not known or not detectable
2 uint8 rxlev;// 0:rssi < -110 dBm
- // 1: -110 dBm �� rssi < -109 dBm
- // 2: -109 dBm �� rssi < -108 dBm
- // ......
- // 61: -50 dBm �� rssi < -49 dBm
- // 62: -49 dBm �� rssi < -48 dBm
- // 63: -48 dBm �� rssi
- // 99: not known or not detectable
+ // 1: -110 dBm �� rssi < -109 dBm
+ // 2: -109 dBm �� rssi < -108 dBm
+ // ......
+ // 61: -50 dBm �� rssi < -49 dBm
+ // 62: -49 dBm �� rssi < -48 dBm
+ // 63: -48 dBm �� rssi
+ // 99: not known or not detectable
3 uint8 ber; // 0...7 as RXQUAL values in the table in 3GPP TS 45.008 [20] subclause 8.2.4
- // 99 not known or not detectable
+ // 99 not known or not detectable
4 uint8 rscp; // 0: rscp < -120 dBm
- // 1: -120 dBm �� rscp < -119 dBm
- // 2: -119 dBm �� rscp < -118 dBm
- // ......
- // 94: -27 dBm �� rscp < -26 dBm
- // 95: -26 dBm �� rscp < -25 dBm
- // 96: - 25 dBm �� rscp
- // 255: not known or not detectable
+ // 1: -120 dBm �� rscp < -119 dBm
+ // 2: -119 dBm �� rscp < -118 dBm
+ // ......
+ // 94: -27 dBm �� rscp < -26 dBm
+ // 95: -26 dBm �� rscp < -25 dBm
+ // 96: - 25 dBm �� rscp
+ // 255: not known or not detectable
5 uint8 ecno; // 0: Ec/Io < -24 dB
- // 1: -24 dB �� Ec/Io < -23.5 dB
- // 2: -23.5 dB �� Ec/Io < -23 dB
- // ......
- // 47: -1 dB �� Ec/Io < -0.5 dB
- // 48: -0.5 dB �� Ec/Io < 0 dB
- // 49: 0 dB �� Ec/Io
- // 255: not known or not detectable
+ // 1: -24 dB �� Ec/Io < -23.5 dB
+ // 2: -23.5 dB �� Ec/Io < -23 dB
+ // ......
+ // 47: -1 dB �� Ec/Io < -0.5 dB
+ // 48: -0.5 dB �� Ec/Io < 0 dB
+ // 49: 0 dB �� Ec/Io
+ // 255: not known or not detectable
6 uint8 rsrq; // 0: rsrq < -19.5 dB
- // 1: -19.5 dB �� rsrq < -19 dB
- // 2: -19 dB �� rsrq < -18.5 dB
- // ......
- // 32: -4 dB �� rsrq < -3.5 dB
- // 33: -3.5 dB �� rsrq < -3 dB
- // 34: -3 dB �� rsrq
- // 255: not known or not detectable
+ // 1: -19.5 dB �� rsrq < -19 dB
+ // 2: -19 dB �� rsrq < -18.5 dB
+ // ......
+ // 32: -4 dB �� rsrq < -3.5 dB
+ // 33: -3.5 dB �� rsrq < -3 dB
+ // 34: -3 dB �� rsrq
+ // 255: not known or not detectable
7 uint8 rsrp; // 0: rsrp < -140 dBm
- // 1: -140 dBm �� rsrp < -139 dBm
- // 2: -139 dBm �� rsrp < -138 dBm
- // ......
- // 95: -46 dBm �� rsrp < -45 dBm
- // 96: -45 dBm �� rsrp < -44 dBm
- // 97: -44 dBm �� rsrp
- // 255: not known or not detectable
+ // 1: -140 dBm �� rsrp < -139 dBm
+ // 2: -139 dBm �� rsrp < -138 dBm
+ // ......
+ // 95: -46 dBm �� rsrp < -45 dBm
+ // 96: -45 dBm �� rsrp < -44 dBm
+ // 97: -44 dBm �� rsrp
+ // 255: not known or not detectable
8 uint8 ss_rsrq; // 0: ss_rsrq < -43 dB
- // 1: -43 dB <= ss_rsrq < -42.5 dB
- // 2: -42.5 dB <= ss_rsrq < -42 dB
- // ......
- // 125: 19 dB <= ss_rsrq < 19.5 dB
- // 126: 19.5 dB <= ss_rsrq < 20 dB
- // 255: not known or not detectable
- uint8 ss_rsrp; // 0: ss_rsrp < -156 dBm
- // 1: -156 dBm <= ss_rsrp < -155 dBm
- // 2: -155 dBm <= ss_rsrp < -154 dBm
- // ......
- // 125: -32 dBm <= ss_rsrp < -31 dBm
- // 126: -31 dBm <= ss_rsrp
- // 255: not known or not detectable
- uint8 ss_sinr; // 0: ss_sinr < -23 dB
- // 1: -23 dB ss_sinr < -22.5 dB
- // 2: -22.5 dB ss_sinr < -22 dB
- // ......
- // 125: 39 dB ss_sinr < 39.5 dBm
- // 126: 39.5 dB ss_sinr < 40 dB
- // 127: 40 dB ss_sinr
- // 255: not known or not detectable
+ // 1: -43 dB <= ss_rsrq < -42.5 dB
+ // 2: -42.5 dB <= ss_rsrq < -42 dB
+ // ......
+ // 125: 19 dB <= ss_rsrq < 19.5 dB
+ // 126: 19.5 dB <= ss_rsrq < 20 dB
+ // 255: not known or not detectable
+ uint8 ss_rsrp; // 0: ss_rsrp < -156 dBm
+ // 1: -156 dBm <= ss_rsrp < -155 dBm
+ // 2: -155 dBm <= ss_rsrp < -154 dBm
+ // ......
+ // 125: -32 dBm <= ss_rsrp < -31 dBm
+ // 126: -31 dBm <= ss_rsrp
+ // 255: not known or not detectable
+ uint8 ss_sinr; // 0: ss_sinr < -23 dB
+ // 1: -23 dB ss_sinr < -22.5 dB
+ // 2: -22.5 dB ss_sinr < -22 dB
+ // ......
+ // 125: 39 dB ss_sinr < 39.5 dBm
+ // 126: 39.5 dB ss_sinr < 40 dB
+ // 127: 40 dB ss_sinr
+ // 255: not known or not detectable
} __attribute__((packed)) mbtk_signal_info_t;
*/
static void gsw_sig_info_callback(const void* data, int data_len)
@@ -2226,10 +2226,11 @@
* @retval 0: success
* @retval other: fail
*/
+
+int gsw_nw_power_mode = 0;
int gsw_network_set_power_mode(char mode)
{
- int ret = -1;
-
+ //int ret = -1;
if (nw_init_flag == 0 || nw_info_handle == NULL)
{
return GSW_HAL_NORMAL_FAIL;
@@ -2242,16 +2243,16 @@
}
if(mode == 1)
- {
- mode = 6;
- }
-
- ret = mbtk_wakeup_state_set(nw_info_handle, mode);
- if(ret != 0)
- {
- LOGE("mbtk_wakeup_state_set fail\n");
- return GSW_HAL_NORMAL_FAIL;
- }
+ gsw_nw_power_mode = 3;
+ else
+ gsw_nw_power_mode = 1;
+ LOGE("mode is %d\n",gsw_nw_power_mode);
+ // ret = mbtk_wakeup_state_set(nw_info_handle, gsw_nw_power_mode);
+ // if(ret != 0)
+ // {
+ // LOGE("mbtk_wakeup_state_set fail\n");
+ // return GSW_HAL_NORMAL_FAIL;
+ // }
return GSW_HAL_SUCCESS;