Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up speed CAN bus #2

Open
nickbeljaev opened this issue Jan 4, 2020 · 1 comment
Open

Set up speed CAN bus #2

nickbeljaev opened this issue Jan 4, 2020 · 1 comment

Comments

@nickbeljaev
Copy link

Hi, I'm have very useful file USB (Serial port) to CAN protocol defines.pdf, but I can't find how set speed CAN bus from ttyUSB?

@nopnop2002
Copy link

  • Set and Start(Auto set bps)
    c= 0xAA
    c= 0x55
    c= 0x12 -> Auto set bps
    c= 0x03 -> CAN bps
    c= 0x02 -> Type (1:Standard Frame/2:Extended Frame)
    c= 0x00 -> Filter ID & 0xFF
    c= 0x01 -> (Filter ID >> 8) & 0xFF
    c= 0x00 -> (Filter ID >> 16) & 0xFF
    c= 0x10 -> (Filter ID >> 24 & 0xFF
    c= 0x08 -> Mask ID & 0xFF
    c= 0x01 -> (Mask ID >> 8) & 0xFF
    c= 0x00 -> (Mask ID >> 16) & 0xFF
    c= 0x10 -> (Mask ID >> 24) & 0xFF
    c= 0x03 -> Mode(0:Normal/1:Loop back/2:Silent/3:Loop back + silent)
    c= 0x00 -> Only send once
    c= 0x00
    c= 0x00
    c= 0x00
    c= 0x00
    c= 0x44 -> CRC

CAN bps:
1000K:1
800K:2
500K:3
400K:4
250K:5
200K:6
125K:7
100K:8
50K:9
20K:A
10K:B
5K:C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants