Getting started with SocketCAN (can-utils) | ESP32 | Kali Linux Vmware Installation

Поділитися
Вставка
  • Опубліковано 24 лют 2023
  • In my previous video on how to set up a CAN bus on a breadboard, we used a simple Arduino CAN driver to set up two ESP32 microcontrollers as CAN nodes.
    In this video, I use the CAN TX ESP32 node and connect it to my computer instead, via a USB to CAN converter board. Then I show how to install a Kali VM on Windows, install "can-utils", set up a CAN socket interface to our CAN converter, and read incoming packets from the ESP32 microcontroller using candump.
    Links:
    [USB to CAN Converter]
    www.amazon.com/dp/B07P9JGXXB?...
    [Arduino CAN driver]
    circuitstate.com/tutorials/wh...
    [Vmware]
    www.vmware.com/products/works...
    [Kali Linux]
    www.kali.org/get-kali/#kali-v...
    Bash Commands:
    sudo apt-get install can-utils
    ip link ls
    sudo ip link set up can0 type can bitrate 500000
    candump can0
  • Наука та технологія

КОМЕНТАРІ • 21

  • @aurothschild
    @aurothschild Рік тому +2

    Inspiring content. One day I will be an EV engineer!

  • @kme8134
    @kme8134 5 місяців тому +1

    You are pure gangsta. Thank you, very helpful.

  • @yvanpearson7024
    @yvanpearson7024 10 місяців тому +1

    This video was huge for me

  • @bArda26
    @bArda26 8 місяців тому

    Great video thank you!

  • @mathewsjacob
    @mathewsjacob 4 місяці тому

    Great video, Thank you.

  • @ingenuus2
    @ingenuus2 Рік тому

    I think you know a lot about the Canbus. When will there be a working library for the Canbus for the ESP32S2, or does it already exist for Arduino?

    • @EV_engineer
      @EV_engineer  Рік тому

      Hi, there is a library! Checkout my video here: ua-cam.com/video/ZH_CCs12ptg/v-deo.html

  • @madusankaduwage8917
    @madusankaduwage8917 6 місяців тому

    Hi . Is any usb to can device support socketCan ?? Thanks

  • @user-rk9zx3lt8k
    @user-rk9zx3lt8k 10 місяців тому

    the best can video in the earth. could you help create deeper tech video about how to parse can _info in different can node. thanks!!!

    • @EV_engineer
      @EV_engineer  10 місяців тому

      Thanks! I’ll consider the video idea

  • @Roottech25
    @Roottech25 5 місяців тому

    can you write code that tells the device on a can network to do something? that what is called bidirectionall communication in can bus. . a practical use is to send a message to a ECU in a car to actuate a selenoidse or turn on a fan.... it can' be that difficult

  • @user-rk9zx3lt8k
    @user-rk9zx3lt8k 10 місяців тому

    Hi, in your Arduino code, I found you mention RTR packet (can.beginpacket(0x12,3,True), is it the bool True to active RTR, also could you explain why use RTR, and why in linux, i will get remote request?? thanks!!

    • @EV_engineer
      @EV_engineer  9 місяців тому

      Hi, I got this example sketch from this article: www.circuitstate.com/tutorials/what-is-can-bus-how-to-use-can-interface-with-esp32-and-arduino/#Remote_Transmission_Request_RTR
      This part addresses your question: "Just after sending a normal data frame, we will send an RTR packet requesting 3 bytes of data. beginPacket() function has a few overloads and we can send additional parameters as we need. For an RTR message, the third parameter should be true."
      As for why use an RTR, well, to request data from other nodes. Every node on the CAN bus that is not explicitly filtering messages from the source node will see this RTR request and can respond accordingly.

  • @bennguyen1313
    @bennguyen1313 9 місяців тому

    Any thoughts on CanOpen?
    I bought a couple USB-Peak-Can controller, which I understand is supported by SocketCAN.. but now I'm looking to see how to display data from a CanOpen device.
    I've seen some devices that use the CanOpen protocol
    (Guangcheng Technology thermocouple 8-way input KJST, GCAN-4128 , SM1810C CAN, CANOpen Stepper Controller PMC007, CANOPEN core board USBCANIO),
    but I'd like to first see if I can test using have one PCan device acting as the client (running for example CanOpen Magic), and another PCAN device running a CanOpen simulator (ex. canslave_sim or CANopen for Python). Assuming of course, I download/make a Device configuration files (DSF) or EDS file.

    • @EV_engineer
      @EV_engineer  9 місяців тому

      I haven’t used CanOpen before, but seems like an interesting video ;). I‘ve worked with ISO-TP, which provides network layer support over CAN.

    • @bennguyen1313
      @bennguyen1313 6 місяців тому

      @@EV_engineer
      I'd like to try SocketCan but don't have a OpenMoko USB2CAN V3.3... I have a PEAK PCAN usb adapter. Do you think the VM/socketcan will work the Peak hardware?
      BTW, I tried booting a Kali Linux *LIVE* dvd I couldn't get can can-utils installed:
      apt-get install can-utils (unable to locate package error despite having internet connection)
      git clone htt...//gh.../can-utils (.git)
      cd can-utils
      make
      sudo make install
      Not sure why Kali doesn't automatically come with it.. perhaps there's a distro that comes with SocketCan already installed?

  • @gobrbrr3558
    @gobrbrr3558 Рік тому

    Can I use this type of connection to communicate with a Linux virtual machine running QML interface?

    • @EV_engineer
      @EV_engineer  Рік тому

      I'm not familiar with QML, but the interface here is just CAN over USB.

  • @jamgood96
    @jamgood96 Рік тому

    Any ideas on why, when I plug the device in and verify it shows up using `lsusb`, that it does not show up under `ip link ls`?

    • @EV_engineer
      @EV_engineer  Рік тому

      Are CAN HI/LO connected properly to the converter?

  • @eriklethdanielsen3968
    @eriklethdanielsen3968 Місяць тому

    why do you still run windows, windows is dead i have run Debian KDE sinse 2019, it works fine for ewrything also pcb design and writing software