How write or use Can Bus driver on BBB with Ubuntu?

Hi,
I want to use Can Bus module but I didn’t find any driver for CAN Bus.Have you any suggestion on this topic? I think I must write driver code for the CAN BUS driver. what do you think ?

I researched lot this topic and only at this web site i find example but this example wrote Erlang programming language.( http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/ )
But that wrote for the enable CAN Bus İ have to do patched device tree compiler.Then for patching i connect this webpage http://www.embedded-things.com/bbb/patching-the-device-tree-compiler-for-ubuntu/ there explain with some steps .However at second steps they write this command git clone http:``//jdl``.com``/software/dtc``.git/

but there website removed and i couldn't download dtc on that webpage.Then i found different sites and download there dtc files.(http://git.qemu.org/?p=dtc.git;a=summary) but when i want to suply third steps so i try this command
git reset --hard f8cb5dd94903a5cfa1609695328b8f1d5557367f
ubuntu gave this error. HEAD is now at f8cb5dd utilfdt_read_err: use xmalloc funcs

Then i found https://groups.google.com/forum/#!topic/beagleboard/vCh6ed9ZATk this page and try Robert Nelson’s steps but condition don’t change i get same error.

Please Help me for this topic What can i use Can Bus Module on Beaglebone Black?
Kind Regards

Well, you need a CAN cape of some form to provide a CAN transceiver. Something like this:
http://www.logicsupply.com/cbb-serial/

After that, follow the directions that the manufacturer provides.

Thank you Andrew for your suggestion.But i don’t want to use any extra hardware.I want to use direct BBB.Wonder if i couldn’t find Can Bus driver for BBB ?

28 Ağustos 2015 Cuma 16:53:08 UTC+3 tarihinde Andrew P. Lentvorski yazdı:

Thank you Andrew for your suggestion.But i don’t want to use any extra hardware.I want to use direct BBB.Wonder if i couldn’t find Can Bus driver for BBB ?

Good luck with that. It is my understanding that you have to have a cape, or at minimum logic level translation in order to use the canbus on the BBB. Otherwise, the canbus behaves as if it’s non functional.

You don’t get a choice. CAN requires a transceiver to convert from the TX/RX signals on the Beaglebone into the differential bus dominant/recessive that is the physical layer for CAN.

In addition, you must have TWO can nodes in order to test communication. CAN requires an ACK before it will release the transmit buffer.

I would really suggest that you start with something simpler like SPI or I2C (both of which can be used directly off of the Beaglebone connectors). CAN isn’t hard, but it’s not for beginners either.

If you just want to play with the CAN protocol, use the Linux virtual can drivers. However, those won’t put any signals “on the wire” so to speak as they truly are “virtual”.

Side note: wireshark is capable of decoding CAN packets and even the SocketCAN protocol!

Side note: wireshark is capable of decoding CAN packets and even the SocketCAN protocol!

This is something I guess I’ll never get. Whats the point ? socketcan frames only have up to 8 byte data payloads . . .candump, and a good eye for your data is all that is needed.

Hi Andrew ,
I think you misunderstand me.I couldn’t active BBB’s CAN legs.So i couldn’t use CAN .Then i couldn’t find to using of CAN Bus with BBB .So i want to learn Beaglebones Black’s how to CAN leg could do active and starting communication.But at this link commands didn’t work.(http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/)

30 Ağustos 2015 Pazar 11:48:21 UTC+3 tarihinde Andrew P. Lentvorski yazdı:

In the comments from the linked article you have this message:

which cape is this tutorial for? I also have several TowerTech Can capes. http://circuitco.com/support/index.php?title=TT3201_CAN_Cape

To which the original author responds:

I did not use any cape when making this tutorial, I simply hooked up a CAN transceiver to the relevant pins. However, I see now reason why it shouldn’t work with the cape, it may simply be a device tree conflict.

Note the need for a CAN transceiver. If you don’t get this, you can’t even start.

Huh? CANOpen/SocketCAN SDO transactions can have almost indefinite extent, have toggle bits that persist across frames, and CRC’s that span the whole transaction.

If you can eyeball that, you are way smarter than me.

I think you may only be considering PDO transactions which are only ever 8 bytes max.

Hi Mr Hermans
I could work cansend command but i couldn’t see outgoing data.Could I see datas with oscilloscope? I tried but couldn’t see anything wonder if what’s wrong

30 Ağustos 2015 Pazar 18:37:14 UTC+3 tarihinde William Hermans yazdı: