Freematics OBD-II UART Adapter V2.1 comes with CAN sniffing features. We are now publishing the AT commands for this purpose. The adapter’s Arduino library has also added APIs for doing CAN sniffing from Arduino sketch.

The CAN sniffing related commands are as following.

ATCF <ABC> or <AA> <BB> <CC>

  • Function: set CAN message header filter for CAN sniffing, <ABC> for CAN 11-bit, <AA> <BB> <CC> for CAN 29-bit
  • Example: ATCF 7E8

ATCM <AA> <BB> <CC> <DD>

  • Function: set CAN message filtering bit mask (32-bit)
  • Example: ATCM FFFFFFFE (ignore the lowest bit when comparing with header filter number)

ATM1

  • Start sniffing mode

ATM0

  • Stop sniffing mode

Example

Typical sniffing on 11-bit 500kbps CAN bus

  1. ATSP6
  2. ATCF 700
  3. ATCM FFFFFF00
  4. ATM1

Typical sniffing on 29-bit 500kbps CAN bus

  1. ATSP7
  2. ATCF 18DBF133
  3. ATCM FF000000
  4. ATM1