Linux CAN Bus Setup

Поделиться
HTML-код
  • Опубликовано: 6 дек 2023
  • Setting up a CAN bus adaptor in Linux.
    This is the adaptor I'm using:
    www.aliexpress.com/item/10050...
    This is the software I showed:
    www.savvycan.com/
  • НаукаНаука

Комментарии • 104

  • @JeremyCaissie
    @JeremyCaissie 6 месяцев назад +11

    Damn dude another great video. I just love all these topics you cover. I just got an oscilloscope and CAN adapter so this video couldn't have come at a better time.
    I just love looking at things in wireshark and you always go into the perfect level of detail for my level of background.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +8

      That's because I spy on you and know exactly what you're up to :)

    • @JeremyCaissie
      @JeremyCaissie 6 месяцев назад +2

      I should learn words other than "I just" to start sentences with 😂

  • @ipstacks11
    @ipstacks11 2 дня назад +1

    cansavvy was originally written for/by evtv motor verks. I am guessing Jack financed its development. R.I.P. Jack Rickard. He has awesome content on youtube about using Tesla batteries in solar applications. He was able to close the Tesla car batteries’ contactors using a canbus message.

  • @myselfmeandi
    @myselfmeandi Месяц назад +1

    Awesome, by following along, I made it to Wireshark before something made sweeping changes to my operating system. Now I have some icons, no panels, a black background, and nothing works other than a hard reset. Hey, it's not all that bad. I usually don't make it this far before I've slammed something against the wall or at my truck. Even better, all of this debacle happened indoors. It usually happens in the drive and then I have to deal with neighbors who are afraid of my outbursts from destroying a laptop, drop kicking a goal with an oil filter over their roof, or if I really lose it and start chasing their dogs that they let run freely. At least when my computer came up like it had a stroke, I could only be heard screaming at everything and couldn't be seen losing my cool. So, my plans this weekend have just shifted drastically. Instead of working on my truck, I'll be working on data recovery and laptop repair.
    Thanks. I'm glad I found the weak point with my laptop now instead of when I have time to rebuild it.

  • @yt4krist0f
    @yt4krist0f 6 месяцев назад +3

    Love your content and format: just pure net useful info, nothing else, keep on, thx!

  • @mtnsolutions
    @mtnsolutions 6 месяцев назад +2

    Amazing!! I can’t wait to see more. Thanks so much

  • @lukejay
    @lukejay 6 месяцев назад +2

    Great stuff! I've recently started learning about canbus for some upcoming projects and have struggled to find good dit material online. Looks like this project of yours will help me out a lot. Thank you!

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      I've only just started myself. I think it will be fun, but also a big task of putting a database together from scratch. Hopefully someone's already made a start on a BYD.

  • @blackphidora
    @blackphidora 6 месяцев назад +4

    Something that always surprised me about CAN is that its not seem too much in the hobbyist space. long distance, resilient comms + interchangeable modules for what seems like a small learning curve. Def looking forward to how you discover all of the IDs and functions of the car with it.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +4

      Yeah, and to be honest, I'm surprised that even I have never dug into it before. Probably because I've never been into cars, and I've always associated it mainly with cars, hence I never touched it. I did try to stick that shitty CAN adaptor that I showed at the start of the video into the Powerwall once, but saw nothing. I might have another go at that with the adaptor that I know works.

    • @blackphidora
      @blackphidora 6 месяцев назад +1

      @@TallPaulTech Since your car is quite new. I would keep an eye out if it is using some of the newer extensions, like CAN-FD, or 10BASE-T1S, CAN-FD is common but I have not been able to find a good diy board for 10BT1S. I saw on a reddit post that someone tried on their tesla wall as well. but did not elaborate on why it failed.
      I dove deeper into what CAN Bus was about after realizing boats were using it. NEMA 2000, an boat equipment standard, is an extended superset of J1939. J1939 is an standard for heavy duty vehicles, built on top of standard CAN. But there is currently an industry push to switch to Ethernet and IP even for the intra-car communication. So now there are things like 100base-T1 in cars, 100MB on a single twisted pair, and 10base-t1s, 10MB Multi-dropped Ethernet, wired just like a CAN network, All so that you can reach your ECU using the IP stack with a local ipv6 network. Absolutely nuts.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Feel free to email me. You might come in handy :) I know I have a lot to learn about this, especially with the extensions as you said are coming into it.

    • @5urg3x
      @5urg3x 6 месяцев назад

      Yeah because Ethernet exists lol

    • @jeremysteckling6772
      @jeremysteckling6772 6 месяцев назад

      It's becoming more popular in the 3D printing hobbyist space due to the low amount of wires needing to be ran. Cuts 20+ down to 4.

  • @tararat
    @tararat 6 месяцев назад +1

    On the Xi-express page there are 3 variants of the CAN-USB adaptor. Paul shows us the CANable-Pro Isolated Version (with large ADM3053 isolation chip at CAN end).
    Most of the fleaBay adaptors are the less suitable CANable (non isolated), but the isolated version is available in the less cheaper listings.

  • @johnny_gtr
    @johnny_gtr 6 месяцев назад +1

    Great video. Halfway through, I'm thinking SavvyCAN. I've done some sniffing on my R35 using that to get some CAN frames for my RealDash project. Awesome work.
    P.S. Bring back the suits ;)

  • @An.Individual
    @An.Individual 6 месяцев назад +1

    Interesting video.
    Waiting for the next.

  • @PerScientiaAdAstra
    @PerScientiaAdAstra 5 месяцев назад +1

    Hey Paul. Love your channel. I just wanna mention that you can still use that USB--CAN adapter, the one that shows up as a serial device. Just use it with the can-utils slcan_attach command along with the slcand (daemon) to establish the link. It isn't FD but will do the job nine times out of ten. Keep up the great work. Cheers!

    • @TallPaulTech
      @TallPaulTech  5 месяцев назад +1

      Mate, you mean that little white one I said was shit? I'll give it a go... maybe, because I've got the good ones now. But still, do you know how hard I looked for a way to try and get that thing going?! I'll check those commands one day and put it in my notes if it works. Cheers.

    • @PerScientiaAdAstra
      @PerScientiaAdAstra 5 месяцев назад

      @@TallPaulTech yeah, that little white one that's shit. I got it going through BLE (spoiler alert, it wasn't easy). I love what you've done with the RPi Zero W, using usbip, so much so that I wouldn't recommend going the BLE rout. Again, great job mate. Cheers.

  • @Shocker99
    @Shocker99 4 месяца назад +3

    Your oscilloscope should have a trigger function that stops showing new data when the condition you've set has triggered.

  • @AntonioDellaRovere
    @AntonioDellaRovere 6 месяцев назад +2

    There must be a way to config the acceptance mask in the hardware, so that only messages making it through are reported to wireshark. Great video btw.

  • @minecrafter9099
    @minecrafter9099 6 месяцев назад +3

    Very interesting video.
    To stop the scope when a signal comes you could have used the trigger ;)

  • @SirHackaL0t.
    @SirHackaL0t. 6 месяцев назад +1

    There are adapters specifically for Tesla cars. I had one for 4 years in my Model 3. The 3/Y variants plug in below the rear heater outlet in the centre tunnel. Easy to disconnect the cable and add the CANbus adapter into it. I used a BT adapter and software on my Android phone to get all sorts of info out of the car including headlight temps, battery info etc.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      You mean like the adaptor cable I showed in the video?

  • @Forbidden303
    @Forbidden303 6 месяцев назад +2

    Just in the process of developing an aneurysm via building a Voron 2.4 printer. Bought a CAN tool head which really cut down on wire runs.

  • @TradieTrev
    @TradieTrev 6 месяцев назад +2

    My man! I've been watching heaps about this protocol and you preach the talk my people speak!!

    • @TradieTrev
      @TradieTrev 6 месяцев назад +1

      Hey I got a VoltLog esp32 can bus device if you want to go down the microcontroller route; I don't think that's how you roll though, you just want the RAW DATA lol

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      @@TradieTrev How did you know I like it raw?

    • @KieranMahoney
      @KieranMahoney 6 месяцев назад +1

      @@TallPaulTechBecause he’s been spying on you and knows your every move :)

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      @@KieranMahoney Well he might learn some shit then

  • @johnburgess2084
    @johnburgess2084 6 месяцев назад +1

    Thanks for a great video! It's always good to see what people recommend using (and NOT using). The description does not say whether it supports -FD or not, so I'm thinking probably not. Do you have any suggestions for a good CAN-FD module? That's what my motorcycle (Harley) uses. I can almost decode some frames manually but, including the probably proprietary content, it's hard to tell without a known-good decoder. From what I can tell, I think it does not use the higher data rate capability, but merely uses the longer frames provided by -FD. Any thoughts?

  • @kgottsman
    @kgottsman 6 месяцев назад +1

    I have a Pico oscilloscope which can decode the messages, but its large and clunky with the laptop. I ordered one of these to play with the Pi too. Looking forward to more content once you get your new car.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      I got word today it's ready to pick up. Still have to sort details out first, but won't be long.

  • @wva5089
    @wva5089 6 месяцев назад +1

    I too wanna know more about CAN busses in my car.. specifically to close the contactors in the battery.. Good luck with your endeavors.

  • @kumu2024
    @kumu2024 Месяц назад +1

    Thanks a lot for you video.

  • @chuxxsss
    @chuxxsss 6 месяцев назад +1

    Power wall would be interesting, Paul.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      That's coming, believe me

  • @chrisdixon5241
    @chrisdixon5241 6 месяцев назад +2

    Great video. Looking forward to seeing how you hook this into the new car. I was assuming OBDII but now I'm starting to wonder if that will give you all the CAN access you want based on what you said about the Tesla

    • @obd6HsN
      @obd6HsN 6 месяцев назад +1

      Yes. On VAG cars, for example, the 'K' line is the old bus, but on anything after about year 2000 you get a CAN bus as well. The bus you get connected to has gateways to the other (high speed, or safety-critical) busses as well.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Yeah, I had the same thought. I'll see what the OBDII connector has to offer first of course, then I'll see where I end up after that.

    • @chrisdixon5241
      @chrisdixon5241 6 месяцев назад +1

      @@obd6HsN That was what I thought. You could enumerate the devices and talk to everything via gateway to other systems across OBDII

  • @catalinalb1722
    @catalinalb1722 6 месяцев назад +3

    Hi Paul, how can I assign an IP address to can0 ? I want to run iperf3 between two devices ( Raspberry pi and PCAN Adapter) and see hopefully any speed difference btw. Twisted pair or regular flatcable. Thanks

    • @Dough296
      @Dough296 6 месяцев назад

      can networks just don't have any IP stack

  • @RoryDavidWatts
    @RoryDavidWatts 6 месяцев назад +1

    Really interesting video. I don't know much about what you're doing, but am I correct in assuming you're setting up the CAN Bus in the car so you can send OBD readings over your network directly? Is this useful for troubleshooting a car?

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Sort of. Basically, I just want to see what messages are floating around in it.

  • @alexscarbro796
    @alexscarbro796 6 месяцев назад +1

    The reference ground IS used by the receiver. Without it, the average voltage of the CANH and CANL signals could exceed the “common mode” voltage specification and also the min and max input voltage specification of the receiver.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Fair enough. I'm going to rig something up soonish to a car.

  • @sfoyogi8979
    @sfoyogi8979 6 месяцев назад +1

    how are you adding it to the car? OBD2 interface? i had an android app to track my car data (pro-tool), and some of it helped with maintenance (obviously). wired was the best option, and bluetooth and wifi never worked in my arrangement.. guys at the shop with custom OBD2 always have more data visible.. i only use it for reading data, and rarely send write codes.

  • @mad-kiwi
    @mad-kiwi 6 месяцев назад +1

    great video, look forward to seeing the CAN adapter in action on the car. did you go with isolated or non isolated CAN adapter?

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +3

      Isolated.

    • @obd6HsN
      @obd6HsN 6 месяцев назад

      I chose the isolated version, too, but I haven't taken it apart yet to see whether I can trust that!

  • @gjheydon
    @gjheydon 6 месяцев назад +3

    This looks really cool. Can you give the link to the can bus adapter.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +2

      Oh shit, I forgot to put that in the info. I'll do that now.

  • @MrToufou54
    @MrToufou54 6 месяцев назад +3

    Be careful and take care about timing with WiFi...
    I'm working on canbus for years now and latency induced by wifi is very important, some of canbus modules or product on the bus will maybe not like that

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +3

      Oh, I wouldn't want to trust it to actually send stuff back, but just to get an idea of the rate and value of what's going on from the comfort of a chair in another room. Any real stuff would be done directly, for sure.

  • @Dough296
    @Dough296 6 месяцев назад +1

    For the device showing as a serial interface shouldn't you just flash CandleLight firmware so it shows as a can adapter ?

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +2

      You say 'just' as if that's easier than throwing it at something.

  • @TechScottBrown
    @TechScottBrown 6 месяцев назад +1

    Awesome stuff, so what is the new car?

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +2

      Come on mate... look at the previous video.

    • @TechScottBrown
      @TechScottBrown 6 месяцев назад +1

      @@TallPaulTech see it now. Btw, in case you don’t know, there are lots of canbus libraries (.dbc) on GitHub for Teslas. Many more data parameters there than offered even through the factory service mode+. Savvycan supports .dbc files. Looking forward to seeing what you find on the BYD and your take on the build quality as well. Thanks!

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Yeah I figured there would be .dbc files put together by people over the years, I had just never looked. You don't know of any for the Seal do you?

  • @AnarchyEnsues
    @AnarchyEnsues 6 месяцев назад +1

    Did you see munro interview with elon about the cybertruck? Now using can over Ethernet

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +3

      Why would I watch shit like that?

    • @AnarchyEnsues
      @AnarchyEnsues 6 месяцев назад +1

      Pretty interesting, or maybe not.
      Basically being the first car to have steer by wire and needing a high speed bus to do the processing and to react in high speed for inputs.

    • @TradieTrev
      @TradieTrev 6 месяцев назад +1

      @@TallPaulTech old mate waffles on a bit; No different to yourself. It's hard to make a point of view when you're the engineer IMHO.

  • @thehomelawnaficionado
    @thehomelawnaficionado 2 месяца назад

    Hey @Tall Paul Tech, any update on this? Had a chance to test out what info you can gather from the Seal via CAN?

    • @TallPaulTech
      @TallPaulTech  2 месяца назад

      I got consumed with the stereo install, then put the car back together and kind of finished playing around with it... at least for now.

  • @fir3w4lk3r
    @fir3w4lk3r 6 месяцев назад +1

    Search for DBC files.

  • @hsmptg
    @hsmptg 6 месяцев назад +1

    You bought the version with isolation, right?

  • @renedo5579
    @renedo5579 20 дней назад

    ip link set one-shot on RTNETLINK answers: Operation not supported
    the set up ist working, but I can only send one message cyclic. Your hint set one-shot is not supported on my Ubuntu PC. Does you use a special kernel or driver?

  • @Carl_Georg
    @Carl_Georg 6 месяцев назад +1

    What car are you getting?

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Is this a trick question?

    • @Carl_Georg
      @Carl_Georg 6 месяцев назад +1

      Haha, no. Did I miss something? @@TallPaulTech

  • @myselfmeandi
    @myselfmeandi Месяц назад

    Yeah, I've now done everything I can think of to get my computer to recover and it's gone thanks to a can bus box and crap. Just simple crap. That's an expensive can bus sniffer that I have just purchased for $20. It's going to cost me my information that might be lost (yes I do backups but there always seemS to be some data loss). I doubt I'll be fixing this laptop because of the age, so I'll be spending some unknown sum on a replacement laptop. This is definitely not what I had on my agenda today, this weekend, and what will probably last for a few weeks until I get another computer I'm comfortable with using as I was with that one that has died.

  • @Real_Tim_S
    @Real_Tim_S 6 месяцев назад +2

    Keep in mind, if you are putting in a home-brew vehicle CANbus+WiFi access point, you are literally creating an attack surface with direct safety of life implications. Not saying this is any better than those several vehicles with cellular uplinks that allow the factory to meddle with your vehicle - but you can't sue them for the stuff that happens over your modification.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +8

      Keep in mind, your mother.

    • @Real_Tim_S
      @Real_Tim_S 6 месяцев назад +2

      @@TallPaulTech and then that happened...

    • @minecrafter9099
      @minecrafter9099 6 месяцев назад +2

      it's a concern, but super unlikely, unless someone with bad intentions wants to target you specifically they wouldn't get into the effort of researching a custom made thing, also, WPA3 is practically unhackable (at this moment at least)

    • @kephir4eg
      @kephir4eg 6 месяцев назад

      Rather put this comment out there for all the people with wifi controlled smart homes. Enthusiasts playing with canbus are the least concern.

    • @Real_Tim_S
      @Real_Tim_S 6 месяцев назад

      @@minecrafter9099 So we agree it's "unlikely" but non-zero - and my comment was the user-initiated transistion from zero to non-zero. Thanks for helping defend my mother's honor.

  • @DrFiero
    @DrFiero 6 месяцев назад +1

    Dammit - already bought the "dont buy this" a number of months ago. :(

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      I bought it a few years ago. I then had a half-arsed go at using it on the Powerwall, saw nothing, then pissed it off.

    • @DrFiero
      @DrFiero 6 месяцев назад

      @@TallPaulTech - just ordered up the isolated version off Ali a minute ago. Guess the 24 Canadian Peso's won't kill me. ;)

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад

      I'm going to plug into the Tesla network soonish

    • @DrFiero
      @DrFiero 6 месяцев назад

      @@TallPaulTech - I'm using mine for my GMC Sierra. Have some options installed (power folding mirrors for one) that the trucks system isn't responding to. Scan tool sees the button press - can fold/unfold sending the command from the scan tool! So I'm going to have a micro sniffing the bus looking for the button presses, then send the command to fold/unfold.

  • @toma.cnc1
    @toma.cnc1 6 месяцев назад +1

    CAN = Car Area Network
    That was the original name and purpose, before "keyboard warriors" changed it to "control area..." that makes no sense.
    And English is not my native language...

  • @TheDuerden
    @TheDuerden 6 месяцев назад

    I watched all of this, and I have no idea what a CAN bus is....I think like 1 minute at the start explaining what it was would have been nice..still enjoyed the video, but would have been nice to have a better understanding.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +3

      The title was how to set a Linux CAN Bus, not what a CAN bus is. There are plenty of videos out there for that I'm sure.

    • @andybarnard4575
      @andybarnard4575 6 месяцев назад +1

      ​​@@TallPaulTechI know what a CAN bus is and am a tight arse. I would like to have an open source tool that mirrors what the fancy garage mechanics tools do, but they cost thousands of pounds and Id like you to show me how to get the same functionality for free. I guess that the easiest way would be to have the Raspberry pi thingy in a car recording all activity whilst a mechanics tool goes through a particular sequence of events. I would consider doing it myself, but as well as being tight Im lazy.

    • @TallPaulTech
      @TallPaulTech  6 месяцев назад +1

      Keep in mind, I'm not really a car guy. Whilst you could grab all the data, you'd have to interpret it and know what's actually going on. That's beyond me for normal cars. I know people who do that sort of thing, but they don't bother getting into the low level comms of it.@@andybarnard4575

    • @andybarnard4575
      @andybarnard4575 6 месяцев назад

      ​​@@TallPaulTechI watched a video where you had a mate who ran a garage. He is a car guy, and will be pissed off about the amount of free cash he spends on CAN tools. As well as being tight and lazy, I also like suggesting to other people what they should do. Its why I am a consultant in real life (divorced).

    • @TheDuerden
      @TheDuerden 6 месяцев назад

      @@TallPaulTech I don't really care what a CAN bus is Paul, but I like watching your content, it would be nice to have a better understanding of what you are doing on a very basic level. I doubt very much anyone has made a 1-minute video on the highest overview of what a CAN bus is...Think of it like this - not everyone will understand everything you are doing - but some people enjoy watching the way deliver information, why not consider helping them out a bit with very a brief description?

  • @myselfmeandi
    @myselfmeandi Месяц назад

    I followed along, step by step, pausing the video and double checking that I was getting the same results and seeing the same information and right at wireshark, my Linux Cinnamon Mint Lenovo E520 ended it's life.
    Be warned, this was my result with the above listed laptop and the exact same card. That was my primary computing device and now it only loads part of the operating system.
    I will be watching other tutorials for my can bus questions.
    No, on second thought, I give. If I pay US$80,000 for a truck, and it has only an AM/FM radio, which is about the current price for a base model pickup, then I will only listen to AM/FM radio for the next 84 months that I've financed it. They win. This shit is stupid and we should live with sub-par efforts of engineers and manufacturers. I would rather do that then go through countless RUclips videos with bad information, warnings missing where we need them and over bearing where we don't need them, and just garbage info from someone who got lucky because the products don't ever work as the manufacturer claims, when we try to get them to work, that brings in a myriad of other shit products, then those cause more damage, frustration, and cost, then we try to fix those defects, and then we add a new unnecessary level of shit products to fix the shit products, and before long, we have piles of expensive broken shit with little gained but wasted time. Step off the cycle of revolving problems and stop listening to these tutorials that work for very few.

  • @steveward8713
    @steveward8713 6 месяцев назад +1

    USA RUclipsr Ivan. at pine hollow auto diagnostics might be good contact ?
    He has been playing with can on vehicles for long time and has been very helpful.