Hi all!
I'm having a problem with a CAN bus system i'm working on.
It's a tractor, and i have an arduino UNO with a MCP2515 module attached to it. No problems there. I can read the CANBus data perfectly on other tractors before, and i was able to take over controls of levers by sending the CAN Bus data .
Now i have a new model tractor in , and it works with extended ID's (29 bits). It took me a while before i realized it , i only saw four different CAN ID's in my sniffer , but after i discovered there were extended ones, the total number of ID's was well above 300.
I need to be able to acivate the forward/reverse button, i have found the ID and the data pretty fast, but when i try to send the CAN data, nothing happens. I'm pretty sure my method is OK, because i was able to intercept and duplicate another button on the armrest and that worked fine.
Question , does a 29bit can bus messages always have 8 bit data structure? I thought so, but when i added 8 more bytes to the sniffer, they also showed data . But injecting that 16 bit onto the bus didn't work eather.
So ID is correct, Data is correct but nothing happens, what am i missing? Any ideas?
Here is some code :
byte FwButton[8] = { 0x00, 0x00, 0xF0, 0x20, 0x00, 0xF0, 0xFF,0xFF} ;
byte FWButtonRelease[8] = { 0x00, 0x00, 0xF0, 0x00, 0x00, 0xF0, 0xFF,0xFF} ;
// i did set the second parameter to 1 for extended
// when i push a button :
CAN0.sendMsgBuf(0x98FF9D93,1,8,FwButton);
I use the mcp_can library, have the correct speed (8mhz and 500kbps)