把版本号和编译版本之间建立关联。方便查找版本。 master
authorsnickersun <snickersun@163.com>
Mon, 20 Apr 2026 10:30:15 +0000 (18:30 +0800)
committersnickersun <snickersun@163.com>
Mon, 20 Apr 2026 10:30:15 +0000 (18:30 +0800)
28 files changed:
2.sdk-ZY/new.bat
2.sdk-ZY/new_clean.bat
2.sdk-ZY/new_version.bat [deleted file]
2.sdk-ZY/project/K01/new.bat
2.sdk-ZY/project/K01/new_version.bat [new file with mode: 0644]
2.sdk-ZY/project/W9/new.bat
2.sdk-ZY/project/W9/new_version.bat [new file with mode: 0644]
2.sdk-ZY/release_copy.bat [new file with mode: 0644]
2.sdk/.gitignore [new file with mode: 0644]
2.sdk/new.bat
2.sdk/new_clean.bat
2.sdk/new_version.bat [deleted file]
2.sdk/project/7PIN/new.bat
2.sdk/project/7PIN/new_version.bat [new file with mode: 0644]
2.sdk/project/7PIN_1_5/images/customer_fs.bin
2.sdk/project/7PIN_1_5/images/ext_fs.bin [new file with mode: 0644]
2.sdk/project/7PIN_1_5/new.bat
2.sdk/project/7PIN_1_5/new_version.bat [new file with mode: 0644]
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/constants.py
2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/protocol.py
2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/versions.py
2.sdk/project/7PIN_1_5/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip
2.sdk/project/K01/new.bat
2.sdk/project/K01/new_version.bat [new file with mode: 0644]
2.sdk/project/K8/new.bat
2.sdk/project/K8/new_version.bat [new file with mode: 0644]
2.sdk/release_copy.bat [new file with mode: 0644]

index e1adebb..e521785 100644 (file)
@@ -1,6 +1,35 @@
 @echo off
 @echo off
-call new_version.bat %1
+if "%~1"=="" goto usage
+set "PROJ_DIR=%~dp0project\%~1"
+if not exist "%PROJ_DIR%" goto proj_missing
+if not exist "%PROJ_DIR%\new_version.bat" goto ver_missing
+pushd "%PROJ_DIR%"
+call new_version.bat
+if errorlevel 1 goto popd_fail
+call new.bat
+if errorlevel 1 goto popd_fail
+popd
+call "%~dp0release_copy.bat" "%~1"
+if errorlevel 1 exit /b 1
+exit /b 0
 
 
-cd project\%1\
+:popd_fail
+popd
+exit /b 1
 
 
-call new.bat %1
+:proj_missing
+echo ERROR: Project directory does not exist: "%PROJ_DIR%"
+echo        Expected folder: project\%~1  under the SDK root.
+exit /b 1
+
+:ver_missing
+echo ERROR: Cannot find new_version.bat in the project folder.
+echo        Path: "%PROJ_DIR%\new_version.bat"
+echo        Create project\%~1\new_version.bat to maintain firmware Version and Build_Time.
+exit /b 1
+
+:usage
+echo ERROR: Missing project name argument.
+echo Usage:   new.bat ^<project_dir^>
+echo Example: new.bat K01
+exit /b 1
index 4c55cdb..dfe725f 100644 (file)
@@ -3,5 +3,5 @@
 cd Helios_SDK
 helios clean
 cd ..
 cd Helios_SDK
 helios clean
 cd ..
-new.bat %1
+call "%~dp0new.bat" "%~1"
 :exit
\ No newline at end of file
 :exit
\ No newline at end of file
diff --git a/2.sdk-ZY/new_version.bat b/2.sdk-ZY/new_version.bat
deleted file mode 100644 (file)
index c4947b9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-echo Version="V1.0" > project\%1%\sdk\services\microPython\ports\quectel\core\versions.py
-echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> project\%1%\sdk\services\microPython\ports\quectel\core\versions.py
\ No newline at end of file
index c7b80b1..2a124f8 100644 (file)
@@ -2,38 +2,34 @@
 
 md images
 del images /q
 
 md images
 del images /q
