The EV Engineer
The EV Engineer
  • 29
  • 210 008
Linux Kernel Programming: Driver Modification Tutorial
In this video, we dive into modifying and compiling a Linux kernel driver, focusing on the pcnet32 driver. The tutorial covers key aspects such as ABI compatibility and module loading. This video is the first of many aimed at advancing practical knowledge in kernel development.
Commands:
# Step 1: Install Necessary Tools
sudo apt update
sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev
# Step 2: Install the Kernel Source Package
cd /usr/src/
sudo apt install linux-source-{version} # replace version
sudo tar -xjf linux-source-{version}.tar.bz2 # replace version
cd linux-source-{version} # replace version
sudo chown -R {user}:{user} /usr/src/linux-source-{version} # replace version
# Step 3: Modify the pcnet driver
nvim drivers/net/ethernet/amd/pcnet32.c
# Step 4: Configure the Kernel
cp /boot/config-$(uname -r) .config
make oldconfig
# Step 5: Compile
make modules_prepare
cd drivers/net/ethernet/amd
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
# Step 6: Unload and Reload new module
lsmod | grep pcnet32
sudo rmmod pcnet32
lsmod | grep pcnet32
sudo insmod ./pcnet32.ko
lsmod | grep pcnet32
sudo dmesg | less
Переглядів: 1 772

Відео

