电信入库
authorDXY <1731678236@qq.com>
Wed, 15 May 2024 08:51:20 +0000 (16:51 +0800)
committerDXY <1731678236@qq.com>
Wed, 15 May 2024 08:51:20 +0000 (16:51 +0800)
code/sdk/drivers/peripheral/slip/cat1Service/pyscript/telecom_dmp.py [new file with mode: 0644]

diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/pyscript/telecom_dmp.py b/code/sdk/drivers/peripheral/slip/cat1Service/pyscript/telecom_dmp.py
new file mode 100644 (file)
index 0000000..525fafd
--- /dev/null
@@ -0,0 +1,64 @@
+import app_fota
+from misc import Power
+import modem
+import ujson
+import request
+import ql_fs
+import checkNet
+import sys
+import sim
+#远程升级
+
+import fota
+import utime
+import log
+import uos
+
+# 设置日志输出级别
+log.basicConfig(level=log.INFO)
+fota_log = log.getLogger("telecom_dmp")
+
+
+import request
+import ujson
+def get_sim_state():#获取sim状态 不为1是sim异常
+    return sim.getStatus()
+
+def dmp_test():
+    if get_sim_state() != 1:
+        return
+    url = "http://zzhc.vnet.cn:9998/"
+    data = {
+        "REGVER":"v12.0",
+        "MODEL":"TXB-Watch Soar",
+        "SWVER":"1.0.0",
+        "UETYPE":"12",
+        "SIM1ICCID":"89860322157550846869",
+        "SIM1LTEIMSI":"460115058064458",
+        "MACID":"28:11:06:6A:57:58",
+        "OSVER":"HarmonyOS Sans",
+        "IMEI1":"876226002021717",
+        "SIM1CELLID":"C3"
+    }
+    response = request.post(url, data=ujson.dumps(data))
+    content = response.content
+    c = next(content)
+    # "api.xcloudtech.com"
+    # d_server_port = 9000
+    jsload_data =  ujson.loads(c)
+    print("jsload_data:{}".format(jsload_data))
+    print("jsload_dataend:{}".format(jsload_data))  
+    
+
+
+if __name__ == '__main__':
+    print("telecon_dmp init!!!!!")
+    dmp_test()
+    
+
+
+
+
+
+
+