柒牌修改为金三
authorazao <821478748@qq.com>
Fri, 13 Feb 2026 01:48:25 +0000 (09:48 +0800)
committerazao <821478748@qq.com>
Fri, 13 Feb 2026 01:48:25 +0000 (09:48 +0800)
2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/ai_VC.py
2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/protocol.py

index 4ce0da7..0c40918 100644 (file)
@@ -1049,8 +1049,8 @@ class AI_dev(Abstract):
             self.extint_wakeup_cta1_timer = osTimer()
             self.extint_wakeup_cta1.enable()
         else:
-            self.pwk_key = ExtInt(ExtInt.GPIO41, ExtInt.IRQ_RISING_FALLING, ExtInt.PULL_PU, self.pwk_extint_cb)
-            #self.extint_AI = ExtInt(ExtInt.GPIO19,ExtInt.IRQ_RISING_FALLING, ExtInt.PULL_PU, self.keyAI_extint_cb)
+            # self.pwk_key = ExtInt(ExtInt.GPIO41, ExtInt.IRQ_RISING_FALLING, ExtInt.PULL_PU, self.pwk_extint_cb)
+            self.pwk_key = ExtInt(ExtInt.GPIO26, ExtInt.IRQ_RISING_FALLING, ExtInt.PULL_PU, self.pwk_extint_cb)
             self.extint_AI = ExtInt(ExtInt.GPIO22,ExtInt.IRQ_RISING_FALLING, ExtInt.PULL_PU, self.keyAI_extint_cb)
 
         self.extint_AI.enable()
@@ -1811,6 +1811,7 @@ class device_res_author(Abstract):
             else:
                 url = "https://dmp-api.qipai.com/qp-dmp-api/dev/time"
                 # url = "https://dmp-dev.raisound.com/dmp-api/dev/time"
+                url = "http://dmp.raisound.com/bz-api/dev/time"#金三
             response = request.get(url,timeout=5)
             data = response.json()
             print("dev_NTP:{}".format(data))
@@ -1941,6 +1942,7 @@ class device_res_author(Abstract):
                     url = "http://dmp-global.raisound.com/bz-api/dev/auth/active"
                 else:
                     url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/active"
+                    url = "http://dmp.raisound.com/bz-api/dev/auth/active"#金三
                     # url = "https://dmp-dev.raisound.com/dmp-api/dev/auth/active"
                 data =ujson.dumps(data)
                 response = None
@@ -2054,6 +2056,7 @@ class device_res_author(Abstract):
                     sign_url = "http://dmp-global.raisound.com/bz-api/dev/auth/sign_in" #登入地址
                 else:
                     sign_url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/sign_in"
+                    sign_url = "http://dmp.raisound.com/bz-api/dev/auth/sign_in"#金三
                     # sign_url = "https://dmp-dev.raisound.com/dmp-api/dev/auth/sign_in" #登入地址
                 #获取验证码
                 #url = "http://dmp.qipai.com.cn:30461/dev/device/bind-code/860132066060377"
@@ -2127,6 +2130,7 @@ class device_res_author(Abstract):
                     url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
                 else:
                     url = "https://dmp-api.qipai.com/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
+                    url = "http://dmp.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)#金三
                     # url = "https://dmp-dev.raisound.com/dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) #北科地址
                 print("{} H:{}".format(url,headers_T))
                 response = request.post(url,headers = headers_T)
@@ -2166,6 +2170,7 @@ class device_res_author(Abstract):
                 dev_tokenip = "http://dmp-global.raisound.com/bz-api/dev/auth/token" #设备新令牌更新地址
             else:
                 dev_tokenip = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/token"
+                dev_tokenip = "http://dmp.raisound.com/bz-api/dev/auth/token"#金三
                 # dev_tokenip = "https://dmp-dev.raisound.com/dmp-api/dev/auth/token" #设备新令牌更新地址
                      
             token = self.dev_token
@@ -2408,6 +2413,7 @@ class OTA():
             #     url = "http://ota.qipai.com/bz-cmp-api/api/result?deviceId={}&currentVersion={}".format(modem.getDevImei(),currentVersion)
             # else:
             url = "https://dmp-api.qipai.com/qp-dmp-api/ota/result?deviceId={}&currentVersion={}".format(modem.getDevImei(),currentVersion)
+            url = "http://dmp.raisound.com/bz-api/ota/result?deviceId={}&currentVersion={}".format(modem.getDevImei(),currentVersion)#金三
             print(url)
             response = request.post(url,timeout=5)
             if response.status_code == 200:
@@ -2440,7 +2446,7 @@ class OTA():
                     url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
                 else:
                     url = "https://dmp-api.qipai.com/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
-                    # url = "http://dmp.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) #北科地址
+                    url = "http://dmp.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) #北科地址
                 print("{} H:{}".format(url,headers_T))
                 response = request.post(url,headers = headers_T,timeout=5)
                 if response.status_code == 200:
@@ -2611,6 +2617,7 @@ class AI_VC(Abstract):
                 # self.server_ip="118.145.158.207:22080/22087"
                 #self.server_ip="ai.qipai.com"
                 self.server_ip="dmp-api.qipai.com/qp-amp-api"
+                self.server_ip="115.190.94.208:22080"
                 #self.server_ip="sevenpin1.qipai.com.cn:22082"
             elif dev_type == "G10":
                 self.server_ip="115.190.94.208:22080"
@@ -2920,7 +2927,7 @@ class AI_VC(Abstract):
         self.asr_pingping_timerout = 0
         self.factory_timer = osTimer()
         self._1S_timer = osTimer()
