Cat1 升级脚本到PY_OTA_V13 支持 接听和挂断电话带 电话号
authorSnickerSun <snickersun@163.com>
Sat, 14 Sep 2024 05:52:12 +0000 (13:52 +0800)
committerSnickerSun <snickersun@163.com>
Sat, 14 Sep 2024 05:52:12 +0000 (13:52 +0800)
cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip [new file with mode: 0644]
cat1modem/src/cat1Service.py
cat1modem/src/checkota.py
cat1modem/src/current_img/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip [moved from cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip with 100% similarity]
code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp
code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp
code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.h

diff --git a/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip b/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip
new file mode 100644 (file)
index 0000000..01d1d87
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7be93d062f35acfd2de98654ca699818935125a9544e1e4bafb3ae2bf8b5340f
+size 11640213
index 0ff7919..c45968f 100644 (file)
@@ -73,7 +73,7 @@ sms.setCallback(msg_cb)#sms注册回调
 CAT1_SERVICE_HEAD = 'FE' #固定head 
 
 PROJECT_NAME = "Cat1SlipUDPService"
-PROJECT_VERSION = "PY_SRV_V12"
+PROJECT_VERSION = "PY_SRV_V13"
 CONFIG_JSON="/usr/system_config.json"
 CURRENT_APP_TYPE="pysrv"
 
@@ -94,9 +94,9 @@ def get_default_versionvalue_by_py(app_type):
     if (app_type == "pymain"):
         return "PY_MAIN_V2"
     elif (app_type == "pyota"):
-        return  "PY_OTA_V11"
+        return  "PY_OTA_V13"
     elif (app_type == "pysrv"):
-        return  "PY_SRV_V11"
+        return  "PY_SRV_V13"
 
 #如果没有configfile则创建它
 if not ql_fs.path_exists(CONFIG_JSON):
@@ -661,20 +661,20 @@ class Cat1Service:
         return 0
 
     # 电话接听消息
-    def notifyConnecteCall(self):
+    def notifyConnecteCall(self, phone_numb):
         self.clear_remain()
         __head = '0A'
-        self.__message = '0'       
+        self.__message = str(phone_numb)       
         self.__Socket_UDP(__head, self.__message)
         # if self.__err == 1 or self.__value[2] != 'OK':
         #     return -1
         return 0
 
     # 电话拒接消息
-    def notifyDisconnectCall(self):
+    def notifyDisconnectCall(self, phone_numb):
         self.clear_remain()
         __head = '0B'
-        self.__message = '0'       
+        self.__message = str(phone_numb)            
         self.__Socket_UDP(__head, self.__message)
         # if self.__err == 1 or self.__value[2] != 'OK':
         #     return -1
@@ -956,11 +956,12 @@ def voice_callback(args):
     elif args[0] == 11:
         if eventMesh.publish("get_volte_switch") == 1: #开启VOLTE功能
             print('voicecall connected, PhoneNO: ', args[6])
-            cat1service.notifyConnecteCall()
+            cat1service.notifyConnecteCall(args[6])
     elif args[0] == 12:
         print('voicecall disconnect')
         if eventMesh.publish("get_volte_switch") == 1: #开启VOLTE功能
-            cat1service.notifyDisconnectCall()
+            print('voicecall disconnected, PhoneNO: ', args[6])
+            cat1service.notifyDisconnectCall(args[6])
     elif args[0] == 13:
         print('voicecall is waiting, PhoneNO: ', args[6])
     elif args[0] == 14:
index 302c9fd..a088eeb 100644 (file)
@@ -14,7 +14,7 @@ import utime
 import log
 import uos
 
-PROJECT_VERSION="PY_OTA_V12"
+PROJECT_VERSION="PY_OTA_V13"
 CONFIG_JSON="/usr/system_config.json"
 CURRENT_APP_TYPE="pyota"
 # 设置日志输出级别
index a698d3a..0895437 100644 (file)
@@ -209,7 +209,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
             {
 
                 cat1_call_hungup();
-                cat1_handle_call_disconnected();
+                cat1_handle_call_disconnected("callnumb");
             }
             else
             {
@@ -253,7 +253,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event)
             if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
             {
                     cat1_call_hungup();
-                    cat1_handle_call_disconnected();
+                    cat1_handle_call_disconnected("callnumb");
                     return true;
                 //#endif
 
index f36c093..921fbd5 100755 (executable)
@@ -735,7 +735,7 @@ void CalldialTimerCallBackProc(int data)
     if(dail_falg>=DIAL_TIME)
     {
         cat1_call_hungup();
-        cat1_handle_call_disconnected();
+        cat1_handle_call_disconnected("callnumb");
     }
    
 }
index 7f59e17..2ab86e7 100644 (file)
@@ -994,22 +994,22 @@ void restart_time_sync(void)
     }
         
 }
-int cat1_handle_call_connected(void)
+int cat1_handle_call_connected(char* phonenum)
 {
     
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call connected\n");
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call connected %s\n",phonenum);
     //声音处理
-    incomedcall_event_sendmsg_toUI("ok");
+    incomedcall_event_sendmsg_toUI(phonenum);
     uapi_cat1_start_volte_voice();
     
     return 1;
 }
 //来电挂断处理
-int cat1_handle_call_disconnected(void)
+int cat1_handle_call_disconnected(char* phonenum)
 {
-    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call disconnected\n");
+    WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call disconnected  %s\n",phonenum);
     //TODO:  关闭声音
-    callend_event_sendmsg_toUI("0k");
+    callend_event_sendmsg_toUI(phonenum);
     uapi_cat1_stop_volte_voice();
     return 1;
 }
@@ -1225,10 +1225,10 @@ static int udp_packet_parse(char *rx_buffer, int len)
             index = cat1_handle_timesync(msg_buffer);
             break;
         case UDP_MSG_CALL_CONNECTED:
-            index = cat1_handle_call_connected();
+            index = cat1_handle_call_connected(msg_buffer);
             break;
         case UDP_MSG_CALL_DISCONNECTED:
-            index = cat1_handle_call_disconnected();
+            index = cat1_handle_call_disconnected(msg_buffer);
             break;
         case UDP_CMD_CAT1_OTA_UPDATE:
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"CAT1_OTA_UPDATE reply %s\n",msg_buffer);
index 218df94..196c1db 100644 (file)
@@ -42,7 +42,7 @@ void ble_get_cat1_at_msg(char *buffer,uint8_t len);
 
 void send_dtfm_number_toCat1(char ch);//发送dtfm
 void send_volte_switch_toCat1(void); //发送VOLTE开关标识到CAT1
-int cat1_handle_call_disconnected(void);
+int cat1_handle_call_disconnected(char* phonenum);
 
 #ifdef __cplusplus
 #if __cplusplus