J1939 - Intro, Data Logger & Mining Guide
J1939 - Intro, Data Logger & Mining Guide
J1939 - Intro, Data Logger & Mining Guide
com
Last modified: April 20, 2022
Table of Contents
What is J1939?
In short, SAE J1939 is a set of standards that define how ECUs communicate via the CAN bus in heavy-duty vehicles.
As explained in our CAN bus intro, most vehicles today use the Controller Area Network (CAN) for ECU communication.
However, CAN bus only provides a "basis" for communication (like a telephone) - not a "language" for conversation.
In most heavy-duty vehicles, this language is the SAE J1939 standard defined by the Society of Automotive Engineers
(SAE). In more technical terms, J1939 provides a higher layer protocol (HLP) based on CAN as the "physical layer".
What does that mean, though?
In simple terms, J1939 offers a standardized method for communication across ECUs, or in other words:
J1939 provides a common language across manufacturers.
In contrast, e.g. cars use proprietary OEM specific protocols.
Heavy-duty vehicles (e.g. trucks and buses) is one of the most well-known applications. However, several other key
industries leverage SAE J1939 today either directly or via derived standards (e.g. ISO 11783, MilCAN, NMEA 2000, FMS):
● Foresting machines (e.g. delimbers, forwarders, skidders)
● Mining vehicles (e.g. bulldozers, draglines, excavators, …)
● Military vehicles (e.g. tanks, transport vehicles, …)
● Agriculture (e.g. tractors, harvesters, …)
● Construction (e.g. mobile hydraulics, cranes, …)
● Fire & Rescue (e.g. ambulances, fire trucks, …)
● Other (e.g. ships, pumping, e-buses, power generation, ...)
Future
With the rise of heavy-duty telematics, J1939 will increasingly play a role in the market for connected vehicles. In turn, this
will increase the need for secure J1939 IoT loggers. In parallel, OEMs will increasingly shift from Classical CAN to CAN FD
as part of the transition to J1939 with flexible data-rate. In turn, this will increase the need for J1939 FD data loggers.
"The market for in-vehicle connectivity - the hardware and services bringing all kinds of new functionality to drivers and
fleet owners - is expected to reach EUR 120 billion by 2020."
- Boston Consulting Group, Connected Vehicles and the Road to Revenue
250K baud rate & Broadcast + on-request PGN identifiers & SPN Multibyte variables &
29-bit extended ID data parameters Multi-packets
The J1939 baud rate is Most J1939 messages are J1939 messages are Multibyte variables are sent
typically 250K (though broadcast on the CAN-bus, identified by 18-bit least significant byte first
recently with support for though some data is only Parameter Group Numbers (Intel byte order). PGNs
500K) - and the identifier is available by requesting the (PGN), while J1939 signals with up to 1785 bytes are
extended 29-bit (CAN 2.0B) data via the CAN bus are called Suspect supported via J1939
Parameter Numbers (SPN) transport protocol
Additional J1939 characteristics
● Reserved: J1939 includes a large range of standard PGNs, though PGNs 00FF00 through 00FFFF are reserved
for proprietary use
● Special Values: A data byte of 0xFF (255) reflects N/A data, while 0xFE (254) reflects an error
● J1939 address claim: The SAE J1939 standard defines a procedure for assigning source addresses to J1939
ECUs after network initialization via an 8-bit address in a dynamic way
J1939 is based on CAN, which provides the basic "physical layer" and "data link layer", the lowest layers in the OSI
model. Basically, CAN allows the communication of small packets on the CAN bus, but not a lot more than that. Here,
J1939 serves as a higher layer protocol on top, enabling more complex communication.
A higher layer protocol enables communication across the large complex networks of e.g. vehicle manufacturers.
For example, the SAE J1939 protocol specifies how to handle "multi-packet messages", i.e. when data larger than 8
bytes needs to be transferred. Similarly, it specifies how data is to be converted into human-readable data.
It does so by providing a family of standards. For example, J1939-71 is a document detailing the information required
to convert a large set of cross-manufacturer standardized J1939 messages into human-readable data (more on this
below). Many other CAN based higher layer protocols exist, e.g. CANopen, DeviceNet, Unified Diagnostic Services.
These typically offer some level of standardization within their respective industries - though all of them can be
extended by manufacturers.
In comparison, the aforementioned passenger cars have unique standards per manufacturer. In other words, you can
use the same J1939 database file to convert e.g. engine speed across two trucks from different manufacturers - but you
cannot e.g. read the data from an Audi A4 using the same IDs & scaling parameters as for a Peugeot 207.
The J1939 connector (9-pin)
The J1939-13 standard specifies the 'off-board diagnostic connector' - also known as the J1939 connector or 9-pin deutsch
connector. This is a standardized method for interfacing with the J1939 network of most heavy duty vehicles - see the
illustration for the J1939 connector pinout.
Note that the J1939 deutsch connector comes in two variants: The original black connector (type 1) and the newer green
connector (type 2), which started getting rolled out around 2013-14.
As evident, the J1939 deutsch connector provides access to the J1939 network through pins C (CAN high) and D (CAN
low). This makes it easy to interface with the J1939 network across most heavy duty vehicles.
In some cases, however, you may also be able to access a secondary J1939 network through pins F and G or pins H and
J (with H being CAN H and J being CAN L).
Many of today's heavy duty vehicles have 2 or more parallel CAN bus networks and in some cases at least two of these
will be available through the same J1939 connector. This also means that you will not necessarily have gained access to
all the available J1939 data if you've only attempted to interface through the 'standard' pins C and D.
While the J1939 deutsch connector is the most common way to interface with the J1939 network of heavy duty vehicles,
other connectors of course exist. Below are some examples:
● J1939 Backbone Connector: This 3-pin deutsch connector provides pins for CAN H/L a CAN shield (no
power/ground)
● CAT connector: The Caterpillar industrial connector is a grey 9-pin deutsch connector. However, the pin-out
differs from the J1939 connector (A: Power, B: Ground, F: CAN L, G: CAN H) and the connector physically blocks
access from standard type 1 and 2 J1939 connectors
● OBD2 type B connector: The type B OBD2 connector (SAE J1962) in heavy duty vehicles sometimes provide
direct access to the J1939 network through pins 6 and 14
● Volvo 2013 OBD2 connector: This variant matches the type B OBD2 connector, but also adds access to the
J1939 high via pin 3 and J1939 low via pin 11
The J1939 PGN comprises an 18-bit subset of the 29-bit extended CAN ID. In simple terms, the PGN serves as a unique
frame identifier within the J1939 standard. For example, you can look this up in the J1939-71 standard documentation,
which lists PGNs/SPNs.
Example: J1939 PGN 61444 (EEC1)
Assume you recorded a J1939 message with HEX ID 0CF00401. Here, the PGN starts at bit 9, with length 18 (indexed from
1). The resulting PGN is 0F004 or in decimal 61444. Looking this up in the SAE J1939-71 documentation, you will find that it
is the "Electronic Engine Controller 1 - EEC1". Further, the document will have details on the PGN including priority,
transmission rate and a list of the associated SPNs - cf. the illustration. For this PGN, there are seven SPNs (e.g. Engine
Speed, RPM), each of which can be looked up in the J1939-71 documentation for further details.
Let's look at the CAN ID to PGN transition in detail. Specifically, the 29 bit CAN ID comprises the Priority (3 bits), the J1939
PGN (18 bits) and the Source Address (8 bits). In turn, the PGN can be split into the Reserved Bit (1 bit), Data Page (1 bit),
PDU format (8 bit) and PDU Specific (8 bit).
The detailed PGN illustration also includes example values for each field in binary, decimal and hexadecimal form.
To learn more about the transition from 29 bit CAN ID to 18 bit J1939 PGN, see also our online CAN ID to J1939 PGN
converter. The converter also includes a full J1939 PGN list for PGNs included in our J1939 DBC file.
Suspect Parameter Number (SPN)
The J1939 SPN serves as the identifier for the CAN signals (parameters) contained in the databytes. SPNs are grouped by
PGNs and can be described in terms of their bit start position, bit length, scale, offset and unit - information required to
extract and scale the SPN data to physical values.
0CF00401 FF FF FF 68 13 FF FF FF
By converting the CAN ID to the J1939 PGN you identify that this is the PGN 61444 from before. From the J1939-71
document, you observe that one of the SPNs within this PGN is Engine Speed (SPN 190) with details as in the
illustration below.
Using these details, it is possible to extract the Engine Speed physical value data e.g. for plot purposes. To do so, note
from the SPN info that the relevant data is in bytes 4 and 5, i.e. the HEX data bytes 68 and 13. Taking the decimal form
of the HEX value 1368 (Intel byte order), we get 4968 in decimal. To arrive at the RPM, we conduct a scaling of this value
using the offset 0 and the scale 0.125 RPM/bit. The physical value (aka scaled engineering value) is 621 RPM.
Note how some data bytes in the above are FF or 255 decimal, i.e. not available. While the PGN may theoretically
support SPNs in this range, the FF padding means that this particular application does not support these parameters.
In practice, you will not ‘PDF-lookup’ rules for J1939 data - instead, this info is stored in a CAN database file (DBC).
A J1939 DBC file can be used to decode data across most heavy-duty vehicles. For example, raw J1939 data can be
recorded with a CAN bus data logger and analyzed in a CAN software tool that supports DBC conversion (e.g. asammdf).
This will typically result in a conversion of 40-60% of the vehicle data - with the rest being OEM specific proprietary data
that requires reverse engineering.
Data from the CANedge is recorded in a standardized binary format, MDF4, which can be converted to any file format
via our MDF4 converters (e.g. to CSV, ASC, TRC, ...). Below is a CSV version of the raw J1939 frames. Notice that the CAN
IDs and data bytes are in hexadecimal format:
TimestampEpoch;BusChannel;ID;IDE;DLC;DataLength;Dir;EDL;BRS;DataBytes
1578922367.777150;1;14FEF131;1;8;8;0;0;0;CFFFFFF300FFFF30
1578922367.777750;1;10F01A01;1;8;8;0;0;0;2448FFFFFFFFFFFF
1578922367.778300;1;CF00400;1;8;8;0;0;0;107D82BD1200F482
1578922367.778900;1;14FF0121;1;8;8;0;0;0;FFFFFFFFFFFFFCFF
1578922367.779500;1;18F0000F;1;8;8;0;0;0;007DFFFF0F7DFFFF
1578922367.780050;1;18FFA03D;1;8;8;0;0;0;2228240019001AFF
1578922367.780600;1;10FCFD01;1;8;8;0;0;0;FFFFFFFF1623FFFF
1578922367.781200;1;18FD9401;1;8;8;0;0;0;A835FFFFA9168F03
1578922367.781750;1;18FDA101;1;8;8;0;0;0;1224FFFFFFFF00FF
1578922367.782350;1;18F00E3D;1;8;8;0;0;0;741DFFFFFFFFFFFF
1578922367.782950;1;18F00F3D;1;8;8;0;0;0;B40FFFFFFFFFFFFF
1578922367.783500;1;10FDA301;1;8;8;0;0;0;FFFFFFFFFFFFFFFF
…
You can optionally download full raw J1939 MDF4 samples from the CANedge2 in our intro docs. The sample data also
includes a demo J1939 DBC so that you can replicate the conversion steps via asammdf.
Once the raw J1939 data is decoded and exported, the result is timeseries data with parameters like oil temperature,
engine speed, GPS, fuel rate and speed:
timestamps,ActualEnginePercentTorque,EngineSpeed,EngineCoolantTemperature,EngineOilTemperature1,EngineFu
elRate,EngineTotalIdleHours,FuelLevel1,Latitude,Longitude,WheelBasedVehicleSpeed
2020-01-13 16:00:13.259449959+01:00,0,1520.13,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.268850088+01:00,0,1522.88,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.270649910+01:00,0,1523.34,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.271549940+01:00,0,1523.58,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.278949976+01:00,0,1525.5,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.289050102+01:00,0,1527.88,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.299000025+01:00,0,1528.13,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.308300018+01:00,0,1526.86,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.309099913+01:00,0,1526.75,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.317199945+01:00,0,1526.45,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
…
For more on logging J1939 data, see our J1939 data logger and mining telematics articles.
The CANedge lets you easily record J1939 data to an 8-32 GB SD card. Simply connect it to e.g. a truck to start logging -
and decode the data via free software/APIs and our J1939 DBC. Learn more.
To send a J1939 request via the CAN bus, a special 'request message' is used (PGN 59904), which is the only J1939
message with only 3 bytes of data. It has priority 6, a variable transmit rate and can either be sent as a global or specific
address request. The data bytes 1-3 should contain the requested PGN (Intel byte order). Examples of requested J1939
messages include the diagnostic messages (e.g. J1939 DM2).
A CAN bus data logger like the CANedge can be set up to send J1939 request messages - see e.g. our CANedge Intro for
a detailed step-by-step guide.
In some cases, it is required that the J1939 analyzer is "physically" contactless, e.g. via a CANcrocodile adapter. In other
cases, it is sufficient that the J1939 logger operates in "configurable" silent mode. The latter makes it easier to perform
ad hoc requests for J1939 fault codes, either via a manual configuration update or via an over-the-air update for the
CANedge2.
Below we outline how the J1939 transport protocol works, a practical J1939 TP data example and how to decode
multi-frame J1939 messages via DBC files:
How does the J1939 transport protocol work?
The J1939 protocol specifies how to deconstruct, transfer and reassemble packets across multiple frames - a process
referred to as the J1939 Transport Protocol (see J1939-21). Two types of the J1939 TP exist:
For example, a transmitting ECU may send an initial BAM packet to set up a data transfer. The BAM specifies the PGN
identifier for the multi-packet message as well as the number of data bytes and packets to be sent. It is then followed
by up to 255 packets/frames of data. Each of the 255 packets use the first data byte to specify the sequence number (1
up to 255), followed by 7 bytes of data. The max number of bytes per multi-packet message is therefore 7 bytes x 255 =
1785 bytes.
The final packet contains at least one byte of data, followed by unused bytes set to FF. In the BAM type scenario, the
time between messages is 50-200 ms. In post processing, a conversion software tool can reassemble the multiple
entries of 7 data bytes into a single payload and handle it according to the multi-packet PGN and SPN specifications as
found in e.g. a J1939 DBC file.
Decoding J1939 multiframe data is more complex than decoding standard J1939 frames. To understand why, consider the
below example of a J1939 transport protocol response, recorded with the CANedge2:
TimestampEpoch;BusChannel;ID;IDE;DLC;DataLength;Dir;EDL;BRS;DataBytes
1605078459.438750;1;1CECFF00;1;8;8;0;0;0;20270006FFE3FE00
1605078459.498750;1;1CEBFF00;1;8;8;0;0;0;013011B2A041B240
1605078459.559750;1;1CEBFF00;1;8;8;0;0;0;021FB2102CB2603B
1605078459.618750;1;1CEBFF00;1;8;8;0;0;0;03B230430000D309
1605078459.678750;1;1CEBFF00;1;8;8;0;0;0;04C0441E37967DE1
1605078459.738750;1;1CEBFF00;1;8;8;0;0;0;05E02E7B02FFFF80
1605078459.799850;1;1CEBFF00;1;8;8;0;0;0;06E0FFFFFFFFFFFF
Below we break down the J1939 transport protocol example with focus on the data byte interpretation:
● Identify the BAM frame, indicating a new sequence being initiated (via the PGN 60416)
● Extract the J1939 PGN from bytes 6-8 of the BAM payload to use as the identifier of the new frame
● Construct the new data payload by concatenating bytes 2-8 of the data transfer frames (i.e. excl. the 1st byte)
Above, the last 3 bytes of the BAM equal E3FE00. When reordered, these equal the PGN FEE3 aka Engine Configuration 1
(EC1). Further, the payload is found by combining the the first 39 bytes across the 6 data transfer packets/frames.
Note: The last 3 data payload bytes in this practical example happen to be FF, yet we still include these in the payload as
the BAM message specifies the data length to be 39. The final 3 FF bytes in the 6th packet are unused.
With the method explained above, we have created a 'constructed' J1939 data frame with a data length exceeding 8
bytes. This frame can be decoded using a J1939 DBC file, just like a regular J1939 data frame. For the PGN EC1, the
J1939 DBC specifies a data length of 40 with signals defined for the full payload.
As such, once the J1939 software/API has reconstructed the multiframe response into a single J1939 frame, the DBC
decoding can be done as usual. One minor tweak is that most J1939 DBC files expects that the raw log file of J1939 data
will contain 29-bit CAN IDs (not 18-bit J1939 PGNs). As such, if the software embeds the reconstructed J1939 TP frame
in the original raw data, it may need to convert the extracted J1939 PGN into a 29-bit CAN ID first. You can also see our
J1939 google sheet, which breaks down how a J1939 PGN can be converted to a 29-bit CAN ID.
Standalone J1939 data loggers with SD cards are ideal for logging data from e.g. vehicle fleets over weeks or months. A
WiFi J1939 logger also enables telematics use cases. In contrast, a J1939 USB-PC interface requires a PC to stream data
from the CAN bus in real-time. This is e.g. useful for diagnostic purposes - or analysing physical events. The CLX000
enables both modes of operation, while the CANedge2 is perfect for telematics.
To connect your CAN analyzer to a J1939 asset (e.g. a truck) you can typically use the 9-pin J1939 connector. We offer a
DB9-J1939 adapter which fits the 9-pin deutsch connector found in many heavy duty vehicles. Alternatively, you may
prefer to connect your CAN logger directly to the CAN bus via e.g. a CANCrocodile. This method uses induction to
record data silently without cutting any CAN wiring.
For vehicle fleet management & telematics you will typically upload the data via either WiFi or 3G/4G. The CANedge2
lets you transfer data by connecting to a WiFi access point - which can both be a WLAN router or a 3G/4G hotspot. If
you need data from a truck on-the-road, you can install the CANedge2 and use it to power a 3G/4G USB hotspot. The
benefit to this is that you'll have continuous access to the device - unless it is out-of-coverage. However, in cases where
data only needs to be periodically uploaded an alternative can be to upload data via WLAN routers when the vehicles
visit e.g. specific areas (garages, repair shops etc) - letting you reduce data transfer costs.
When logging or streaming J1939 data, software for post processing is key. In particular, the software should support
DBC-based J1939 conversion to allow easy conversion to human-readable data. The free supporting softwares/APIs for
our CAN loggers support this. For USB streaming, our free Wireshark plugin enables live DBC conversion. Further, we
offer a digital download J1939 DBC file in collaboration with SAE.
Some J1939 PGNs are only available on-request, meaning that you need to "poll" the CAN bus to log these. The
CANedge and CLX000 are able to transmit custom CAN messages, which can be used to send periodic PGN requests.
Note that this is not possible in "silent mode" (i.e. it is not possible if the logger is connected via e.g. a CANCrocodile).
To optimize your J1939 data logging, a number of advanced configurations can be helpful. In particular, the CANedge
advanced filters and sampling rate options help optimize the amount of data logged - key for e.g. minimizing cellular
bandwidth usage. Other options include silent mode and cyclical logging, with the latter enabling the logger to always
prioritize the latest data (useful in e.g. blackbox logging).
Since J1939 is standardized, it is critical to encrypt your data 'at rest' (e.g. on an SD card) and 'in transit' (during upload).
Not doing so exposes your data processing to various security risks, incl. GDPR/CCPA fines and loss of confidentiality
and data integrity. For details on securing your J1939 data logging, see our intro to secure CAN logging.
J1939 Data Logger - Easy Truck Fleet Telematics
In this intro you'll learn the top 4 benefits of truck telematics - and how to get started.
You'll also see how the CANedge2 enables modern J1939 telematics - with zero monthly fees and 100% free software/APIs
(incl. customizable dashboards).
If you're new to vehicle telematics and fleet management, consider below basic definition:
The goal of vehicle telematics is to collect vehicle, driver & environmental data
— and use the data to optimize fleet operations
Vehicle telematics is commonly used in heavy-duty fleet management (trucks, buses, construction, mining, ...),
prototype field testing and light trucks/service cars (delivery vans, postal services, police cars, taxis, ...). It is used by
both vehicle OEMs (Original Equipment Manufacturers) and end users (e.g. construction site managers, fleet managers
etc.). In some cases, the telematics system is owned by the OEM and served to an end user in the aftermarket - while in
other cases, an aftermarket user may set up their own fleet management system.
A Telematics Control Unit (TCU) is a telematics device installed in a vehicle, facilitating the tracking of data from the
vehicle.
Today, most truck fleet management involves simple TCUs that communicate GPS data to enable route optimization
and planning. However, these basic telematics systems typically do not collect data from the vehicle sensors (i.e. J1939
data). Advanced telematics control units like the CANedge2 may support the following:
● CAN bus data logging: Some TCUs support logging of CAN bus data, incl. SAE J1939 and FMS
● Edge processing: A TCU may need to perform 'edge processing' of the data (filtering, compression, triggers, ...)
● Memory: Some TCUs have memory buffers (e.g. an SD card) to buffer data in zones with no connectivity
● OTA updates: To enable fleet management at scale, over-the-air updates of firmware/configs are required
● Data requests: It may be key to enable requesting of data via CAN, e.g. to log diagnostic trouble codes (DTC)
● Modularity: Often it is necessary to add external sensors (e.g. GPS/IMU, ...) to the TCU
● Security: Modern TCUs should support secure telematics, incl. TLS data transfer, data encryption etc
If you have e.g. 200+ telematics control units deployed in the field, you'll need a way to monitor, track and manage all
of them.
● Enable users to login to the server endpoint where the telematics data is stored
● Enable easy access to the data uploaded by each telematics control unit
● Provide an interface for updating the configuration/firmware of each TCU
● Provide a status dashboard to monitor devices, SD storage%, data uploads etc
CANcloud is a 100% free browser based open source telematics platform designed for use with the CANedge2. It
enables the above features, while also offering full customization (incl. easy company branding).
What is a telematics dashboard?
There are different end users of vehicle telematics data, including below examples:
● Fleet managers: Plan routes, reduce truck fuel costs, schedule maintenance etc.
● OEM engineers: Use high-frequency CAN/J1939 data for e.g. R&D and diagnostics
● Researchers: Collect data on e.g. driving behavior, costs, emissions etc.
A common way to present data is through browser based telematics dashboards. Here, the data is typically processed
on a backend server and pushed to a database. As an example, the CANedge2 data can be easily integrated with the
open source Grafana dashboard tool. This enables 100% free and customizable telematics dashboards to visualize e.g.
truck fleet telematics data.
For more in-depth data analysis (e.g. diagnostics), specialized CAN software/APIs may be required. Here, the CANedge2
enables easy analysis via free software like the asammdf GUI - or via popular tools like Vector CANalyzer and PCAN
Explorer using simple data converters. Further, the Python API enables large-scale automated data processing (incl. e.g.
CAN bus DBC decoding via J1939 DBC files).
Top 4 benefits of J1939 fleet telematics
Truck telematics & vehicle fleet management is increasingly used by e.g. heavy-duty vehicle OEMs - below we list the top
benefits.
Fewer breakdowns & Reduced fuel & Simpler compliance & Faster
better diagnostics maintenance costs dispute handling time-to-market
J1939 data can help Fuel cost can comprise up By auto-collecting your Real field usage data is
minimize breakdowns and to 50% of heavy duty fleet vehicle data you'll simplify extremely valuable to OEM
downtime via predictive costs. Here, J1939 data can compliance (e.g. emissions, development teams - e.g.
maintenance - as well as be used in optimizing ELD/HOS). For OEMs, this for equipment debugging
diagnose rare issues, routes, idling, driver also enables data-based or fleet prototype testing
on-site or remotely behavior and fuel theft dispute processing
PLUG & PLAY PRO SPECS SO SMALL SECURE WIFI MANAGE FLEET OPEN SOURCE
Log data Extractable 8-32 Only 8 x 5 x 2 Push data via Easily update Free open source
out-the-box. GB SD. CM. 100G. WiFi access config/FW software/APIs.
Standalone - no 2xCAN/LIN. CAN Aluminium points (incl. over-the-air Easily DBC
PC required. FD. Zero data enclosure. 4 3G/4G) to your across entire decode data.
Power via CAN / loss. 50 µs RTC LEDs. Modular server. Enterprise fleet. Auto-sync Browser
OBD2 connector resolution. (add e.g. grade security RTC via WiFi dashboards
GPS-to-CAN)
How does vehicle telematics work with the CANedge2?
Traditional telematics may be a good fit for some - but it comes with a number of downsides:
● Low specs: Most telematics dongles do not enable the type of pro spec logging required by vehicle OEMs
● High costs: You pay a monthly fee which quickly adds up - incl. potential vendor lock-ins
● Complex: One-size-fits-all platforms typically entail significant complexity - and may not fit your use case
● No data ownership: Your sensitive data is sent to the telematics provider's server, not your own
● Poor security: Many telematics solutions struggle with security issues, leaks and GDPR/CCPA challenges
● Pro specs: The CANedge2 is a unique combo of pro specs CAN logging - with the convenience of telematics
● Zero fees: You only pay for the hardware - all software/APIs are 100% free and open source
● Simple-to-use: The device is simple-to-use and lets you start small, gradually scaling to more advanced setups
● Zero lock-in: Data is uploaded to your own server via your WiFi access points - meaning no vendor lock-in
● Interoperable: data & config files use standard formats (MDF4, JSON), easing integration
● Secure: The device can encrypt data & passwords on the SD (e.g. for GDPR compliance) - and upload via HTTPS
WiFi telematics vs 3G/4G cellular transfer
Generally, the CANedge2 is often deployed by automotive OEM engineers for use in prototype fleet testing. Here, there
is often a need to transfer huge amounts of data - but not necessarily in near real-time. For this type of use case, the
unique combination of a pro specs CAN logger with SD card and WiFi telematics capability is ideal.
When selecting the right CAN logger for your use case, it's important to consider whether you need WiFi access or not.
The CANedge2 is ideal for J1939 telematics, but for some use cases you may prefer the CANedge1 J1939 logger. The
CANedge1 is identical to the CANedge2, except that it does not offer WiFi data transfer. The CANedge1 may be
sufficient if you e.g. need to only collect data rarely, from few vehicles - or on an event-based basis. For example, some
end users deploy the CANedge1 as a J1939 blackbox logger and only collect data if an issue occurs. If you're in doubt
which option you need, please contact us.
Some J1939 applications have built-in GPS data that is communicated via the CAN bus - and which can be decoded
using a standard J1939 DBC. However, other vehicles do not broadcast this information by default. If you need to add
GPS and/or 3D inertial sensor data to your J1939 telematics data, you can use our CANmod.gps GPS-to-CAN module
with a 3D IMU. This module can be used as a plug & play add-on for the CANedge.
You can also combine your J1939 data with GPS/IMU data
by using the CANmod.gps as an add-on.
You can also download the free software and try out the
process of decoding the raw J1939 data with our J1939
DBC demo.
Most commercial trucks and heavy duty vehicles use the SAE J1939 protocol (or the derived FMS standard) for the
vehicle CAN bus sensor network. A CAN logger can therefore serve as a truck data logger, assuming it can record the
raw CAN bus data (which will in this case be equivalent to J1939 data).
In contrast to e.g. passenger cars, this means that the method for converting data to physical values (aka
human-readable form) is standardized across many brands, years and manufacturers. From a vehicle data logging
perspective, this allows end users (e.g. fleet managers or operators) to get data for their fleet management systems,
without having access to the proprietary conversion rules owned by the OEMs (original equipment manufacturers).
To decode raw J1939 data from e.g. a truck or tractor, you'll need a database of conversion rules. Typically, a J1939 DBC
file is used for this purpose. A J1939 DBC file takes outset in the official SAE J1939 standards, which provide conversion
info for a large share of the data that is potentially available in a given vehicle.
However, most vehicles also use a number of proprietary parameters - this data still conforms to the J1939 standard,
but you'll need to reverse engineer the CAN data to identify how to interpret these specific parameters.
With that in mind, we've listed below some examples of data parameters that may be available in J1939 heavy duty
vehicles:
If you've logged a range of CAN IDs from your truck, bus, harvester or other J1939/FMS vehicle, you can identify what
J1939 PGNs are contained in your data. To do so, use our CAN ID to PGN converter or learn more on our J1939 DBC
page.
Yes, the CANedge2 is basically a CAN bus data logger - meaning that it can record raw CAN data from any high speed
CAN bus (ISO 11898-2) application. This includes practically all vehicles, including car fleets like taxis, police cars,
ambulances etc.
Typically you'll then log OBD2 data, which can be seen as the equivalent to J1939 data - but for passenger cars.
If you're interested in car fleet management, check out our OBD2 data logger article.
The ELD mandate is a US regulation that specifies that operators of certain commercial vehicles will need to use
electronic logging devices (ELD) to monitor driver activity. This can include operational data like hours of service (HOS).
It basically replaces the requirement for paper log books.
The CANedge can be a simple low cost method for storing these logs by recording the relevant J1939 parameters -
either to the SD card, or alternatively transferring the data to your own server for automated compliance. To learn
more, contact us.
Mining Telematics - J1939 IIoT Logger
In this practical step-by-step guide you'll learn how to use the CANedge2 IIoT J1939 logger in underground mining
telematics - from raw data to mining dashboards.
Utilization & payload Fuel cost reductions Predictive maintenance Blackbox & diagnostics
How many tons are How much fuel is used per Is a vehicle going to break Does a vehicle exhibit a
moved? By which vehicles? vehicle? By driver? By down next week? Mining rare issue? Is monitoring
When? How many hours period? By correlated vehicle downtime is required for insurance /
did a vehicle run/idle last parameter? Monitoring fuel extremely costly - and even compliance? By logging
month? Knowing the at scale can vastly improve very basic predictive data continuously, you'll be
"pulse" of your machines your TCO (total cost of maintenance can make a able to review past events
and the usage efficiency is ownership) - and help huge difference to ensuring and diagnose issues much
vital to a variety of use prevent e.g. fuel theft your asset health faster
cases
Engine Hours, Engine Speed, Fuel Rate, Fuel Level, Tire Diagnostic Trouble Codes Multiple J1939 parameters
Payload Weight Sensor Pressure, Vehicle Speed (DTCs), Temperatures with focus on e.g. outliers
Status
The challenge with traditional mining telematics
Most companies attempt to harvest these benefits - but many fail due to below challenges.
Start simple Flexible WiFi You own the data Top security
It is extremely simple to The SD card & WiFi combo You have 100% control of Finally, the security is
get started. Add to that the is ideal for underground your data: The device lets designed to be
benefit of zero mining. The device logs you customize your data best-in-class: Data can be
software/API costs, zero data to the extractable SD flow - e.g. message filters, encrypted on the SD and
monthly fees and zero card when offline, data compression, triggers sent securely via HTTPS to
vendor lock-in. Together, ensuring zero data loss. and transmit lists. Further, your server. Your
these factors let you scale When in range of one of you can easily process WiFi/server details can be
up both your volume and 1-5 WiFi access points incoming data via open encrypted on the SD card.
solution scope at your own (WLAN routers or 3G/4G APIs - e.g. to create mining Further, configuraton &
pace. At the same time, hotspots), the device will fleet dashboards or digitally signed firmware
the versatile configuration auto-push the data to your transform it into relational can be securely updated
and open software/API server. This allows for databases (SQL, Historian, over-the-air across your
suite allows the device to effective telematics - even PostScript) for your BI fleet.
scale with your ambitions. with sporadic coverage. system. All data is owned
by you.
For simplicity, we recommend the below kit for your initial tests. This will let you easily log raw CAN data from your
vehicle, assuming there is a matching J1939 deutsch connector available. If not, see below for details on alternative
adapters.
For some use cases you may simply need to log CAN data to an SD card. For example, if your aim is to only analyze data
if an issue occurs or as part of dispute handling, a CANedge1 dual CAN logger will suffice. The CANedge1 is identical to
the CANedge2, except that it does not support WiFi. If you're in doubt which option is best for your use case, contact
us.
J1939 deutsch 9-pin Caterpillar 9-pin Other types Raw wiring harness
In most heavy duty In CAT engines, you'll often Other connectors exist - In some cases, you may
vehicles, you'll find a J1939 see a 9-pin connector with here we recommend to prefer to log data directly
deutsch 9-pin connector in a different pin-out. In this identify the pin-out (e.g. from the CAN wiring
the cabin (sometimes case, contact us as we may from a spec PDF or via an harness. In this case you
behind a panel). If you see be able to supply a custom oscilloscope). After that, can use a CANCrocodile
this, check if the relevant DB9-Deutsch-9-pin (CAT) you can find an open-wire adapter to snap onto the
pins are available (power, cable for this. You will not matching adapter and CAN L/H.
ground, CAN low, CAN be able to use a DB9-J1939 create your own custom
high). If so, you'll be able adapter in a CAT engine. cable. Optionally use our
to use a DB9-J1939 DB9-generic adapter.
adapter.
In some heavy duty mining vehicles like dump trucks, excavators, drillers etc you may have two separate CAN buses,
each containing separate data parameters. The CANedge2 lets you record data from both CAN buses with synced
timestamps into the same log file. In this case, you'll of course need a suitable adapter cable for both CAN buses.
Note that often one CAN bus will be J1939 based, while the other may e.g. be CANopen based - with the latter being
predominantly proprietary in nature. In such cases, we would recommend to start with the J1939 data and review
whether data from the 2nd CAN bus is needed - and if so, reverse engineer the relevant parameters.
Another typical use case for multiple CAN buses is logging J1939 vehicle data via one channel - while using the 2nd
channel of the CANedge for additional sensor modules. Examples include tire pressure sensors, payload sensors,
hydraulic sensors, analogue/digital inputs, GPS & accelerometer, fuel sensors etc. Assuming you have sensor modules
that broadcast their data via CAN, you can combine one or more of these into a single CAN bus and feed the data into
the CANedge2 channel 2 port.
The CANedge2 can connect to your existing WiFi access points in e.g. an underground mine to upload data.
However, it is also possible for the device to upload data via a cellular hotspot like our USB 3G/4G WiFi router. This can
be useful if you e.g. wish to upload data from a truck when it resurfaces from your mine and regains cellular
connectivity. In this case, consider adding a DB9-USB adapter and 3G/4G USB hotspot to your initial pilot bundle.
In some cases, you may need to add GPS tracking as part of your mining fleet management system and mining
dashboards. There are different ways of achieving this. Some mining trucks have a built-in GPS module that broadcasts
GPS data via the CAN bus. If the data is encoded as per the J1939 protocol standard, you can easily decode this GPS
data to human-readable form and use it along with other CAN signals. If no built-in GPS is available, you can use the
CANmod.gps GPS-to-CAN module with the CANedge.
#3 Log your first data
To log raw vehicle data to the SD card, simply connect the CANedge to your vehicle and later disconnect it.
If you convert the data into CSV using our MDF4 converters the result may look as below raw J1939 truck data:
TimestampEpoch;BusChannel;ID;IDE;DLC;DataLength;Dir;EDL;BRS;DataBytes
1578922367.777150;1;14FEF131;1;8;8;0;0;0;CFFFFFF300FFFF30
1578922367.777750;1;10F01A01;1;8;8;0;0;0;2448FFFFFFFFFFFF
1578922367.778300;1;CF00400;1;8;8;0;0;0;107D82BD1200F482
1578922367.778900;1;14FF0121;1;8;8;0;0;0;FFFFFFFFFFFFFCFF
…
Once set up, you can test if your device correctly uploads data by logging into your server via our free open source
CANcloud tool. CANcloud is basically a 'cockpit' for your deployed devices.
We provide step-by-step guidance in our get started docs. For example, you can set up an AWS S3 cloud server in <5 min.
You then simply add your WiFi/server details to your configuration file - and you're ready.
For ad hoc analysis (e.g. diagnostics), you can load the log files in e.g. asammdf to DBC convert and plot it. Or, you can
convert the data to e.g. Vector ASC and analyze it via CANalyzer.
You can also automate your processing via the free CAN bus Python API.
A DBC file is a database of conversion rules - it's a text file that details how to go from raw CAN data to human-readable
data.
Most mining vehicles are heavy duty and communicate data via the J1939 protocol. As such, you can use a J1939 DBC
file to convert the raw data into human-readable form. It differs by vehicle model/year to what extent the data can be
converted - we typically see 30-60% conversion in most cases. As such, we also offer that you can send us a raw log file
that we can convert on your behalf to serve as a "demo" of what the DBC would yield in your use case before you
purchase it. Of course, if you're the OEM of the vehicle in question, you'll most often have access to the full DBC file
covering 100% of the data.
timestamps,ActualEnginePercentTorque,EngineSpeed,EngineCoolantTemperature,EngineOilTemperature1,EngineFuelRate,EngineTota
lIdleHours,FuelLevel1,Latitude,Longitude,WheelBasedVehicleSpeed
2020-01-13 16:00:13.259449959+01:00,0,1520.13,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.268850088+01:00,0,1522.88,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.270649910+01:00,0,1523.34,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.271549940+01:00,0,1523.58,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.278949976+01:00,0,1525.5,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.289050102+01:00,0,1527.88,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.299000025+01:00,0,1528.13,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.308300018+01:00,0,1526.86,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.309099913+01:00,0,1526.75,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.317199945+01:00,0,1526.45,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.319149971+01:00,0,1526.38,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.320349932+01:00,0,1526.15,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.23
2020-01-13 16:00:13.326800108+01:00,0,1524.93,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.25
2020-01-13 16:00:13.329050064+01:00,0,1524.5,92,106,3.8,1868.3,52,40.6440124,-76.1223603,86.26
You can see our dashboard intro on how to set up free, customizable Grafana dashboards. You can also set up your own
BI integrations using the API or e.g. use other dashboard tools like Dash by Plotly - you decide.
Thank you for reading our guide - we hope you found it useful!
CSS Electronics | DK36711949 | Soeren Frichs Vej 38K, 8230 Aabyhoej, Denmark