Data logging

Message filtering on the CAN bus

Every node on a CAN bus hears every frame, including your data logger. Acceptance filters let it keep the messages you care about and ignore the rest, which saves storage and makes the analysis easier.

7 min read2 demosUpdated 2026
ID + range
two ways to filter
~50%
smaller log in the example
J1939
filtering supported
DBC
or configure by hand
The short answer

A CAN bus is a broadcast: every frame reaches every node, so a data logger left unfiltered records the whole bus and fills its storage fast. A message filter tells the logger which identifiers to keep and which to drop, using acceptance filters built into the interface. You can pick a single ID, a range of IDs through a mask, names from a DBC file or J1939 parameter groups. The result is a smaller log focused on the data you actually need.

Four ways to choose what to log
MethodHow it worksGood for
Single IDAccept one identifier and drop the restone message of interest
ID rangeAccept a block of IDs using a maska family of related IDs
DBC fileLoad a database and choose messages by nameworking from a known schema
J1939Filter by parameter group numberheavy-duty networks
The mechanism

How a CAN filter works

CAN has no addressing in the usual sense. A transmitter does not send a frame to a particular node; it puts the frame on the bus and every node receives it. Each node then decides for itself whether the frame is relevant. That keeps the wiring simple, but it means a logger sees everything, useful or not, and unfiltered it will happily fill its card with traffic you never wanted.

An acceptance filter is the firmware in the interface that makes that decision before a frame is stored. It compares each incoming identifier against the rule you have set and keeps only the matches. Set it to a single ID and you log one message. Set it to a range and you log a family of them. Either way the work happens at the point of capture, so the unwanted frames are dropped rather than written and sorted out later.

from the bus 0x100 0x101 0x200 0x301 filter keep 0x101 SD log 0x101 only
The logger sees every identifier on the bus. With the filter set to keep 0x101, only those frames reach the card. The rest are dropped at capture.
Ranges and masks

Filtering a whole family with a mask

Logging a single identifier is easy enough, but often you want a related group: every message from one ECU, say, or a block of addresses. That is what a mask is for. Alongside the filter identifier the interface holds a mask, and the mask decides which bits of the identifier actually have to match.

The rule is simple. Where a mask bit is 1, that bit of an incoming identifier must equal the filter. Where a mask bit is 0, that bit is a do not care and either value is accepted. A mask of all ones therefore means an exact match on one ID. Relax the lowest four bits to zero and you accept a run of sixteen, so a filter of 0x100 with a mask of 0x7F0 logs everything from 0x100 to 0x10F. The same idea, widened or narrowed, covers most filtering you will need. Try it directly below.

Hands on

Build a filter and watch it work

Set a filter identifier and a mask, then read off which of the identifiers on this example bus would be logged and which would be dropped. Start from a preset, then change the mask a bit at a time to see the accepted set grow and shrink.

Acceptance filter playground

Set a filter ID and a mask, then see which identifiers get logged. A mask bit of 1 means that bit must match the filter, 0 means do not care.

0x
0x

Eleven-bit standard identifiers. A frame is logged when (ID AND mask) equals (filter AND mask). Hardware conventions vary, and some controllers invert the mask, so always check your device documentation.

The payoff

Why filtering is worth the setup

The benefit is twofold. You prioritise the data that matters instead of recording everything indiscriminately, and you save storage on the logger, which matters most on long tests or remote installs where you cannot swap a card on a whim. A focused log is also faster to open and easier to read, because you are not scrolling past thousands of frames you never cared about.

The effect is real. In a simple example bus carrying four identifiers, four minutes of unfiltered logging comes to about 1 MB. Narrow the filter to the one identifier that matters and the same four minutes drops to roughly half that. The REXGEN data loggers and Module Analyser software from Influx Technology both support CAN message filters, including J1939, configured either by hand or from a DBC file.

Unfiltered ~1 MB Filtered ~0.5 MB four minutes of the example bus
Filtering to the messages of interest roughly halves the file for the same four-minute capture, and the gain grows on longer runs.
Estimate it

See the saving for yourself

The faster a message repeats, the more of the log it occupies, so dropping a high-rate group you do not need saves far more than dropping a slow one. Switch the groups below on and off to see how the log size follows the frames you choose to keep.

Logging volume estimator

A small example bus with four message groups. Switch off the ones you do not need and watch the log shrink. The unfiltered case is set to the article figure, about 1 MB for four minutes.

Frames kept
161 of 161 /s
Log size, 4 min
~1.00 MB
100% of the unfiltered log

A proportional estimate for illustration. Real sizes depend on frame rates, payload lengths and the file format of the logger.

The principle

Filter at the source. A logger that records only what matters runs longer, fills less and hands you a cleaner dataset to work from.

Common questions

Message filtering FAQ

What is a CAN message filter?

It is a rule in the interface firmware that decides which frames to keep based on their identifier. Because every node on a CAN bus receives every frame, a filter lets a data logger record only the identifiers you care about and drop the rest at the point of capture.

How does an acceptance filter and mask work?

The filter holds an identifier and a mask. Where a mask bit is 1, that bit of an incoming identifier must match the filter. Where it is 0, that bit is ignored. A frame is accepted when the identifier, masked, equals the filter, masked, which lets you match one ID or a whole range.

How do I filter a range of CAN IDs?

Relax the lower bits of the mask. A filter of 0x100 with a mask of 0x7F0 accepts every identifier from 0x100 to 0x10F, because the lowest four bits are treated as do not care. Widen or narrow the mask to cover a larger or smaller block.

Does filtering really save much storage?

Yes. In the article example, four minutes of unfiltered logging is about 1 MB, and filtering to a single identifier roughly halves it. The saving scales with the run, and high-rate messages dominate the file, so dropping a fast group you do not need saves the most.

Can I filter using a DBC file or J1939?

Yes. The REXGEN data loggers and Module Analyser software from Influx Technology support CAN message filters including J1939, and filters can be configured by hand or loaded from a DBC file so you select messages by name rather than raw identifier.

Written by the engineering team at Influx Technology. Filter behaviour and mask conventions vary by device, so confirm against your hardware documentation.

Log only what matters

Capture the right CAN data, not all of it

The data loggers from Influx Technology, including the REXGEN and REBEL ranges, support CAN message filtering by identifier, range, DBC or J1939, so your logs stay focused and your storage lasts. REXDESK and DIALOG help you set the filters and review the result.