CAN-utils over VCAN | Virtual CAN Interface Tutorial | Linux SocketCAN
Переглядів 1,3 тис.4 місяці тому
A focused tutorial on using CAN-Utils with virtual CAN interfaces in Linux. This guide is ideal for those looking to simulate CAN networks without physical hardware, offering practical steps and insights for effective network testing and simulation.
SocketCAN Tutorial: Writing a Custom candump Linux Tool
Переглядів 1,5 тис.4 місяці тому
Dive into Linux network programming to write a custom CAN logger. This detailed video guide is designed for firmware engineers, system developers, and network programming enthusiasts eager to deepen their understanding of CAN (Controller Area Network) interfaces using the SocketCAN library in a Linux environment.
TCP Client on ESP32 with ESP-IDF programmed in C: Step-by-Step Tutorial
Переглядів 4,3 тис.9 місяців тому
Learn how to build a TCP Client on the ESP32 with ESP-IDF, all programmed in C, starting from scratch. This step-by-step tutorial guides you through setting up your environment, creating the project, and writing the necessary code for TCP communication. Perfect for anyone looking to explore networking on embedded systems. Check the links below for additional resources and tools. GitHub Reposito...
Bare metal GPIO driver for ESP32 | Toggling an LED
Переглядів 4,8 тис.10 місяців тому
In this video, I write my own GPIO driver for the ESP32 microcontroller, instead of using the provided ESP-IDF headers. All memory addresses are pulled directly from the Technical Reference Manual. [Technical Reference Manual] www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf [Source Code] github.com/JoshMarangoni/bare-metal-gpio-toggle-esp32
UART Echo Task on ESP32 using ESP-IDF
Переглядів 2,5 тис.10 місяців тому
In this video, I dive into the ESP-IDF to write a UART echo RTOS task for the ESP-32 microcontroller. [ESP-IDF Programming Guide] docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/uart.html
Remote Control Robot with ChatGPT and Embedded Web Server on ESP32
Переглядів 1,1 тис.Рік тому
In this video, I go through the design of my remote-controlled robot. First I show the robot's motor control using my laptop's WASD keys, which send HTTP requests to a web server running on my robot's ESP32. The commands are sent via a Python console, which I wrote partially with assistance from ChatGPT. I also explain the embedded web server running on the ESP32 microcontroller. Lastly, I demo...
Three Node CAN System on a Breadboard with ESP32 and Arduino Microcontrollers
Переглядів 4,8 тис.Рік тому
In this video, I create a CAN bus on a breadboard with 3 devices. Two 3.3V ESP32s with TJA1050 CAN transceivers and a 5V Arduino Uno with MCP2515 CAN SPI module. This video is the summation of some of my previous videos, if you'd like to learn more about this system in detail, check out: [CAN Bus on a Breadboard with two ESP32s] ua-cam.com/video/ZH_CCs12ptg/v-deo.html [MCP2515 CAN Bus Module wi...
CAN Bus signals on a breadboard with ESP32 microcontroller and Oscilloscope
Переглядів 7 тис.Рік тому
In this video, I use a pocket-sized oscilloscope to measure CAN signals on a breadboard. The system consists of two ESP32 microcontrollers, each connected to a TJA1050 CAN transceiver. I use an open-source Arduino library for CAN communication. The primary objective of this experiment is to determine if using 5V CAN transceivers with 3.3V microcontrollers is safe. As a bonus, we get to see the ...
MCP2515 CAN Bus Module Tutorial with Arduino and Linux
Переглядів 17 тис.Рік тому
In this video, I demonstrate how to use the MCP2515 CAN Bus Module to transmit data from an Arduino that's connected over SPI to a CAN receiver connected to my Linux virtual machine. [MCP2515 CAN Bus Module] www.amazon.com/dp/B07J9KZ4L4?psc=1&ref=ppx_yo2ov_dt_b_product_details [Arduino MCP2515 CAN library] github.com/autowp/arduino-mcp2515 [USB CAN Converter Module] www.amazon.com/dp/B07P9JGXXB...
Hacking my Roommates Car - Linux CAN Bus sniffing
Переглядів 19 тис.Рік тому
Hacking my Roommates Car - Linux CAN Bus sniffing
Getting started with SocketCAN (can-utils) | ESP32 | Kali Linux Vmware Installation
Переглядів 11 тис.Рік тому
Getting started with SocketCAN (can-utils) | ESP32 | Kali Linux Vmware Installation
CAN Protocol Explained | Controller Area Network
Переглядів 59 тис.Рік тому
CAN Protocol Explained | Controller Area Network
Making a CAN Bus on a breadboard with two ESP32 microcontrollers!
Переглядів 38 тис.Рік тому
Making a CAN Bus on a breadboard with two ESP32 microcontrollers!
Serial communication protocols - what are the differences?
Переглядів 2,5 тис.Рік тому
Serial communication protocols - what are the differences?
AVR ATMEGA328P ICSP Algorithm Explained
Переглядів 870Рік тому
AVR ATMEGA328P ICSP Algorithm Explained
Flash AVR microcontroller over ICSP (SPI) with an Arduino
Переглядів 1,4 тис.Рік тому
Flash AVR microcontroller over ICSP (SPI) with an Arduino
Assembling and Testing ESP32 H Bridge PCB
Переглядів 1,1 тис.Рік тому
Assembling and Testing ESP32 H Bridge PCB
Generating Gerber files in KiCad for JLCPCB
Переглядів 13 тис.Рік тому
Generating Gerber files in KiCad for JLCPCB
Making an H Bridge PCB in KiCad from scratch!
Переглядів 3,3 тис.Рік тому
Making an H Bridge PCB in KiCad from scratch!
Making an H bridge Schematic in KiCad
Переглядів 4,4 тис.Рік тому
Making an H bridge Schematic in KiCad
H bridge Circuit Theory - 2 Wire Input Design
Переглядів 1,2 тис.Рік тому
H bridge Circuit Theory - 2 Wire Input Design
Getting Started with ESP-IDF on Windows
Переглядів 3,4 тис.Рік тому
Getting Started with ESP-IDF on Windows