-        self.Audio_buf_size = 16*1024
+        self.Audio_buf_size = 20*1024
         self.record = audio.Record()
         #self.record.end_callback(self.record_callback)
         self.record.gain_set(4,10)
@@ -3176,6 +3183,7 @@ class AI_VC(Abstract):
                 url = "http://ota.qipai.com/bz-cmp-api/api/config/{}".format(modem.getDevImei())
             else:
                 url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/config/{}".format(modem.getDevImei())
+                url = "http://dmp-dev.raisound.com/dmp-api/dev/config/{}".format(modem.getDevImei())
                 
                 
             print(url)
@@ -3336,6 +3344,9 @@ class AI_VC(Abstract):
         # self.chenggong_tone() #播放按键音
 
     def AI_key_press(self, event=None, msg = None):#按键按下
+        if dev_type == "7PIN": #2代产品要延时播放按键音 为了连接蓝牙后不播放按键音的问题
+            # print("1111111111播放按键音!!!!!!!!!!")
+            self.aud.aud_tone_play(10,400)#播放按键音
         EventMesh.publish(constants.EVENT.SYSTEM_UP)#唤醒休眠
         if EventMesh.publish("get_sos_flag")== 1:
             return
@@ -3360,11 +3371,9 @@ class AI_VC(Abstract):
         print("AI_key_press")
         self.get_config_timer_count = 0
         self.key_state = 1
-        if dev_type == "7PIN": #2代产品要延时播放按键音 为了连接蓝牙后不播放按键音的问题
-            self.aud.aud_tone_play(10,400)#播放按键音
             # EventMesh.publish("audio_montage_play",["chenggong.mp3"])  
             # self.chenggong_tone() #播放按键音
-        elif dev_type == "7PIN_1_5": #2代产品要延时播放按键音 为了连接蓝牙后不播放按键音的问题
+        if dev_type == "7PIN_1_5": #2代产品要延时播放按键音 为了连接蓝牙后不播放按键音的问题
             self.ai_key_press_audio.stop()
             self.ai_key_press_audio.start(300, 0, self.ai_key_press_audio_cb1)
         if PRESS_AUDIO_MODE == 1:
@@ -3895,8 +3904,8 @@ class AI_VC(Abstract):
                 req_str = "vc/coze?is_auth={}".format(self.is_auth)
             elif dev_type == 'jswm' or dev_type == 'jswm_BOX' :
                 req_str = "vc/agent?is_auth={}".format(self.is_auth)
-            # elif dev_type == "7PIN":#内部测试,不用coze
-            #     req_str = "vc/agent?is_auth={}".format(self.is_auth)
+            elif dev_type == "7PIN":#内部测试,不用coze
+                req_str = "vc/agent?is_auth={}".format(self.is_auth)
             if(token):
                 url = 'ws://{}/{}&dt={}'.format(self.server_ip,req_str,token)
             else:
@@ -5384,7 +5393,7 @@ class AI_VC(Abstract):
         self.VC_satrt_kws_flag = 1
         if self.VC_Thinking_timerout < 100:
             self.VC_Thinking_timerout = 0
-        EventMesh.publish("open_led_all")
+        EventMesh.publish("open_led_blue")
         EventMesh.publish("wakeup_BT")
         #self.VC_Play_End()#关闭音频播放
         print("AI_VC_start2")
@@ -5580,10 +5589,12 @@ class AI_VC(Abstract):
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=False
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]=""
         elif dev_type == "7PIN" or dev_type == "7PIN_1_5" :#柒牌
+            pass
+            #end金三
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7550138354483298347"#
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7549142130376671267"
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7411071327182438412"
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7601036330500669467"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7411071327182438412"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7601036330500669467"
             #json_data["payload"]["inbound_attributes"]["vad_silence"] = 1000
         elif dev_type == "7PIN_coze":
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7550138354483298347"#
@@ -6131,8 +6142,8 @@ class AI_VC(Abstract):
         
 
     def chenggong_tone(self):
-        # EventMesh.publish("audio_montage_play",["chenggong.mp3"])    
-        self.aud.aud_tone_play(10,400)
+        EventMesh.publish("audio_montage_play",["chenggong.mp3"])    
+        # self.aud.aud_tone_play(10,400)
     def send_tone(self):
         EventMesh.publish("audio_montage_play",["send_tone.mp3"])
     def concurrency_limit_exceeded_tone(self):
index cc7b93f..44f7b27 100644 (file)
@@ -1456,6 +1456,7 @@ class SockMangager(Abstract):
             if token != None:
                 self.connect_web_timer_count = 0
                 url_t = "wss://dmp-api.qipai.com/qp-iot-api/ws-hub/dev/v1?qp-dt={}".format(token)#柒牌测试
+                url_t = "ws://wsiot-nocdn.raisound.com/ws-hub/dev/v1?bz-dt={}".format(token)#北科三代
                 # url_t = "wss://dmp-dev.raisound.com/iot-api/ws-hub/dev/v1?bz-dt={}".format(token)#北科测试
                 try:
                     self.iot_protocol_client=uwebsocket.Client.connect(url_t, debug=True)
@@ -1978,6 +1979,8 @@ class SockMangager(Abstract):
                     break
                 elif recv_data == "":
                     print("下发的空数据 不做处理")
+                    EventMesh.publish("publish_AI_btnInfo",{"func":self.connect_iot_websocket}) 
+                    break
                 else:
                     if len(recv_data) != 0:
                         self.reconnect_count = 0