Need For Speed Porsche Unleashed Intro

0 views
Skip to first unread message

Aureo Harvey

unread,
Aug 3, 2024, 2:40:03 PM8/3/24
to viacichisleu

In physical terms, all ECUs are connected on a two-wire bus consisting of a twisted pair: CAN high and CAN low. The wires are often color coded: CAN high is yellow (like the sun), CAN low is green (like the grass).

Electronic Control Units (ECUs) are components that control certain functionality - e.g. the engine control unit, transmission, brakes, steering, temperatures etc. A modern car can easily have 70+ ECUs - each sharing information with other ECUs on the bus.

Any ECU on the CAN bus can prepare and broadcast information (e.g. sensor data). The broadcast data is accepted by all other ECUs on the network - and each ECU can then check the data and decide whether to receive or ignore it.

It should be noted that the transition from Classical CAN towards e.g. CAN FD, CAN XL or Automotive Ethernet is in practice going to be slow. In our own experience across 5,000+ customers, less than 0.1% of use cases involve CAN FD as of 2024 and 0% involve CAN XL (which is not yet deployed in the field as of 2024).

CAN FD was touted as a clear successor to Classical CAN back in 2016 by e.g. CAN in Automation: "The first cars using CAN FD will appear in 2019/2020 and CAN FD will replace step-by-step Classical CAN". While CAN FD certainly exists in the field today, we are skeptical as to whether it will replace Classical CAN at all.

Automotive Ethernet clearly already plays a major role in various applications (in particular in frontier OEM R&D), but we have yet to see a significant impact of this on the dominance of Classical CAN in vehicles on-the-road.

In more technical terms, the controller area network is described by a data link layer and physical layer. For high-speed CAN, ISO 11898-1 describes the data link layer, while ISO 11898-2 describes the physical layer.

Below is a standard CAN data frame with 11 bits identifier (CAN 2.0A), which is the type used in most cars. The extended 29-bit identifier frame (CAN 2.0B) is identical except the longer ID. It is e.g. used in the J1939 protocol for heavy-duty vehicles.

The CAN frame has to satisfy a number of properties to be valid. If an erroneous CAN frame is transmitted, CAN nodes will automatically detect this and take action accordingly. This is referred to as CAN bus error handling, in which CAN nodes keep track of their own 'CAN error counters' and change state (active, passive, bus off) depending on their counters. The ability of problematic CAN nodes to transmit data is thus gracefully reduced to avoid further CAN errors and bus jamming. For details, see our intro to CAN bus error handling.

As a lower-layer protocol, CAN provides a basis for communication - but not much more. For example, the CAN standard does not specify how to handle messages larger than 8 bytes - or how to decode the raw data.

In this context, CAN bus defines the physical requirements (like vocal chords and the ability to make sounds) and basic building blocks like letters in the alphabet and grammar. In comparison, higher-layer protocols reflect different languages like German or English, using these basics to build meaningful words and sentences.

If your goal is to log data from your car, you will most likely need the OBD2 adapter. This lets you request OBD2 data from most non-EV cars after 2008 and usually get some responses such as RPM, speed, fuel level etc. If your car is an EV, you may be able to perform UDS requests using the OBD2 adapter. Similarly, if you are looking to reverse engineer proprietary CAN data, you can use the OBD2 adapter if your car provides access through the OBD2 connector to the proprietary CAN data. Note, however, that this is not always the case - in which case you would instead need to use a contactless CAN reader.

In heavy-duty vehicles, the J1939 adapter is the most commonly used. If you can identify a black/green 9-pin deutsch J1939 connector in your vehicle, then you can use this adapter. However, many vehicle brands use other connectors, like the Caterpillar 9-pin connector. Therefore, we generally recommend to get both a J1939 adapter and contactless CAN reader to provide multiple options for connecting to the J1939 data. In some heavy-duty veihcles a single J1939 9-pin connector may provide access to two CAN buses, in which case you can consider the J1939-DB9/DB9 adapter. In some trucks (e.g. from Volvo) you can access J1939 data via the OBD2 connector. Here our OBD2-DB9/DB9 adapter can be useful.

In marine vessels, you will most often encounter the M12 connector that provides access to the NMEA 2000 data of the boat/ship. In some cases, you may be looking to collect data directly from the vessel engines, in which case you may use e.g. the J1939 adapter or DT06 adapter.

In non-automotive industrial machinery, you will often be able to use the M12 adapter. You may also encounter the standard DB9 connector, though you should then ensure that this reflects a connector for CAN access and not e.g. an RS232 interface.

In tractors, you can typically use the J1939 adapter to record J1939 data from the vehicle. However, you may also be interested in collecting ISOBUS data in parallel to the J1939 data. Here, a J1939-DB9/DB9 adapter (H+J) can be used as it provides access to both the tractor's J1939 network and the ISOBUS network related to the tractor implement. Alternatively, you may use the in-cab adapter to access the ISOBUS network.

If you are working in a non-field environment, you may prefer instead to use a generic adapter that provides open-wire connections for quickly connecting to power and an active CAN bus. Similarly, an open wire adapter can be useful as a starting point for creating your own custom adapter cables if no off-the-shelf adapter matches your application.

Regardless of your application, you can in principle always use a contactless CAN reader. As long as you are able to get access to the physical CAN bus wiring harness (CAN high/low), then you can connect a contactless CAN reader to start recording CAN data. This is non-invasive and therefore often used in e.g. large-scale deployments to avoid issues with vehicle warranty. However, contactless CAN readers can be more cumbersome to install as you need to e.g. remove panels or similar to expose the wires - which may be less ideal for quick test deployments. Further, other adapter cables typically provide power/ground from within the same connector (through separate pins from the CAN bus) for easy plug & play installation. With a contactless CAN reader, you need to e.g. use a cigarette-to-DC adapter or similar to provide external power. Finally, contactless CAN readers are 'read-only' - no messages can be transmitted onto the CAN bus. This is often a 'feature' - but it also means that you cannot use such an adapter to e.g. perform requests over the CAN bus. Hence this solution does not allow you to e.g. perform OBD2/UDS requests.

Most modern vehicles do not simply have one CAN bus. There can be other automotive protocols in play like LIN bus, FlexRay and Automotive Ethernet. Further, many vehicles (in particular heavy-duty) will have multiple CAN buses. For example, most commercial trucks have 2 or 3 separate CAN buses, while some mining vehicles may have more than 8 separate CAN buses. This is important to keep in mind when you are trying to collect data: You may need to connect to multiple CAN buses in parallel to collect all the data you need - and the first CAN bus you identify does not necessarily contain the data you need.

Many CAN loggers enable you to log multiple CAN buses in parallel. This is important as you generally need to ensure a high degree of time synchronization in order to be able to perform meaningful analysis across the different networks. As an example, the CANedge by default lets you record 2 x CAN networks in perfect time synchronization. Further, by adding a CANmod.router, a single CANedge can effectively record 5 x CAN channels.

Once you are done recording e.g. a vehicle trip, you can review the resulting log file. In the picture, we show a log file with raw CAN data (J1939) recorded using a CANedge in a heavy-duty truck. Specifically, the data is displayed in a tabular structure in a software tool called asammdf. Notice how every line reflects a timestamped CAN frame incl. a CAN ID and data payload.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages