I am able to read messages from the CANbus network, but not transmit messages from the Photon.
I have tried the following methods:
One Photon in CAN_TEST_MODE with a jumper wire connecting RX and TX. I wrote a program to send a message out on ID 215, and added 1 to the ID every time the message was received. I then printed on the serial, the message ID and received 215, 216, 217… etc. – This functioned as expected
Two Photons connected Rx to Tx and Tx to Rx, both powered by the same USB source (computer).
Photon 1 would send a CAN message out to Photon 2.
Photon 2 then added 1 to the message ID and sent the message back to Photon 1.
Photon 1 would then add 1 more to the ID and so forth, until the ID reached a number.
I tried this method with and without the CAN_TEST_MODE.
With CAN_TEST_MODE, Photon 1 would reply to itself, ignoring Photon 2.
Without CAN_TEST_MODE, can.isEnabled returned 1 and can.errorStatus returned 1 or 2. - No messages were sent
A single Photon was connected to an MCP 2561, which was then connected to a car’s OBDII Port.
When only attempting to read messages, the CAN was working successfully (can.isEnabled = 1, and can.errorStatus = 0)
When attempting to transmit messages, the can.errorStatus would return 1 or 2 and I could not read or write messages.
Has anyone tested whether the MCP 2561 works instead of the MCP2551?
I am new to the Photon environment and hardware, but have experience with CAN in my everyday job. Where should I begin troubleshooting?
I can post my code if necessary.