-@GOTO :STEP1
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
-    echo "ext_fs.bin生成失败 !!!!!!!!!!!!!!! "
+    echo ERROR: mklfs failed while building ext_fs.bin
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "ext_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-:STEP1
-
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 696320 -i .\images\customer_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 696320 -i .\images\customer_fs.bin
 if errorlevel 1 (
-    echo "customer_fs.bin生成失败 请检查usr目录是否大于316K!!!!!!!!!!!!!!!"
+    echo ERROR: mklfs failed while building customer_fs.bin
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "customer_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-
-%copy font\ext_font.bin images\ext_font.bin%
-
+copy /Y font\ext_font.bin images\ext_font.bin
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
-if errorlevel 0 (
-    echo images压缩成功!!!!!!!!!!!!!!
-)
 if errorlevel 1 (
 if errorlevel 1 (
-    echo images压缩失败!!!!!!!!!!!!!!!!!!
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
+if errorlevel 1 (
+    echo ERROR: helios build failed - see compiler output above
+    cd ..
+    exit /b 1
+)
 cd ..
 cd ..
-:exit
\ No newline at end of file
+exit /b 0
+
+:exit
+exit /b 1
diff --git a/2.sdk-ZY/project/K01/new_version.bat b/2.sdk-ZY/project/K01/new_version.bat
new file mode 100644 (file)
index 0000000..f7fef1a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.0"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
index 1f314e9..40fbff5 100644 (file)
@@ -2,38 +2,34 @@
 
 md images
 del images /q
 
 md images
 del images /q
-@GOTO :STEP1
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
-    echo "ext_fs.bin生成失败 !!!!!!!!!!!!!!! "
+    echo ERROR: mklfs failed while building ext_fs.bin
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "ext_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-:STEP1
-
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 589824 -i .\images\customer_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 589824 -i .\images\customer_fs.bin
 if errorlevel 1 (
-    echo "customer_fs.bin生成失败 请检查usr目录是否大于316K!!!!!!!!!!!!!!!"
+    echo ERROR: mklfs failed while building customer_fs.bin
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "customer_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-
-%copy font\ext_font.bin images\ext_font.bin%
-
+copy /Y font\ext_font.bin images\ext_font.bin
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
-if errorlevel 0 (
-    echo images压缩成功!!!!!!!!!!!!!!
-)
 if errorlevel 1 (
 if errorlevel 1 (
-    echo images压缩失败!!!!!!!!!!!!!!!!!!
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
+if errorlevel 1 (
+    echo ERROR: helios build failed - see compiler output above
+    cd ..
+    exit /b 1
+)
 cd ..
 cd ..
-:exit
\ No newline at end of file
+exit /b 0
+
+:exit
+exit /b 1
diff --git a/2.sdk-ZY/project/W9/new_version.bat b/2.sdk-ZY/project/W9/new_version.bat
new file mode 100644 (file)
index 0000000..f7fef1a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.0"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
diff --git a/2.sdk-ZY/release_copy.bat b/2.sdk-ZY/release_copy.bat
new file mode 100644 (file)
index 0000000..6f84d29
--- /dev/null
@@ -0,0 +1,84 @@
+@echo off
+setlocal EnableDelayedExpansion
+REM Copy Helios_SDK\opt\release\<board>\ to release\<proj>_<ver>_<time>\
+REM Usage: release_copy.bat <project_dir>
+
+set "SDKROOT=%~dp0"
+set "PROJ=%~1"
+if "%PROJ%"=="" goto rc_err_proj
+
+set "VFILE=%SDKROOT%project\%PROJ%\sdk\services\microPython\ports\quectel\core\versions.py"
+if not exist "%VFILE%" goto rc_err_ver
+
+if not exist "%SDKROOT%Helios_SDK\opt\tmp\build_sucess.tmp" goto rc_skip
+
+set "FW_VER=UNKNOWN"
+for /f "usebackq tokens=2 delims==" %%a in (`findstr /b /c:"Version=" "%VFILE%"`) do (
+    set "FW_VER=%%a"
+    goto v_done
+)
+:v_done
+set "FW_VER=!FW_VER:"=!"
+set "FW_VER=!FW_VER: =!"
+
+set "FW_BT=unknown"
+for /f "usebackq tokens=2 delims==" %%a in (`findstr /b /c:"Build_Time=" "%VFILE%"`) do (
+    set "FW_BT=%%a"
+    goto t_done
+)
+:t_done
+set "FW_BT=!FW_BT:"=!"
+REM Trim leading/trailing spaces so " =_!" does not turn a trailing space into "_"
+:trim_bt_lead
+if "!FW_BT:~0,1!"==" " set "FW_BT=!FW_BT:~1!" & goto trim_bt_lead
+:trim_bt_trail
+if "!FW_BT:~-1!"==" " set "FW_BT=!FW_BT:~0,-1!" & goto trim_bt_trail
+if "!FW_BT!"=="" set "FW_BT=unknown"
+set "FW_BT=!FW_BT: =_!"
+set "FW_BT=!FW_BT::=-!"
+:trim_bt_us
+if "!FW_BT:~-1!"=="_" set "FW_BT=!FW_BT:~0,-1!" & goto trim_bt_us
+
+set /p FW_NAME=<"%SDKROOT%Helios_SDK\opt\tmp\fw_name_record.tmp"
+set "FW_NAME=!FW_NAME: =!"
+if "!FW_NAME!"=="" set "FW_NAME=EG810MCN_GA_VOLTE"
+
+set "REL_SRC=!SDKROOT!Helios_SDK\opt\release\!FW_NAME!"
+if not exist "!REL_SRC!" goto rc_err_rel
+
+set "REL_DST=%SDKROOT%release\%PROJ%_!FW_VER!_!FW_BT!"
+:trim_dst_us
+if "!REL_DST:~-1!"=="_" set "REL_DST=!REL_DST:~0,-1!" & goto trim_dst_us
+mkdir "!REL_DST!" 2>nul
+echo [release] Copying build output to snapshot folder:
+echo           !REL_DST!
+xcopy "!REL_SRC!" "!REL_DST!" /E /I /Y /Q
+if errorlevel 1 goto rc_err_copy
+echo [release] Done. All files from "!REL_SRC!" were copied.
+exit /b 0
+
+:rc_skip
+echo [release] Skipped: Helios_SDK\opt\tmp\build_sucess.tmp was not found.
+echo           The build may have failed or did not finish; no files were copied to release\.
+exit /b 0
+
+:rc_err_proj
+echo [release] ERROR: No project directory name was passed.
+echo           Usage: release_copy.bat ^<project_dir^>   Example: release_copy.bat K01
+exit /b 1
+
+:rc_err_ver
+echo [release] ERROR: versions.py is missing. Run new_version.bat in the project first.
+echo           Expected file: %VFILE%
+exit /b 1
+
+:rc_err_rel
+echo [release] ERROR: SDK release output folder does not exist:
+echo           !REL_SRC!
+echo           Check fw_name_record.tmp and that the Helios build produced opt\release\^<board^>.
+exit /b 1
+
+:rc_err_copy
+echo [release] ERROR: xcopy failed while copying to the release snapshot.
+echo           Check free disk space, path length, and file locks.
+exit /b 1
diff --git a/2.sdk/.gitignore b/2.sdk/.gitignore
new file mode 100644 (file)
index 0000000..4116f26
--- /dev/null
@@ -0,0 +1 @@
+release/**
\ No newline at end of file
index e1adebb..6e46562 100644 (file)
@@ -1,6 +1,35 @@
 @echo off
 @echo off
-call new_version.bat %1
+if "%~1"=="" goto usage
+set "PROJ_DIR=%~dp0project\%~1"
+if not exist "%PROJ_DIR%" goto proj_missing
+if not exist "%PROJ_DIR%\new_version.bat" goto ver_missing
+pushd "%PROJ_DIR%"
+call new_version.bat
+if errorlevel 1 goto popd_fail
+call new.bat
+if errorlevel 1 goto popd_fail
+popd
+call "%~dp0release_copy.bat" "%~1"
+if errorlevel 1 exit /b 1
+exit /b 0
 
 
-cd project\%1\
+:popd_fail
+popd
+exit /b 1
 
 
-call new.bat %1
+:proj_missing
+echo ERROR: Project directory does not exist: "%PROJ_DIR%"
+echo        Expected folder: project\%~1  under the SDK root.
+exit /b 1
+
+:ver_missing
+echo ERROR: Cannot find new_version.bat in the project folder.
+echo        Path: "%PROJ_DIR%\new_version.bat"
+echo        Create project\%~1\new_version.bat to maintain firmware Version and Build_Time.
+exit /b 1
+
+:usage
+echo ERROR: Missing project name argument.
+echo Usage:   new.bat ^<project_dir^>
+echo Example: new.bat 7PIN_1_5
+exit /b 1
index f2e19e6..575f333 100644 (file)
@@ -4,5 +4,5 @@ set "COMSPEC=%SystemRoot%\System32\cmd.exe"
 cd Helios_SDK
 helios clean
 cd ..
 cd Helios_SDK
 helios clean
 cd ..
-new.bat %1
+call "%~dp0new.bat" "%~1"
 :exit
\ No newline at end of file
 :exit
\ No newline at end of file
diff --git a/2.sdk/new_version.bat b/2.sdk/new_version.bat
deleted file mode 100644 (file)
index c4947b9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-echo Version="V1.0" > project\%1%\sdk\services\microPython\ports\quectel\core\versions.py
-echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> project\%1%\sdk\services\microPython\ports\quectel\core\versions.py
\ No newline at end of file
index 853a796..5077b07 100644 (file)
@@ -2,38 +2,34 @@
 
 md images
 del images /q
 
 md images
 del images /q
-@GOTO :STEP1
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
-    echo "ext_fs.bin����ʧ�� !!!!!!!!!!!!!!! "
+    echo ERROR: mklfs failed while building ext_fs.bin
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "ext_fs.bin���ɳɹ� !!!!!!!!!!!!!!! "
-)
-:STEP1
-
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 1376256 -i .\images\customer_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 1376256 -i .\images\customer_fs.bin
 if errorlevel 1 (
-    echo "customer_fs.bin����ʧ�� ����usrĿ¼�Ƿ����316K!!!!!!!!!!!!!!!"
+    echo ERROR: mklfs failed while building customer_fs.bin
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "customer_fs.bin���ɳɹ� !!!!!!!!!!!!!!! "
-)
-
-%copy font\ext_font.bin images\ext_font.bin%
-
+copy /Y font\ext_font.bin images\ext_font.bin
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
-if errorlevel 0 (
-    echo imagesѹ���ɹ�!!!!!!!!!!!!!!
-)
 if errorlevel 1 (
 if errorlevel 1 (
-    echo imagesѹ��ʧ��!!!!!!!!!!!!!!!!!!
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
+if errorlevel 1 (
+    echo ERROR: helios build failed - see compiler output above
+    cd ..
+    exit /b 1
+)
 cd ..
 cd ..
-:exit
\ No newline at end of file
+exit /b 0
+
+:exit
+exit /b 1
diff --git a/2.sdk/project/7PIN/new_version.bat b/2.sdk/project/7PIN/new_version.bat
new file mode 100644 (file)
index 0000000..f7fef1a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.0"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
index 9f33589..89fe2c9 100644 (file)
Binary files a/2.sdk/project/7PIN_1_5/images/customer_fs.bin and b/2.sdk/project/7PIN_1_5/images/customer_fs.bin differ
diff --git a/2.sdk/project/7PIN_1_5/images/ext_fs.bin b/2.sdk/project/7PIN_1_5/images/ext_fs.bin
new file mode 100644 (file)
index 0000000..97cfdfb
Binary files /dev/null and b/2.sdk/project/7PIN_1_5/images/ext_fs.bin differ
index 396c014..7b216c2 100644 (file)
@@ -1,38 +1,34 @@
 @echo off\r
 md images\r
 del images /q\r
 @echo off\r
 md images\r
 del images /q\r
-@GOTO :STEP1\r
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin\r
 if errorlevel 1 (\r
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin\r
 if errorlevel 1 (\r
-    echo "ext_fs.bin生成失败 !!!!!!!!!!!!!!! "\r
+    echo ERROR: mklfs failed while building ext_fs.bin\r
     goto exit\r
 )\r
     goto exit\r
 )\r
-if errorlevel 0 (\r
-    echo "ext_fs.bin生成成功 !!!!!!!!!!!!!!! "\r
-)\r
-:STEP1\r
-\r
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 1376256 -i .\images\customer_fs.bin\r
 if errorlevel 1 (\r
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 1376256 -i .\images\customer_fs.bin\r
 if errorlevel 1 (\r
-    echo "customer_fs.bin生成失败 请检查usr目录是否大于316K!!!!!!!!!!!!!!!"\r
+    echo ERROR: mklfs failed while building customer_fs.bin\r
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above\r
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr\r
     goto exit\r
 )\r
     goto exit\r
 )\r
-if errorlevel 0 (\r
-    echo "customer_fs.bin生成成功 !!!!!!!!!!!!!!! "\r
-)\r
-\r
-%copy font\ext_font.bin images\ext_font.bin%\r
-\r
+copy /Y font\ext_font.bin images\ext_font.bin\r
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\\r
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\\r
-if errorlevel 0 (\r
-    echo images压缩成功!!!!!!!!!!!!!!\r
-)\r
 if errorlevel 1 (\r
 if errorlevel 1 (\r
-    echo images压缩失败!!!!!!!!!!!!!!!!!!\r
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip\r
     goto exit\r
 )\r
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y\r
 cd ..\..\Helios_SDK\r
 helios.exe make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE\r
     goto exit\r
 )\r
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y\r
 cd ..\..\Helios_SDK\r
 helios.exe make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE\r
+if errorlevel 1 (\r
+    echo ERROR: helios build failed - see compiler output above\r
+    cd ..\r
+    exit /b 1\r
+)\r
 cd ..\r
 cd ..\r
-:exit
\ No newline at end of file
+exit /b 0\r
+\r
+:exit\r
+exit /b 1\r
diff --git a/2.sdk/project/7PIN_1_5/new_version.bat b/2.sdk/project/7PIN_1_5/new_version.bat
new file mode 100644 (file)
index 0000000..7c09eef
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.1"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
index 4ce0da7..d56c5bf 100644 (file)
@@ -1807,10 +1807,9 @@ class device_res_author(Abstract):
             print("dev_NTP1")
             url =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
             print("dev_NTP1")
             url =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
-                url = "http://dmp-global.raisound.com/bz-api/dev/time"
+                url = constants.DMP_GLOBAL_BASE + "/dev/time"
             else:
             else:
-                url = "https://dmp-api.qipai.com/qp-dmp-api/dev/time"
-                # url = "https://dmp-dev.raisound.com/dmp-api/dev/time"
+                url = constants.DMP_CN_BASE + "/dev/time"
             response = request.get(url,timeout=5)
             data = response.json()
             print("dev_NTP:{}".format(data))
             response = request.get(url,timeout=5)
             data = response.json()
             print("dev_NTP:{}".format(data))
@@ -1938,10 +1937,9 @@ class device_res_author(Abstract):
                 headers_T ={"Content-Type":"application/json"}
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
                 headers_T ={"Content-Type":"application/json"}
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
-                    url = "http://dmp-global.raisound.com/bz-api/dev/auth/active"
+                    url = constants.DMP_GLOBAL_BASE + "/dev/auth/active"
                 else:
                 else:
-                    url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/active"
-                    # url = "https://dmp-dev.raisound.com/dmp-api/dev/auth/active"
+                    url = constants.DMP_CN_BASE + "/dev/auth/active"
                 data =ujson.dumps(data)
                 response = None
                 response_result = 0
                 data =ujson.dumps(data)
                 response = None
                 response_result = 0
@@ -2051,10 +2049,9 @@ class device_res_author(Abstract):
                 print(ujson.dumps(sign_in_data))
                 sign_url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
                 print(ujson.dumps(sign_in_data))
                 sign_url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
-                    sign_url = "http://dmp-global.raisound.com/bz-api/dev/auth/sign_in" #登入地址
+                    sign_url = constants.DMP_GLOBAL_BASE + "/dev/auth/sign_in"
                 else:
                 else:
-                    sign_url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/sign_in"
-                    # sign_url = "https://dmp-dev.raisound.com/dmp-api/dev/auth/sign_in" #登入地址
+                    sign_url = constants.DMP_CN_BASE + "/dev/auth/sign_in"
                 #获取验证码
                 #url = "http://dmp.qipai.com.cn:30461/dev/device/bind-code/860132066060377"
                 # token = EventMesh.publish("get_dev_token")
                 #获取验证码
                 #url = "http://dmp.qipai.com.cn:30461/dev/device/bind-code/860132066060377"
                 # token = EventMesh.publish("get_dev_token")
@@ -2120,14 +2117,12 @@ class device_res_author(Abstract):
                 token = EventMesh.publish("get_dev_token")
                 headers_T = None
                 if token:
                 token = EventMesh.publish("get_dev_token")
                 headers_T = None
                 if token:
-                    headers_T = {"qp-dt":"{}".format(token)}
-                #http://dmp.raisound.com/bz-api/dev/iccid?deviceId=866610001099679&iccid=89860002192307889057
+                    headers_T = {constants.ICCID_HEADER_POST_USER: "{}".format(token)}
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
-                    url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
+                    url = (constants.DMP_GLOBAL_BASE + "/dev/iccid?deviceId={}&iccid={}").format(modem.getDevImei(),iccid)
                 else:
                 else:
-                    url = "https://dmp-api.qipai.com/qp-dmp-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) #北科地址
+                    url = (constants.DMP_CN_BASE + "/dev/iccid?deviceId={}&iccid={}").format(modem.getDevImei(),iccid)
                 print("{} H:{}".format(url,headers_T))
                 response = request.post(url,headers = headers_T)
                 if response.status_code == 200:
                 print("{} H:{}".format(url,headers_T))
                 response = request.post(url,headers = headers_T)
                 if response.status_code == 200:
@@ -2163,10 +2158,9 @@ class device_res_author(Abstract):
                 EventMesh.publish("dev_sign_in")
             dev_tokenip =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
                 EventMesh.publish("dev_sign_in")
             dev_tokenip =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
-                dev_tokenip = "http://dmp-global.raisound.com/bz-api/dev/auth/token" #设备新令牌更新地址
+                dev_tokenip = constants.DMP_GLOBAL_BASE + "/dev/auth/token"
             else:
             else:
-                dev_tokenip = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/token"
-                # dev_tokenip = "https://dmp-dev.raisound.com/dmp-api/dev/auth/token" #设备新令牌更新地址
+                dev_tokenip = constants.DMP_CN_BASE + "/dev/auth/token"
                      
             token = self.dev_token
             if token == None:
                      
             token = self.dev_token
             if token == None:
@@ -2236,12 +2230,7 @@ class OTA():
             print("bt_versions:{}".format(bt_versions))
             #url = "http://iot.api.thisiot.com/ota/task?deviceId=860132060348836&sourceVersion=2024-12-20-15:35-1"
             url =None
             print("bt_versions:{}".format(bt_versions))
             #url = "http://iot.api.thisiot.com/ota/task?deviceId=860132060348836&sourceVersion=2024-12-20-15:35-1"
             url =None
-            # if dev_type == "7PIN_BK_EU":#英文小瑞
-            #     url = "http://dmp-global.raisound.com/bz-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
-            # if dev_type == "7PIN" or dev_type == "7PIN_coze":#柒牌
-            #     url = "http://ota.qipai.com/bz-cmp-api/api/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
-            # else:
-            url = "https://dmp-api.qipai.com/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
+            url = (constants.DMP_CN_BASE + "/ota/task?deviceId={}&sourceVersion={}").format(modem.getDevImei(),sourceVersion)
             print(url)
             response = request.get(url,timeout=5)
             if response.status_code == 200:
             print(url)
             response = request.get(url,timeout=5)
             if response.status_code == 200:
@@ -2305,12 +2294,7 @@ class OTA():
             print("sourceVersion2:{}".format(sourceVersion))
             #url = "http://iot.api.thisiot.com/ota/task?deviceId=860132060348836&sourceVersion=2024-12-20-15:35-1"
             url =None
             print("sourceVersion2:{}".format(sourceVersion))
             #url = "http://iot.api.thisiot.com/ota/task?deviceId=860132060348836&sourceVersion=2024-12-20-15:35-1"
             url =None
-            # if dev_type == "7PIN_BK_EU":#英文小瑞
-            #     url = "http://dmp-global.raisound.com/bz-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
-            # if dev_type == "7PIN" or dev_type == "7PIN_coze":#柒牌
-            #     url = "http://ota.qipai.com/bz-cmp-api/api/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
-            # else:
-            url = "https://dmp-api.qipai.com/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion)
+            url = (constants.DMP_CN_BASE + "/ota/task?deviceId={}&sourceVersion={}").format(modem.getDevImei(),sourceVersion)
             print(url)
             response = request.get(url,timeout=5)
             if response.status_code == 200:
             print(url)
             response = request.get(url,timeout=5)
             if response.status_code == 200:
@@ -2403,11 +2387,9 @@ class OTA():
             print("currentVersion2:{}".format(currentVersion))
             url =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
             print("currentVersion2:{}".format(currentVersion))
             url =None
             if dev_type == "7PIN_BK_EU":#英文小瑞
-                url = "http://dmp-global.raisound.com/bz-api/ota/result?deviceId={}&currentVersion={}".format(modem.getDevImei(),currentVersion)
-            # if dev_type == "7PIN" or dev_type == "7PIN_1_5" or dev_type == "7PIN_coze":#柒牌
-            #     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 = (constants.DMP_GLOBAL_BASE + "/ota/result?deviceId={}&currentVersion={}").format(modem.getDevImei(),currentVersion)
+            else:
+                url = (constants.DMP_CN_BASE + "/ota/result?deviceId={}&currentVersion={}").format(modem.getDevImei(),currentVersion)
             print(url)
             response = request.post(url,timeout=5)
             if response.status_code == 200:
             print(url)
             response = request.post(url,timeout=5)
             if response.status_code == 200:
@@ -2433,14 +2415,13 @@ class OTA():
                 token = EventMesh.publish("get_dev_token")
                 headers_T = None
                 if token:
                 token = EventMesh.publish("get_dev_token")
                 headers_T = None
                 if token:
-                    headers_T = {"bz-dt":"{}".format(token)}
-                #http://dmp.raisound.com/bz-api/dev/iccid?deviceId=866610001099679&iccid=89860002192307889057
+                    # 与 post_iccid_user 使用同一头域,避免 qp-dmp-api 误用 bz-dt 导致 50001
+                    headers_T = {constants.ICCID_HEADER_POST_USER: "{}".format(token)}
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
                 url =None
                 if dev_type == "7PIN_BK_EU":#英文小瑞
-                    url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid)
+                    url = (constants.DMP_GLOBAL_BASE + "/dev/iccid?deviceId={}&iccid={}").format(modem.getDevImei(),iccid)
                 else:
                 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 = (constants.DMP_CN_BASE + "/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:
                 print("{} H:{}".format(url,headers_T))
                 response = request.post(url,headers = headers_T,timeout=5)
                 if response.status_code == 200:
@@ -2594,7 +2575,7 @@ class AI_VC(Abstract):
             elif self.VC_server == 7:# 
                 self.server_ip="118.145.158.207:22080"
             elif self.VC_server == 8:# 
             elif self.VC_server == 7:# 
                 self.server_ip="118.145.158.207:22080"
             elif self.VC_server == 8:# 
-                self.server_ip="115.190.94.208:22080"
+                self.server_ip=constants.AMP_G10
             elif self.VC_server == 86:# 
                 self.server_ip="118.145.158.207:22086"    
             else:
             elif self.VC_server == 86:# 
                 self.server_ip="118.145.158.207:22086"    
             else:
@@ -2604,16 +2585,9 @@ class AI_VC(Abstract):
                 #self.server_ip="115.190.94.208:22080"
                 self.server_ip="118.145.158.207:22086"   
             elif dev_type == "7PIN" or dev_type == "7PIN_1_5":
                 #self.server_ip="115.190.94.208:22080"
                 self.server_ip="118.145.158.207:22086"   
             elif dev_type == "7PIN" or dev_type == "7PIN_1_5":
-                #self.server_ip="sevenpin.qipai.com.cn"
-                # self.server_ip="220.160.104.34"
-                # self.server_ip="118.145.158.207:22080"
-                # self.server_ip="amp-dev-global.raisound.com:22080"
-                # 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="sevenpin1.qipai.com.cn:22082"
+                self.server_ip=constants.AMP_7PIN
             elif dev_type == "G10":
             elif dev_type == "G10":
-                self.server_ip="115.190.94.208:22080"
+                self.server_ip=constants.AMP_G10
             elif dev_type == "sjgq":
                 self.server_ip="118.145.158.207:22084"
             elif dev_type == "7PIN_BK" or dev_type == 'csh'or dev_type == "7PIN_BK_coze"or dev_type == 'momo':
             elif dev_type == "sjgq":
                 self.server_ip="118.145.158.207:22084"
             elif dev_type == "7PIN_BK" or dev_type == 'csh'or dev_type == "7PIN_BK_coze"or dev_type == 'momo':
@@ -3171,11 +3145,11 @@ class AI_VC(Abstract):
         try:
             url=None
             if dev_type == "7PIN_BK_EU":#英文小瑞
         try:
             url=None
             if dev_type == "7PIN_BK_EU":#英文小瑞
-                url = "http://dmp-global.raisound.com/bz-api/dev/config/{}".format(modem.getDevImei())
+                url = (constants.DMP_GLOBAL_BASE + "/dev/config/{}").format(modem.getDevImei())
             elif dev_type == "7PIN" or dev_type == "7PIN_1_5" or dev_type == "7PIN_coze":#柒牌
             elif dev_type == "7PIN" or dev_type == "7PIN_1_5" or dev_type == "7PIN_coze":#柒牌
-                url = "http://ota.qipai.com/bz-cmp-api/api/config/{}".format(modem.getDevImei())
+                url = (constants.CONFIG_URL_7PIN + "/{}").format(modem.getDevImei())
             else:
             else:
-                url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/config/{}".format(modem.getDevImei())
+                url = (constants.CONFIG_URL_OTHER + "/{}").format(modem.getDevImei())
                 
                 
             print(url)
                 
                 
             print(url)
@@ -5480,8 +5454,8 @@ class AI_VC(Abstract):
                         "bot_option": {
                             "use_workflow": True,
                             #"input_format": "text",
                         "bot_option": {
                             "use_workflow": True,
                             #"input_format": "text",
-                            "bot_id":"7462617881076351002",#语言助手
-                            "workflow_id":"7462621757327196187",
+                            # "bot_id":"7462617881076351002",#语言助手
+                            # "workflow_id":"7462621757327196187",
                            
                         }
                     }
                            
                         }
                     }
@@ -5550,8 +5524,8 @@ class AI_VC(Abstract):
                 print("outbound_attributess_provider是VC_TTS_voice_type里的:{}".format(self.VC_TTS_voice_type[self.VC_TTS_voice_key]["outbound_attributess_provider"]))
 
         if dev_type == "7PIN_BK"or dev_type == "7PIN_BK_coze"or dev_type == "G10":#小瑞
                 print("outbound_attributess_provider是VC_TTS_voice_type里的:{}".format(self.VC_TTS_voice_type[self.VC_TTS_voice_key]["outbound_attributess_provider"]))
 
         if dev_type == "7PIN_BK"or dev_type == "7PIN_BK_coze"or dev_type == "G10":#小瑞
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7411071327182438412"#语言助手
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7468577560454496295"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7411071327182438412"#语言助手
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7468577560454496295"
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7486697248416989193"#极简
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7486698347416649778"
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7486697248416989193"#极简
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7486698347416649778"
@@ -5573,8 +5547,9 @@ class AI_VC(Abstract):
                 keywords.append(key) 
             json_data["payload"]["inbound_attributes"]["cfg"]["keywords"] = keywords
         elif dev_type == "7PIN_BK_EU":
                 keywords.append(key) 
             json_data["payload"]["inbound_attributes"]["cfg"]["keywords"] = keywords
         elif dev_type == "7PIN_BK_EU":
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7493368740600446995"#英文
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7493369551587213323"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7493368740600446995"#英文
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7493369551587213323"
+            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
         elif dev_type == "csh":
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7490852493640384538"#慈善会
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=False
         elif dev_type == "csh":
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7490852493640384538"#慈善会
             json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=False
@@ -5582,12 +5557,14 @@ class AI_VC(Abstract):
         elif dev_type == "7PIN" or dev_type == "7PIN_1_5" :#柒牌
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7550138354483298347"#
             # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7549142130376671267"
         elif dev_type == "7PIN" or dev_type == "7PIN_1_5" :#柒牌
             # 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"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
             #json_data["payload"]["inbound_attributes"]["vad_silence"] = 1000
         elif dev_type == "7PIN_coze":
             #json_data["payload"]["inbound_attributes"]["vad_silence"] = 1000
         elif dev_type == "7PIN_coze":
-            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"]="7550138354483298347"#
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7549142130376671267"
+            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
             json_data["payload"]["dialog_attributes"]["provider"]="qipai"
         #
         elif dev_type == 'momo':#食梦貘
             json_data["payload"]["dialog_attributes"]["provider"]="qipai"
         #
         elif dev_type == 'momo':#食梦貘
@@ -5609,12 +5586,14 @@ class AI_VC(Abstract):
                 keywords.append(key) 
             json_data["payload"]["inbound_attributes"]["cfg"]["keywords"] = keywords
         elif dev_type == 'sjgq':#四季甘泉
                 keywords.append(key) 
             json_data["payload"]["inbound_attributes"]["cfg"]["keywords"] = keywords
         elif dev_type == 'sjgq':#四季甘泉
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7472201279826690111"
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="472203898494500914"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7472201279826690111"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="472203898494500914"
+            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
             pass
         elif dev_type == 'szbst':#深圳百事通
             pass
         elif dev_type == 'szbst':#深圳百事通
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7469964258592931852"
-            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7469968083063603241"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["bot_id"]="7469964258592931852"
+            # json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["workflow_id"]="7469968083063603241"
+            json_data["payload"]["dialog_attributes"]["cfg"]["bot_option"]["use_workflow"]=True
         elif dev_type == 'jswm' or dev_type == 'jswm_BOX':#金三完美
             #json_data["payload"]["device_id"]= "WangQunTestID"
             if self.VC_TTS_voice_type[self.VC_TTS_voice_key]["bot_id"] !="":
         elif dev_type == 'jswm' or dev_type == 'jswm_BOX':#金三完美
             #json_data["payload"]["device_id"]= "WangQunTestID"
             if self.VC_TTS_voice_type[self.VC_TTS_voice_key]["bot_id"] !="":
index b277a3b..744246b 100644 (file)
@@ -182,6 +182,71 @@ class PROTOCOL:
     CALLCANCEL_RECV = "CALLCANCEL_RECV"
     
 
     CALLCANCEL_RECV = "CALLCANCEL_RECV"
     
 
+# ---------------------------------------------------------------------------
+# 服务器地址集中配置:只改 SERVER_ENV 切换整组(与代码中生效地址、注释备选一致)
+#
+# qipai       — 当前默认:dmp-api.qipai.com(REST)+ 柒牌 IoT WSS
+# raisound_dev— 注释「北科测试」:dmp-dev.raisound.com(HTTPS)+ 对应 IoT WSS
+# beike_bz    — 注释「北科地址」:http://dmp.raisound.com/bz-api + wsiot-nocdn WS
+# kxc         — 科学城 demo:kxc 域名(bz-api / amp / iot-api)
+# ---------------------------------------------------------------------------
+SERVER_ENV = "qipai"
+
+_SERVER_CFG = {
+    "qipai": {
+        "dmp_cn_base": "https://dmp-api.qipai.com/qp-dmp-api",
+        "iot_ws_url": "wss://dmp-api.qipai.com/qp-iot-api/ws-hub/dev/v1",
+        "iot_token_query": "qp-dt",
+        "iccid_header_post_user": "qp-dt",
+        "amp_7pin": "115.190.94.208:22080",
+        "amp_g10": "115.190.94.208:22080",
+        "config_7pin": "http://ota.qipai.com/bz-cmp-api/api/config",
+        "config_other": "https://qipai-dev.dobell.top/qp-dmp-api/dev/config",
+    },
+    "raisound_dev": {
+        "dmp_cn_base": "https://dmp-dev.raisound.com/dmp-api",
+        "iot_ws_url": "wss://dmp-dev.raisound.com/iot-api/ws-hub/dev/v1",
+        "iot_token_query": "bz-dt",
+        "iccid_header_post_user": "bz-dt",
+        "amp_7pin": "115.190.94.208:22080",
+        "amp_g10": "115.190.94.208:22080",
+        "config_7pin": "http://ota.qipai.com/bz-cmp-api/api/config",
+        "config_other": "http://dmp-dev.raisound.com/dmp-api/dev/config",
+    },
+    "beike_bz": {
+        "dmp_cn_base": "http://dmp.raisound.com/bz-api",
+        "iot_ws_url": "ws://wsiot-nocdn.raisound.com/ws-hub/dev/v1",
+        "iot_token_query": "bz-dt",
+        "iccid_header_post_user": "bz-dt",
+        "amp_7pin": "115.190.94.208:22080",
+        "amp_g10": "115.190.94.208:22080",
+        "config_7pin": "http://ota.qipai.com/bz-cmp-api/api/config",
+        "config_other": "https://qipai-dev.dobell.top/qp-dmp-api/dev/config",
+    },
+    "kxc": {
+        "dmp_cn_base": "http://kxc.raisound.com/bz-api",
+        "iot_ws_url": "ws://kxc.raisound.com/iot-api/ws-hub/dev/v1",
+        "iot_token_query": "bz-dt",
+        "iccid_header_post_user": "bz-dt",
+        "amp_7pin": "kxc.raisound.com/amp-api",
+        "amp_g10": "115.190.94.208:22080",
+        "config_7pin": "http://ota.qipai.com/bz-cmp-api/api/config",
+        "config_other": "https://qipai-dev.dobell.top/qp-dmp-api/dev/config",
+    },
+}
+
+_S = _SERVER_CFG[SERVER_ENV]
+DMP_CN_BASE = _S["dmp_cn_base"]
+DMP_GLOBAL_BASE = "http://dmp-global.raisound.com/bz-api"
+IOT_WS_URL = _S["iot_ws_url"]
+IOT_WS_TOKEN_QUERY = _S["iot_token_query"]
+ICCID_HEADER_POST_USER = _S["iccid_header_post_user"]
+AMP_7PIN = _S["amp_7pin"]
+AMP_G10 = _S["amp_g10"]
+CONFIG_URL_7PIN = _S["config_7pin"]
+CONFIG_URL_OTHER = _S["config_other"]
+
+
 class EVENT:
     CHANNEL_SOCKET_SEND = "CHANNEL_SOCKET_SEND"
     START_LOCATION = "START_LOCATION" 
 class EVENT:
     CHANNEL_SOCKET_SEND = "CHANNEL_SOCKET_SEND"
     START_LOCATION = "START_LOCATION" 
index cc7b93f..e727569 100644 (file)
@@ -1455,8 +1455,7 @@ class SockMangager(Abstract):
         try:
             if token != None:
                 self.connect_web_timer_count = 0
         try:
             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 = "wss://dmp-dev.raisound.com/iot-api/ws-hub/dev/v1?bz-dt={}".format(token)#北科测试
+                url_t = "{}?{}={}".format(constants.IOT_WS_URL, constants.IOT_WS_TOKEN_QUERY, token)
                 try:
                     self.iot_protocol_client=uwebsocket.Client.connect(url_t, debug=True)
                     self.reconnect_count=0
                 try:
                     self.iot_protocol_client=uwebsocket.Client.connect(url_t, debug=True)
                     self.reconnect_count=0
index 2dd9720..0f664b9 100644 (file)
Binary files a/2.sdk/project/7PIN_1_5/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip and b/2.sdk/project/7PIN_1_5/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip differ
index c7b80b1..2a124f8 100644 (file)
@@ -2,38 +2,34 @@
 
 md images
 del images /q
 
 md images
 del images /q
-@GOTO :STEP1
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1048576 -i .\images\ext_fs.bin
 if errorlevel 1 (
-    echo "ext_fs.bin生成失败 !!!!!!!!!!!!!!! "
+    echo ERROR: mklfs failed while building ext_fs.bin
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "ext_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-:STEP1
-
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 696320 -i .\images\customer_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 696320 -i .\images\customer_fs.bin
 if errorlevel 1 (
-    echo "customer_fs.bin生成失败 请检查usr目录是否大于316K!!!!!!!!!!!!!!!"
+    echo ERROR: mklfs failed while building customer_fs.bin
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "customer_fs.bin生成成功 !!!!!!!!!!!!!!! "
-)
-
-%copy font\ext_font.bin images\ext_font.bin%
-
+copy /Y font\ext_font.bin images\ext_font.bin
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
-if errorlevel 0 (
-    echo images压缩成功!!!!!!!!!!!!!!
-)
 if errorlevel 1 (
 if errorlevel 1 (
-    echo images压缩失败!!!!!!!!!!!!!!!!!!
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
+if errorlevel 1 (
+    echo ERROR: helios build failed - see compiler output above
+    cd ..
+    exit /b 1
+)
 cd ..
 cd ..
-:exit
\ No newline at end of file
+exit /b 0
+
+:exit
+exit /b 1
diff --git a/2.sdk/project/K01/new_version.bat b/2.sdk/project/K01/new_version.bat
new file mode 100644 (file)
index 0000000..f7fef1a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.0"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
index a68e5ad..c713f88 100644 (file)
@@ -4,34 +4,32 @@ md images
 del images /q
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1363148 -i .\images\ext_fs.bin
 if errorlevel 1 (
 del images /q
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c ext -b 4096 -r 4096 -p 4096 -s 1363148 -i .\images\ext_fs.bin
 if errorlevel 1 (
-    echo "ext_fs.bin??????? !!!!!!!!!!!!!!! "
+    echo ERROR: mklfs failed while building ext_fs.bin
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "ext_fs.bin?????? !!!!!!!!!!!!!!! "
-)
-
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 491520 -i .\images\customer_fs.bin
 if errorlevel 1 (
 ..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 491520 -i .\images\customer_fs.bin
 if errorlevel 1 (
-    echo "customer_fs.bin??????? ????usr????????316K!!!!!!!!!!!!!!!"
+    echo ERROR: mklfs failed while building customer_fs.bin
+    echo   usr may exceed LFS capacity - see mklfs -s on the line above
+    echo   Legacy hint: old scripts mentioned ~316K - increase -s or shrink usr
     goto exit
 )
     goto exit
 )
-if errorlevel 0 (
-    echo "customer_fs.bin?????? !!!!!!!!!!!!!!! "
-)
-
 copy font\ext_font.bin images\ext_font.bin
 copy font\ext_font.bin images\ext_font.bin
-
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
 ..\..\Helios_SDK\tools\common\win32\7z\7z a sdk\system\platform\ASR_1606\boards\EG810MCN_GA_VOLTE\images\firmware_base_release_pack.zip .\images\
-if errorlevel 0 (
-    echo images??????!!!!!!!!!!!!!!
-)
 if errorlevel 1 (
 if errorlevel 1 (
-    echo images??????!!!!!!!!!!!!!!!!!!
+    echo ERROR: 7z failed to pack images into firmware_base_release_pack.zip
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
     goto exit
 )
 xcopy  sdk\ ..\..\Helios_SDK\ /e/h/y
 cd ..\..\Helios_SDK
 helios make services/microPython @EG810MCN_GA_VOLTE EG810MCN_GA_VOLTE
+if errorlevel 1 (
+    echo ERROR: helios build failed - see compiler output above
+    cd ..
+    exit /b 1
+)
 cd ..
 cd ..
-:exit
\ No newline at end of file
+exit /b 0
+
+:exit
+exit /b 1
diff --git a/2.sdk/project/K8/new_version.bat b/2.sdk/project/K8/new_version.bat
new file mode 100644 (file)
index 0000000..f7fef1a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off
+REM FW version (edit FW_VERSION). Build_Time is generated each run.
+set "FW_VERSION=V1.0"
+
+echo Version="%FW_VERSION%" > sdk\services\microPython\ports\quectel\core\versions.py
+echo Build_Time="%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,8%" >> sdk\services\microPython\ports\quectel\core\versions.py
diff --git a/2.sdk/release_copy.bat b/2.sdk/release_copy.bat
new file mode 100644 (file)
index 0000000..539c491
--- /dev/null
@@ -0,0 +1,84 @@
+@echo off
+setlocal EnableDelayedExpansion
+REM Copy Helios_SDK\opt\release\<board>\ to release\<proj>_<ver>_<time>\
+REM Usage: release_copy.bat <project_dir>
+
+set "SDKROOT=%~dp0"
+set "PROJ=%~1"
+if "%PROJ%"=="" goto rc_err_proj
+
+set "VFILE=%SDKROOT%project\%PROJ%\sdk\services\microPython\ports\quectel\core\versions.py"
+if not exist "%VFILE%" goto rc_err_ver
+
+if not exist "%SDKROOT%Helios_SDK\opt\tmp\build_sucess.tmp" goto rc_skip
+
+set "FW_VER=UNKNOWN"
+for /f "usebackq tokens=2 delims==" %%a in (`findstr /b /c:"Version=" "%VFILE%"`) do (
+    set "FW_VER=%%a"
+    goto v_done
+)
+:v_done
+set "FW_VER=!FW_VER:"=!"
+set "FW_VER=!FW_VER: =!"
+
+set "FW_BT=unknown"
+for /f "usebackq tokens=2 delims==" %%a in (`findstr /b /c:"Build_Time=" "%VFILE%"`) do (
+    set "FW_BT=%%a"
+    goto t_done
+)
+:t_done
+set "FW_BT=!FW_BT:"=!"
+REM Trim leading/trailing spaces so " =_!" does not turn a trailing space into "_"
+:trim_bt_lead
+if "!FW_BT:~0,1!"==" " set "FW_BT=!FW_BT:~1!" & goto trim_bt_lead
+:trim_bt_trail
+if "!FW_BT:~-1!"==" " set "FW_BT=!FW_BT:~0,-1!" & goto trim_bt_trail
+if "!FW_BT!"=="" set "FW_BT=unknown"
+set "FW_BT=!FW_BT: =_!"
+set "FW_BT=!FW_BT::=-!"
+:trim_bt_us
+if "!FW_BT:~-1!"=="_" set "FW_BT=!FW_BT:~0,-1!" & goto trim_bt_us
+
+set /p FW_NAME=<"%SDKROOT%Helios_SDK\opt\tmp\fw_name_record.tmp"
+set "FW_NAME=!FW_NAME: =!"
+if "!FW_NAME!"=="" set "FW_NAME=EG810MCN_GA_VOLTE"
+
+set "REL_SRC=!SDKROOT!Helios_SDK\opt\release\!FW_NAME!"
+if not exist "!REL_SRC!" goto rc_err_rel
+
+set "REL_DST=%SDKROOT%release\%PROJ%_!FW_VER!_!FW_BT!"
+:trim_dst_us
+if "!REL_DST:~-1!"=="_" set "REL_DST=!REL_DST:~0,-1!" & goto trim_dst_us
+mkdir "!REL_DST!" 2>nul
+echo [release] Copying build output to snapshot folder:
+echo           !REL_DST!
+xcopy "!REL_SRC!" "!REL_DST!" /E /I /Y /Q
+if errorlevel 1 goto rc_err_copy
+echo [release] Done. All files from "!REL_SRC!" were copied.
+exit /b 0
+
+:rc_skip
+echo [release] Skipped: Helios_SDK\opt\tmp\build_sucess.tmp was not found.
+echo           The build may have failed or did not finish; no files were copied to release\.
+exit /b 0
+
+:rc_err_proj
+echo [release] ERROR: No project directory name was passed.
+echo           Usage: release_copy.bat ^<project_dir^>   Example: release_copy.bat 7PIN_1_5
+exit /b 1
+
+:rc_err_ver
+echo [release] ERROR: versions.py is missing. Run new_version.bat in the project first.
+echo           Expected file: %VFILE%
+exit /b 1
+
+:rc_err_rel
+echo [release] ERROR: SDK release output folder does not exist:
+echo           !REL_SRC!
+echo           Check fw_name_record.tmp and that the Helios build produced opt\release\^<board^>.
+exit /b 1
+
+:rc_err_copy
+echo [release] ERROR: xcopy failed while copying to the release snapshot.
+echo           Check free disk space, path length, and file locks.
+exit /b 1