collin80 / M2RET

GVRET fork to Macchina M2 board
MIT License
70 stars 21 forks source link

Writing to SWCAN #10

Open derchris opened 6 years ago

derchris commented 6 years ago

Hi,

I'm logging my CAN bus and I know (from a different test with another lib, Afterglow/arduino-gmlan) that eg sending to address 10644040

with data 0 0 FF

dims the interior lights of my Camaro.

That's with arduino-gmlan: can_send_29bit_message(0x10644040,3, {0,0,0xff})

I try to port this to work with M2Ret (which I use as a boilerplate) and I do see this log message when logging with M2Ret: 10716486 - 10644040 X 2 3 0 0 FF

so, I think, it should be correct to do frame.id = 0x10644040; frame.length = 3; frame.data.byte[0] = 0x00; frame.data.byte[1] = 0x00; frame.data.byte[2] = 0xFF; sendFrame(&SWCAN, frame);

But nothing happens. I tried all different sorts of modifying the frame, like setting priority, rtr, etc. but to no avail.