2

Trying to replay CAN codes for 2018 Dodge Promaster using can-utils. From what I've read they use an 11 bit CAN ID. However when I use:

candump -L can0 > can.log

The log shows 29 bit ID's

(1519238827.107818) can0 04394100#00000000F0006000
(1519238827.122395) can0 063D4000#4652000080FE0000
(1519238827.126761) can0 04394000#000000AB
(1519238827.147822) can0 03029000#0000000000000000
(1519238827.152676) can0 06254000#00FFFF00FFFFFF00
(1519238827.157823) can0 03029100#0000000000000000
(1519238827.207842) can0 04394100#00000000F0006000
(1519238827.222727) can0 06314000#0000000000000000
(1519238827.226953) can0 04394000#000000AB
(1519238827.244633) can0 0E094000#001A00000409
(1519238827.247843) can0 03029000#0000000000000000
(1519238827.249614) can0 0E094003#001A
(1519238827.251375) can0 0E094020#000A
(1519238827.253121) can0 0E09400A#001A
(1519238827.254935) can0 0621400A#0000
(1519238827.257940) can0 03029100#0000000000000000
(1519238827.262128) can0 06314020#100000BC

I'm thinking this is why replaying with canplayer is not working. Does anyone know how I can force candump to use 11 bit ID's?

physiii
  • 209
  • 3
  • 12

2 Answers2

1

You cannot force candump into using 11 bits IDs as the frame format is defined by a bit in the arbitration field (cf. Wikipedia - CAN bus, "Data frame" sub-section). After a quick look at the article you linked, I saw that the car model is from the 2000s and your car is from 2018. Many changes have probably been made in the meantime.

In conclusion: your problem isn't one, it's your article that is too old and doesn't match your car.

Benoît
  • 406
  • 3
  • 11
1

You can use candump command with filter option as per below:

  Up to 16 CAN interfaces with optional filter sets can be specified
    on the commandline in the form: <ifname>[,filter]*

    Comma separated filters can be specified for each given CAN interface:
     <can_id>:<can_mask> (matches when <received_can_id> & mask == can_id & mask)
     <can_id>~<can_mask> (matches when <received_can_id> & mask != can_id & mask)
     #<error_mask>       (set error frame filter, see include/linux/can/error.h)
     [j|J]               (join the given CAN filters - logical AND semantic)

    CAN IDs, masks and data content are given and expected in hexadecimal values.
    When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.
    Without any given filter all data frames are received ('0:0' default filter).

    Use interface name 'any' to receive from all CAN interfaces.

    Examples:
    candump -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8
    candump -l any,0~0,#FFFFFFFF    (log only error frames but no(!) data frames)
    candump -l any,0:0,#FFFFFFFF    (log error frames and also all data frames)
    candump vcan2,92345678:DFFFFFFF (match only for extended CAN ID 12345678)
    candump vcan2,123:7FF (matches CAN ID 123 - including EFF and RTR frames)
    candump vcan2,123:C00007FF (matches CAN ID 123 - only SFF and non-RTR frames)
krnk
  • 11
  • 4