now there is already a function for transferring data from RealDash to CAN
but when transferring to USB (it’s easier in Uart), it’s hard for me to understand the length of the packet. I ask you to change the format of the sending data and add a byte of the packet length to it
Example
44 33 22 11 DLC ID ID ID ID XX XX XX XX XX XX XX XX CRC
DLC = 1,2,3 … 8
I don’t fully understand what you mean by this.
if I send less than 8 bytes, it is very difficult to understand the length of the packet, it can be from 10 to 17 bytes. in a USB STM32, it is difficult to understand the end of the package.
DLC=8
44 33 22 11 DLC ID ID ID ID XX XX XX XX XX XX XX XX CRC
DLC=1
44 33 22 11 DLC ID ID ID ID XX CRC - it is difficult to read correctly if you do not know the length of the packet
RealDash CAN protocol ‘44’ frame is always 8 bytes. Hence, DLC is not part of the package.
If you want to send more bytes in single frame, you need to use extended ‘66’ frame instead. See documentation here:
RealDash-extras/RealDash-CAN/realdash-can-protocol.md at master · janimm/RealDash-extras · GitHub
RealDash never sends a frame with less than 8 bytes.
i test again
RD send to CAN data packets of different lengths
Example
I only caught 10 bytes.
Yes, this is a bug. Will be fixed for next release.