diff --git a/apps/chrg/applications/thread/chrg_comm.c b/apps/chrg/applications/thread/chrg_comm.c index 284e1a4..3fb70e6 100644 --- a/apps/chrg/applications/thread/chrg_comm.c +++ b/apps/chrg/applications/thread/chrg_comm.c @@ -586,7 +586,7 @@ eMBException funcWriteMultipleCoils (rt_uint8_t *reqFrame, rt_uint16_t reqLen, } memcpy(resFrame, reqFrame, reqLen); - *resLen = reqLen-2; + *resLen = 6; eRegStatus = eMBRegCoilsCB(reqFrame, &resFrame[3], regAddress, cntCoils, MB_REG_WRITE); if (eRegStatus != MB_ENOERR) { @@ -620,7 +620,7 @@ eMBException funcWriteMultipleHoldingRegister (rt_uint8_t *reqFrame, rt_uint16_t } memcpy(resFrame, reqFrame, reqLen); - *resLen = reqLen-2; + *resLen = 6; eRegStatus = eMBRegHoldingCB(reqFrame, &resFrame[3], regAddress, cntReg, MB_REG_WRITE); if (eRegStatus != MB_ENOERR) {