[Bugfix][T108][bug-view-2354]Fix device band changed
Only Configure: No
Affected branch: mbtk_source_ds
Affected module: system
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: I5cb00c61411dbde81461b1606a31ab2aa45377a2
diff --git a/mbtk/mbtk_utils/device_info.c b/mbtk/mbtk_utils/device_info.c
index 63efced..cf335d7 100755
--- a/mbtk/mbtk_utils/device_info.c
+++ b/mbtk/mbtk_utils/device_info.c
@@ -11,7 +11,7 @@
/*
* Exec shell command.
*/
-/*
+
static bool shell_cmd_exec(const char *cmd, char *buf, int buf_size){
FILE *fcmd;
bool result = FALSE;
@@ -45,7 +45,7 @@
return result;
}
-*/
+
static char* band_2_str(mbtk_modem_band_area_enum band_area)
{
switch(band_area)
@@ -163,7 +163,7 @@
static int band_set_by_at(mbtk_device_info_modem_t *band)
{
char cmd[100] = {0};
-// char rsp[100] = {0};
+ char rsp[100] = {0};
// Only support 4G/5G
if(band->modem.v2.net_support & MBTK_NET_SUPPORT_5G) {
@@ -186,7 +186,7 @@
sprintf(cmd, "serial_atcmd AT*BAND=%d,%d,%d,%d,%d", band->modem.v2.net_pref, band->modem.v2.band_gsm, band->modem.v2.band_wcdma, band->modem.v2.band_tdlte, band->modem.v2.band_fddlte);
}
}
-/*
+
if(shell_cmd_exec(cmd, rsp, sizeof(rsp))) {
if(strstr(rsp, "\r\nOK\r\n")) {
return 0;
@@ -196,8 +196,6 @@
} else {
return -1;
}
- */
- return 0;
}
/*
@@ -268,6 +266,7 @@
*/
printf("Version:%d\n", info_basic.version);
if(info_basic.version == DEV_INFO_VERSION_V1) {
+ printf("Dev_info.version:%d\n", info_basic.version);
printf("Project:%s\n", info_basic.basic.v1.project);
printf("Custom_Model:%s\n", info_basic.basic.v1.project_cust);
printf("Revision_Out:%s\n", info_basic.basic.v1.revision_out);
@@ -276,6 +275,8 @@
printf("AB System:%s\n", info_basic.basic.v1.ab_support ? "Yes" : "No");
printf("Reboot flag:%d\n", info_basic.basic.v1.reboot_flag);
} else {
+
+ printf("Dev_info.version:%d\n", info_basic.version);
printf("Project:%s\n", info_basic.basic.v2.project);
printf("Custom_Model:%s\n", info_basic.basic.v2.project_cust);
printf("Revision_Out:%s\n", info_basic.basic.v2.revision_out);