From: Romain Forlot Date: Tue, 16 May 2017 10:42:35 +0000 (+0200) Subject: Fix: CAN message transmitted filled of zero. X-Git-Tag: 5.0.2~222 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=242f0f5c08dbf5d80734d64311fcd6ac29852a81;p=apps%2Fagl-service-can-low-level.git Fix: CAN message transmitted filled of zero. can_dlc field was set to 0 and is evaluated so BCM assumes there is no data to transmit. It is mandatory to set it. Change-Id: I1e29ff4248a49212d3fee22c3a0cc77f5b699fd7 Signed-off-by: Romain Forlot --- diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp index 75396342..eb9a3441 100644 --- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp +++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp @@ -168,6 +168,7 @@ bool diagnostic_manager_t::shims_send(const uint32_t arbitration_id, const uint8 bcm_msg.msg_head.ival2.tv_sec = freq.tv_sec; bcm_msg.msg_head.ival2.tv_usec = freq.tv_usec; bcm_msg.msg_head.nframes = 1; + cfd.can_dlc = size; ::memcpy(cfd.data, data, size); bcm_msg.frames = cfd;