add modbus protocol support and fix buffer release issue.