rayhvh wrote:it gives no error. but also no messages from the can device.
now i got it connected @ 50,000 instead of 500,000.
(because the device im using uses 50 kb/s)
im juist in my internship so im an total noobie.
i connected the High and the Low straight from exension board to the CAN device.
ive tested the board with an windows pc and its sending messages.
my RPI is juist not reciving them.
It is quite hard to diagnose your problem remotely.
Essentially you might just be using the wrong parameters for configuring the communication with the device of your choice...
(Speed, Polarity,...)
As I had discussed (in private communication) with Gerd some time ago, we would recommend that there is an option on future boards to connect the RX/TX lines between the CAN-Controller and the CAN-Transciever to a GPO on the RPI (say via jumpers).
That alone would not give you much by itself, but if there ever was a GPIO based logic analyzer for the RPI, then we could easily check what is happening on the CAN-Bus itself. This would also allow estimating Bus parameters and such
Obviously this would require someone to write such a logic-analyzer - maybe we could use:
http://www.raspberrypi.org/phpBB3/viewt ... =37&t=7696 (i did not check its functionality, as I use my logic8 board for analysis)
And based on this you can estimate the bus pattern to estimate bit speeds and such...
All this together would really help support CAN Bus devices - especially for the vendor of such boards, who need to support it...
But obviously you have a Revision-A or B board, that does not have such a facility.
The only thing I could think of to help, would be for you to get one of those MCP2551 chips (CAN Transcievers) in a DIP-package and put that on your breadboard and connect it to your RPI via one of the unused GPIO pins (for RX only).
Note that you will need to connect the chip to +5V and you will need a voltage divider setup for the RX Pin (so 10k coming from the Chips RX-PIN and 18k to Ground) to make the Output-Voltage level compatible with the 3V3 Levels of the RPI GPIO pins.
Obviously you woul
Then you can start to look at the "traffic pattern" in the RPI-logic-analyser by analyzing the pin in question and start estimating bit length of the pattern you see and then use that to estimate the settings for the configuration of the CAN bus...
As an alternative: If you have an oscilloscope at hand then you can also try to do this: - either pick up the signal on the RX pin (Pin 4 on U1 - either on the right or on the left side of R7) versus ground or just connect your oscilloscope to CanHigh and CanLow and look at the signal then.
That way you can check the waveforms you receive or transmit - for initial testing I would recommend that you run only with one side (RPI with CAN configured or the "client") connected...
Hope this helps you in debugging your problem...
Ciao,
Martin