0
\$\begingroup\$

I'm a student doing an internship and have to send a CAN bus message to a vehicle. I have no experience with the CAN bus, but it's part of my project so I'm trying to learn.

I have to use an i.MX 6 processor that has Linux OpenWrt on it. It has can-utils installed, and I can send commands such as "cansend can0 xxx#xxxxxxx" and see them being received on our in house program.

My problem is that we use the low-speed CAN here and my messages are being sent to the high-speed CAN, so when I try to send a message in a vehicle, it doesn't work. Is there a way I can force the message to be sent on the low-speed so that it will be recognized by the vehicle?

Processor: i.MX 6 application processor

OS: Linux - OpenWrt

CAN utility: canutils

\$\endgroup\$
  • \$\begingroup\$ It returns "canconfig: not found". \$\endgroup\$ – KP123 Mar 21 '16 at 20:21
  • \$\begingroup\$ So my problem is simply that I'm sending the message at too high of a bit rate and lowering this would send it to the low speed CAN? \$\endgroup\$ – KP123 Mar 21 '16 at 20:22
  • \$\begingroup\$ Well, you said that's the problem. I can't know if there's errors in the physical layer without more information. What system you are connecting to, OBD? \$\endgroup\$ – Diego C Nascimento Mar 21 '16 at 20:26
  • \$\begingroup\$ Yeah another engineer I talked to said that my message is being received on the high-speed CAN and not low-speed. Neither of us have any idea how to change it. I'm connected to the OBD port yes. \$\endgroup\$ – KP123 Mar 21 '16 at 20:27
  • \$\begingroup\$ I think I can use the instructions in this link to set the bit rate. Do you know what rate would be good to set it at for low speed? processors.wiki.ti.com/index.php/… \$\endgroup\$ – KP123 Mar 21 '16 at 20:32
1
\$\begingroup\$

The following description may vary depending on each manufacturer, but concepts are similar. Basically a vehicle works with two physically separated CAN networks, which is the high CAN, sometimes refered as C-CAN, and low CAN, sometimes refered as B-CAN. The high CAN usually runs at 500kbps and connects powertrain ECUs, while the low CAN runs at 125kbps and connects media/cluster and other systems that are not safety relevant. The OBD is often not connected to any of above, it can be a third bus connected to the system's gateway: the body. The last is a centralized ECU that is connected to all CAN buses and can act as a CAN router or have its own processing. Normally if you send messages through the OBD it won't reach its destination because the body can act as a firewall to prevent unwanted data getting into its systems. But there are cases in which the OBD connects to a particular high/low bus, not very safe though. You firstly need to find out which bus you are connected to and if this bus has access to whatever ECU you are trying to reach. A good approach is trying to listen to your bus. If no messages arrive you are probably connected to the body which is blocking all your messages.

WARNING: Sending messages through the vehicle's buses can cause unpredictable behavior and safety risks

\$\endgroup\$
0
\$\begingroup\$

There are no such things as standard "high" and "low" CAN speeds. There is a continuum of bit rates that a CAN bus can use, with the upper limit being 1 Mbit/s in most official specs.

The bit rate is decided as part of the design of any CAN bus. This is not communicated on the bus somehow. You have to know up front what it is to participate. That said, you should be able to infer the bit rate by capturing some bits with a scope or a logic analyzer. After you capture enough bits, there is a good enough chance that the shortest level you see is in fact a single bit.

One way or another, it's up to you to configure all the nodes on the bus to the same bit rate, or adjust your single device to the bus bitrate if you are not in control of the bus.

You generally choose the bit rate as a function of the maximum node to node distance along the bus. 1 Mbit/s works up to low 10s of meters. 500 kbit/s is good for something the size of typical house. The NMEA2000 standard uses around (don't remember exactly) 200 kbit/s for large ships.

For a vehicle up to the size of a typical truck, I'd use 1 Mbit/s.

\$\endgroup\$
  • \$\begingroup\$ The bit rate of the standard protocols are available, if it's OBDII as the user says. \$\endgroup\$ – Diego C Nascimento Mar 22 '16 at 19:21
  • \$\begingroup\$ @Diego: Actually he's said nothing about OBDII, which does indeed have a standard bit rate. All he said was "vehicle", which could mean many things, like a university robotics project. \$\endgroup\$ – Olin Lathrop Mar 22 '16 at 20:56
  • \$\begingroup\$ There is such things as ISO standard "high" and "low" CAN speed. "Low speed CAN" is the informal name that refers to fault-tolerant CAN (ISO 11898-3), which is different from the far more commonly used "high speed" CAN (ISO 11898-2). They have different physical layers. The CAN bus. \$\endgroup\$ – Lundin Mar 24 '16 at 14:22
  • \$\begingroup\$ There is a concept of high and low CAN speeds. "Low speed" (LS) does not go above 125 kbit/s, important when ordering a Kvaser Memorator HS/LS vs. Kvaser Memorator HS/HS. CAN Physical Layer Standards: High-Speed vs. Low-Speed/Fault-Tolerant CAN (NI): "Low Speed/Fault Tolerant CAN offers baud rates from 40 Kbit/s to 125 Kbits/sec. This standard allows CAN bus communication to continue in case of a wiring failure on the CAN bus lines. In low speed/fault tolerant CAN networks, each device has its own termination." \$\endgroup\$ – Peter Mortensen Mar 25 '16 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.