|
@@ -457,6 +457,13 @@ static void TcpDataInfoRecvHandle()
|
|
|
else if(*(Ptr+30)==0x80)//远程锁定命令
|
|
|
{
|
|
|
osMutexAcquire(UartMutex, osWaitForever);
|
|
|
+ TcpCmdAnswer[3] = 0x01;
|
|
|
+ memcpy(&TcpCmdAnswer[4],(Ptr+4),BATT_SN_LEN);
|
|
|
+ TcpCmdAnswer[21] = TCP_ENCPT_DISABLE;
|
|
|
+ TcpCmdAnswer[22] = 0x00;
|
|
|
+ TcpCmdAnswer[23] = 0x06;
|
|
|
+ memcpy(&TcpCmdAnswer[24],(Ptr+24),6);
|
|
|
+ TcpCmdAnswer[30] = bcc_chk(TcpCmdAnswer,30);
|
|
|
if(*(Ptr+31)==0x01)//0x01代表锁定
|
|
|
{
|
|
|
AppNVMData.appDataModify = TRUE;
|
|
@@ -467,6 +474,7 @@ static void TcpDataInfoRecvHandle()
|
|
|
if((UartReadMsg.data[(0x03+BATT_CELL_VOL_NUM)*2+1]&0x03)==0x00)
|
|
|
{
|
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteCmd,0,1000);
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
}
|
|
|
}
|
|
|
else //0x02代表解锁
|
|
@@ -477,16 +485,9 @@ static void TcpDataInfoRecvHandle()
|
|
|
UartWriteCmd.Data[0] = 0x00;
|
|
|
UartWriteCmd.Data[1] = 0x03;
|
|
|
osMessageQueuePut(UartWriteCmdHandle,&UartWriteCmd,0,1000);
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
}
|
|
|
- TcpCmdAnswer[3] = 0x01;
|
|
|
- memcpy(&TcpCmdAnswer[4],(Ptr+4),BATT_SN_LEN);
|
|
|
- TcpCmdAnswer[21] = TCP_ENCPT_DISABLE;
|
|
|
- TcpCmdAnswer[22] = 0x00;
|
|
|
- TcpCmdAnswer[23] = 0x06;
|
|
|
- memcpy(&TcpCmdAnswer[24],(Ptr+24),6);
|
|
|
- TcpCmdAnswer[30] = bcc_chk(TcpCmdAnswer,30);
|
|
|
osMutexRelease(UartMutex);
|
|
|
- tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
TcpService=0x00;
|
|
|
|
|
|
}
|