from usr.httpota import httpota
from usr.telecom_dmp import telecomDmpCb
from usr.china_mobile_dmp import chinamobileCb
+from usr.tcpserver import TcpServiceInit
from usr.china_mobile_ai_regulation import aiRegulation
# 设置日志输出级别
# UDP_MSG_OTA
elif cmd == "1C":#
self.read_dev_ai_id()
+ elif cmd== "1D":
+ TcpService = TcpServiceInit()
+ TcpService.start_socket_thread()
elif cmd == "AC":#
if self.ack_sem==1:
self.ack_sem=0
self.conn= None
self.__sock_file = None
self.__sock_file = self.__socket_file_init()
- self.__thread_file = _thread.start_new_thread(self.__Socket_File_Thread, ())
- self.conn_thread=_thread.start_new_thread(self._client_conn_proc, ())
+
def __pack_tlv_format(self, head, content):
head1 = head
def otaTimeOut(self,*argc):
clog.info("重启成功!!!!!!!!\r\n")
+
+ def start_socket_thread(self):
+ __thread_file = _thread.start_new_thread(self.__Socket_File_Thread, ())
+ conn_thread=_thread.start_new_thread(self._client_conn_proc, ())
+
-TcpService = TcpServiceInit()
+# TcpService = TcpServiceInit()
clog.info("Socket_SEND_Thread data:{} {}".format(data[0],data[1]))
count=20
- while count and self.ack_sem :
+ while count & self.ack_sem :
utime.sleep_ms(1)
count=count-1
# if data[2]: