Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1s 接 MCP2515 CAN芯片本地收发测试

    MR Series
    d1s mcp2515 canbus can
    2
    4
    1703
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tigger
      tigger LV 7 last edited by

      43d895a1-9546-4c0d-ae97-99850ffb379b-image.png

      1 Reply Last reply Reply Quote Share 0
      • tigger
        tigger LV 7 last edited by tigger

        ip link set can0 down
        
        ip link set can0 type can loopback on
        
        ip link set can0 up type can bitrate 1000000
        
        candump any,0:0,#FFFFFFFF > /tmp/a.txt &
        
        cansend can0 123#deadbeef
        
        cansend can0 123#AAAAAA
        
        cansend can0 123#CCCCCC
        

        参考: https://wiki.rdu.im/_pages/Application-Notes/Software/can-bus-in-linux.html

        1 Reply Last reply Reply Quote Share 0
        • tigger
          tigger LV 7 last edited by

          记得勾选 iproute2,这里面的ip命令才支持can bus,

          busybox自带的ip不行。

          C 1 Reply Last reply Reply Quote Share 0
          • C
            cwj1986521 LV 5 @tigger last edited by

            @tigger 你好 问下你用的是Tina_linux的么?我也在搞can iproute2 编译后系统不认

            1 Reply Last reply Reply Quote Share 0
            • 1 / 1
            • First post
              Last post

            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策