A few tips on trying to get a CAN bus to work…
Baud Rate
Check the baud rate is good using an oscilloscope. If the baud is 250k for instance, that's 1 second / 250000 = 4uS per bit. You should be able to see 4uS individual bits being sent (the SOF at the start of a frame for instance if the following address bit is high).
Termination!!!!!!!!
Really easy to forget this but CAN buses need termination, its not a nice to have, its an essential. When a bit is transmitted low the bus is forced into a state, but when a high bit is transmitted the bus is simply released – the resistance is needed to pull the bus back to the idle state quickly. This isn't RS422/RS485 when high's and lows are forced onto the bus so you can sometimes get away without termination, the CAN bus is an arbitration based bus that uses idle as a specific bit state. That means 120ohm resistors need to be placed at each end of the bus (although when developing you can often get away with 1 resistor if cable runs are short). Here's an example of a 250k CAN bus device on its own (not connected to anything else). First without the termination resistance (yellow and blue are the CAN-H and CAN-L bus connections):
The 4uS SOF bit has horrible slow trailing edges which the CAN bus peripheral in the device see's as the bit being longer than it is actually sending, causing it to dump TX assuming there is another device on the bus that it needs to concede arbitration to!
Now with a 120 resistor fitted across CAN-H and CAN-L:
A hard edged SOF bit leaving the device to carry on transmitting the rest of the packet.