КОМЕНТАРІ

  • @zaca211
    @zaca211 День тому

    Holy crap that was simple. I just switched over the Espressif framework from Arduino and I've been messing around with their GPIO driver for a couple of hours now. Considering all I needed to do was toggle the internal LED, this saves so much hassle.

  • @Roottech25
    @Roottech25 2 дні тому

    good and quick tutorial.... can you control a real can network let's say activating a selenoid in the car to see if it is working.

  • @abdalrhmanahmed3187
    @abdalrhmanahmed3187 2 дні тому

    im using esp 32 LILYGO can rs485 is no working

  • @chrisman2598
    @chrisman2598 5 днів тому

    Why use a vm ?

  • @electrical_engineer1
    @electrical_engineer1 6 днів тому

    Sir, electric vehicles charger not on without bms battery. Now sir how to on charger without bms battery? Please guide

  • @Bravo_L
    @Bravo_L 7 днів тому

    Thanks again for this brother. Lots of help❤

  • @tarikulislamtarif1122
    @tarikulislamtarif1122 7 днів тому

    Hey,my android wifi doesn't work after flashing compiled kernel,now I am trying to build module named wlan.ko to make wifi working,but how do I make it,is it similar to this tutorial?

  • @kawtarbelhinani1496
    @kawtarbelhinani1496 8 днів тому

    thanks for you video i watched can connection btw esp and esp32 and also between stm32 and STM32 THAT U just posted can u do between stm32 AND esp32 with can protocol I NEED IT FOR MY project

  • @eriklethdanielsen3968
    @eriklethdanielsen3968 9 днів тому

    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

  • @renansaraivadossantos2896
    @renansaraivadossantos2896 12 днів тому

    How are you reading the transmitted data? Are you using openmoko, is it a software for linux?

  • @TheWohnJick
    @TheWohnJick 17 днів тому

    Awesome tutorial 🫶

  • @petersuvara
    @petersuvara 19 днів тому

    Easy as. Does Canplayer come with Kali Linux?

  • @TheTruth-fb4be
    @TheTruth-fb4be 26 днів тому

    To reprogram a keyfob, do you need the can bus to be communicating?

  • @Rkemobilitywork
    @Rkemobilitywork 27 днів тому

    Hello, need your help , for project, I am from India, pls update me fast

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

    If that's the case then how do I convert it for that architecture or do I have to recompile it or something?

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

    Thank you boss! I'm 1st year out of school and I'm making a can bus reader and I'm going to shoot data to a screen and display rpms and other vehicle data. I will use esp32 as well as a stm32. I want to try using this chip as well as trying the onboard controllers and i will do what you did in the esp32 video and use just transceiver(the stm32 nucleo has built in "bxCan"). I need to buy you a coffee or something!!!!!! very helpful as well as the article you shared from circuit state saved my life!

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

    Why would you use this instead of printf?

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

    G'day Josh, Am having trouble compiling with this error: f:\Workbench\Arduino\libraries\CAN\src\MCP2515.cpp: In member function 'virtual void MCP2515Class::onReceive(void (*)(int))': f:\Workbench\Arduino\libraries\CAN\src\MCP2515.cpp:270:9: error: 'class SPIClass' has no member named 'usingInterrupt' 270 | SPI.usingInterrupt(digitalPinToInterrupt(_intPin)); | ^~~~~~~~~~~~~~ Any help would be very much appreciated Craig

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

    Thank you for the clear explanation. I am really interested in these stuff. My background is mostly on mechanical engineering, and I wonder if learning communication protocols would be so useful for my career as well. Could you tell me how deep I should go into the topic to use it in my future?

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

    ua-cam.com/video/EsKpbdRWXZM/v-deo.html

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

    very simple. nice!!

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

    Hello @EV_engineer, thanks a lot for this video, but I USB-CAN-A with me instead of the device that you have used, could you please let me know how to do the same project with my device, thanks in advance :)

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

    Ahahah nice video but wow that is a big fuss in the era of iot 😅

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

    Very helpful video ❤️❤️. Please make a video about UDS protocol...

  • @user-xs7fz5ym3x
    @user-xs7fz5ym3x 2 місяці тому

    well explained thank you

  • @farhadkamali2321
    @farhadkamali2321 2 місяці тому

    HI I did all the steps but I don't get any information from obd2 port. The car is Hyundai Azera 2019. please guide me. Thank you.

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

      Hello newer hyundai models have "CAN bus gateway" and it blocks the data from OBD port you need to directly splice wires to the required module that you want to read also can i know what are you tring to do ? im curious because i have 2016 azera

  • @02__76
    @02__76 2 місяці тому

    I can send the data but I can not receive the data help me pls

  • @skanderbelhaj2278
    @skanderbelhaj2278 2 місяці тому

    man writing code like its native language

  • @VivoJefindo-id4cj
    @VivoJefindo-id4cj 2 місяці тому

    I will try this metode for kobelco excavator.. I hope succes

  • @umbra3324
    @umbra3324 2 місяці тому

    Can you activate a snap to the grid in KiCAD for components? Maybe I wasn’t seeing it in the short

  • @FreestylerAlbert
    @FreestylerAlbert 2 місяці тому

    tricky question, is ths possible?? : So car ECU ----> Arduino Nano33 ----> MCP2515 ------(can I connect the processed data back to the Arduino Nano 33??)---> And I want to push all processed data via Wifi ---> my phone Is this possible? :D (background: I want to process the ECU logs form my car, and have a realtime view on oil temp and things, I have a CANbus translator cript from the ECU already. And have a phone app which can process the CANbus data.) Million thanks!!!!

  • @francescovergentini3244
    @francescovergentini3244 2 місяці тому

    Thanks for the very interesting video. Can you share which Can transiver you used for the ESP32 which is 3.3V device?

  • @yasserarafath9567
    @yasserarafath9567 2 місяці тому

    Hey Josh! Can you put up a video tutorial on cannelloni? What i was trying is to transfer CAN message from the vehicle over IP and receive it in some scan tool. Then send the diagnostics signal back to the vehicle from the scan tool. Remote diagnostics stuff. But I was able to receive the CAN message over IP only on a virtual CAN interface and not on a physical CAN interface (i.e : the scan tool) Also i used 2 raspberry pi with a CAN hat to check if it works. Would love to see you put up a tutorial on cannelloni

  • @naveens1379
    @naveens1379 2 місяці тому

    for some reason, when i use cansniffer -c can0 command, i don't see the can messages being dumped. is there something that i'm doing wrong? perhaps wrong bitrate or could you give me any other suggestions to troubleshoot my issue? Thanks a lot in advance

  • @adiityamishra
    @adiityamishra 2 місяці тому

    Is it possible to decode can data if we just have the can frame id? If yes can you please guide. Cool video btw

  • @VivoJefindo-id4cj
    @VivoJefindo-id4cj 2 місяці тому

    Best tutorial brother.. ❤

  • @sadf1416
    @sadf1416 3 місяці тому

    Do you have to reset the whole client every time? Seems like a waste of cpu cycles?

  • @redcloud4741
    @redcloud4741 3 місяці тому

    thats so sick

  • @naveenraju.s6111
    @naveenraju.s6111 3 місяці тому

    good

  • @alexclarosfernandez8467
    @alexclarosfernandez8467 3 місяці тому

    Your videos are great!!! Thanx a lot for your time and effort!!!

  • @grahambrown5874
    @grahambrown5874 3 місяці тому

    This video serves as an excellent introduction to the fundamental aspects of the CAN Bus setup. I'm eager to learn more so I can gain a deeper understanding of the communication system within my Ducati. I presume that if there's a need to continuously transmit dynamic data, such as throttle position codes, there must be a method to relay this information to the microcontroller without requiring a flash and reset of the device. In my scenario, the constantly changing throttle position codes would be transmitted over the CAN Bus to the Engine Control Unit (ECU) to regulate the engine's power output.

    • @hiperformance71
      @hiperformance71 3 місяці тому

      Why you want to transmit to the ECU? Usually, this is a data wich is transmitted by the engine ECU over CAN Bus, you can read the CAN traffic and maybe datalogging it on an SD card or send to a Display. In you case, the TPS position is hardwired to the ECU, readed the analog signals (more than 1 signal in case of multiple Throttle bodies independently controlled with TBW system).

  • @turboimport95
    @turboimport95 3 місяці тому

    Can you do a bare metal driver on a mcu that uses the i2c protocol and flashes a bin file to another mcu flash memory/eeprom over i2c?🙏 I see a lot of videos explaining the timing diagrams, but not the code written and explained how to actually get it working. your explanations are great and easy to follow. I dont want to just use library's etc and rather learn from the ground up.

  • @turboimport95
    @turboimport95 3 місяці тому

    Man this was dope, explanation was great. Most people just blow right over stuff like this like its nothing.

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

    Please make a video about AUTOSAR tools.

    • @EV_engineer
      @EV_engineer 3 місяці тому

      I’ll consider it :) personally I prefer focusing on the fundamentals, writing my own drivers and applications. I’ve yet to use this proprietary software.

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

    Great video, Thank you.

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

    Thank you, how would the receiver be programmed to receive data from several independent sensors?

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

    subscribed. Please make a video on mosfets, it is very tough to understand. Also can protocol related programming development only debugging and diagnosing is available in online.

    • @EV_engineer
      @EV_engineer 3 місяці тому

      Take a look at one my earliest videos about H-Bridge circuit theory. I explain MOSFETS in the context of motor drivers there. And I plan on diving even deeper into CAN applications and drivers.

  • @hi-ccowboy7983
    @hi-ccowboy7983 4 місяці тому

    Do Teslas have the equivalent of an ODB-II port? I know there are videos that show how to extract the data, but it required a dongle and some effort to install it. I'm trying to see how they're able to leave it off if it's a US Federal requirement.