Questions tagged [can-bus]

Controller Area Network (CAN) bus is a networking technology typically used in cars and other vehicles. It supports deterministic priority arbitration with multiple transmitting nodes.

The CAN bus is a serial bus that allows multiple masters and uses a broadcast model. A message start with an ID, can contain up to eight data bytes (64 data bytes for CAN FD) and uses non-return-to-zero encoding. Each node can receive, but only one can send at each point in time. It uses CSMA/CA algorithm for bus access. The lower the (numerical) ID, the higher the priority. Short networks (below 40 m) can achieve bit rates up to 1 Mbit/s.

A distinguishing feature of CAN is that when two nodes with different message identifiers attempt to transmit at the same time, there are no collisions (CSMA/CA). The higher priority message will go through without any need for the sender to re-transmit it. This ensures that a CAN system can never get into a live lock state in which two nodes would continually re-send the same two messages, and continually collide with each other.

A newer version/generation called CAN FD was recently developed. It supports higher clocking of the data portion of the message, allowing up to 64 bytes of payload.

Tag usage:

  • Use this tag for all questions related to CAN or CAN FD software/firmware: drivers, controllers, communication, frames etc. Please note that hardware questions are off-topic and should be asked at https://electronics.stackexchange.com instead.
  • It is recommended to combine the tag with , to draw more attention to the question from the right kind of people.
  • If you are using a particular programming language (say, ), you should add that tag as well.
  • If the question is about higher layer protocols such as CANopen, J1939 or DeviceNet, the tag should be combined with the applicable higher layer protocol tag.

Links:

1162 questions
0
votes
1 answer

obdII bluetooth with CANCaseXL tool

This is Kishore I use ELM327 based OBDII to Bluetooth adapter to monitor the CAN traffic in the Passenger Vehicle. Said otherwise, our intent is to deploy EML327 as a CAN2BT Dongle (for CAN message Rx purposes). I would love to use the Monitor All…
0
votes
1 answer

How to troubleshoot CAN bus communication

I am trying to connect ICP CON i-7565 (USB<->CAN interface) to a custom made device (supporting CAN2.0B, proved to work with PCL-841 card) Although I think I have configured BAUD and acceptance code/mask correctly I can see CAN no messages coming…
lot
  • 1,434
  • 18
  • 23
0
votes
1 answer

Can EIA232 communication be implemented using a Resource Adapter in Java EE?

The question may be already present here on SO, in this case please apologize my not having been able to find it. I'm planning to rewrite a desktop application whose communication layer is currently implemented invoking methods (functions) in a CAN…
András Hummer
  • 960
  • 1
  • 17
  • 35
0
votes
2 answers

Linux CAN bus transmission timeout

Scenario There is a Linux-powered device connected to a CAN bus. The device periodically transmits the CAN message. The nature of the data carried by this message is like measurement rather than command, i.e. only the most recent one is actually…
Pavel Kirienko
  • 1,162
  • 1
  • 15
  • 31
0
votes
1 answer

CANopen API COBID

I'm trying to communicate with a USB-to-CAN device. I'm using the Canopen.net API, and I did not fully understand all of the classes that are under it, but from what I read, I understood that cCob is the class that I need to use. I managed to…
0
votes
2 answers

How to access a function inside a dll file in C++

I am currently trying to communicate with a device using CAN. To do so I am using PCAN Basic using C++. Unfortunately, I know nothing about accessing a function inside a dll file (which is what is provided). I found this link: Calling a dll…
code11
  • 1,986
  • 5
  • 29
  • 37
0
votes
1 answer

Developing a decoder for CANbus / J1939

So, I have been told that I will need to integrate some CANbus / J1939 output into a Windows app, and I know nothing about it. There are vague plans to use an off the shelf device, and capture the output from that. Since this seems to be a 7 layer…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
0
votes
2 answers

Linux can bus driver

I am going through a can base network driver for MCP-2515 https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/net/can/mcp251x.c Please suggest where i can find the description of the function,…
Katoch
  • 2,709
  • 9
  • 51
  • 84
0
votes
0 answers

How to detect CAN device insertion and removal in Linux using Python

I've been researching for a while on how to best detect an CAN-USB device being connected and disconnected from a Linux platform (Ubuntu 12.04), but it has been slow progress. The best advice I can find out there suggests to use dbus to detect the…
0
votes
3 answers

How to use CAN-Bus on an Intel Atom Q7 module with EG20T chipset on Linux?

I want to use the CAN-Bus interface on an Intel Q7 module with the EG20T chipset. I got it to work on Windows but now i have to get it to work on Linux but I barely find any information. I just need to know how I can read, write messages, start,…
Serious Sammy
  • 99
  • 2
  • 11
0
votes
1 answer

Efficiency/Speed of updating GUI Elements while Reading CAN input

I had no experience with Controller Area Networks(CAN) or ValueCAN3 prior to this project, and I used an example from Intrepid for my reading of messages. However I am having issues with efficiency and frequency of the updates for my GUI which…
Brandon
  • 191
  • 2
  • 15
0
votes
1 answer

how to handle -- fast tx & recepion of data --- device driver Linux

I am looking forward to implement a driver for CAN bus communicationin Linux. Need some design suggestion. Linux there are user space & kernel space. Drivers run at kernel space application at user space. 1> Now suppose if packets are received at…
Katoch
  • 2,709
  • 9
  • 51
  • 84
0
votes
1 answer

CAN communication questions

I started down this path, because I've got a CAN driver in uCLinux that I'm reviewing. I'm new to CAN in general, so I was doing a little research about it, and I've stumbled upon a question that I haven't found an answer to. If CAN is a serial…
Mike
  • 47,263
  • 29
  • 113
  • 177
0
votes
1 answer

STM32F4 How to get first message from Can1 and send it to Can2 , Can1 and Can2 have different speed

I have a development kit STM32f4 discovery kit and it has double Canbus interface modules. How to get first message from Can1 and send it to Can2 , Can1 and Can2 have different speed
saucompeng
  • 81
  • 1
  • 5
-1
votes
2 answers

Is it possible to connect microcontroller pins directly to CANcaseXL from Vector?

So that I can access the messages in the CANoe tool... This is just to test my application; I don't have a CAN transceiver on my development board. I think there are some options.