I had this posted in the Home automation and network objects earlier. Just realized it was the wrong place for it so I'm reposting it here.
I am trying to connect to the CAN bus of a heavy truck via the 24v OBD2 port.
The CAN lines, ground and 24v are the only pins in the connector.
I am using an mcp2515 board, an Arduino UNO and the library by
Cory J Fowler(GitHub - coryjfowler/MCP_CAN_lib: MCP_CAN Library).
I have confirmed it working on another vehicle, successfully receiving data.
On the vehicle that worked, the voltage difference across the can lines is 0.3v, which makes sense based on what I read online.
On my truck, the voltage difference between the 2 lines is 0v, the difference between each of them and ground is 2.45v, and the resistance across the lines is 120 ohm with the battery removed.
These are not consistent with what I managed to find online, and my setup is not working. Tried both with and without the terminating resistor on the mcp2515 board, both at 250k and 500k baud rate.
The truck works fine, and there are no issues reported in the instrument cluster.
I'm running out of ideas and would appreciate any input or advice.