E90Post
 


TNT Racewerks
 
BMW 3-Series (E90 E92) Forum > E90 / E92 / E93 3-series Technical Forums > AUDIO/VIDEO + BLUETOOTH + Electronics/Alarm/Software > CAN Bus Hacking (via PICAN2, Canberry, Panda, ect)



Reply
 
Thread Tools Search this Thread
      06-16-2018, 06:59 PM   #1
UB2SLOW
New Member
United_States
6
Rep
24
Posts

Drives: '11 135i M Sport
Join Date: Feb 2017
Location: Denver, CO

iTrader: (0)

CAN Bus Hacking (via PICAN2, Canberry, Panda, ect)

Thought I'd start this thread as searching the internets and boards has yielded nothing for CAN bus hacking (sniff+read+write) specifically related to 2006+ BMWs. Only generic CAN info, which may work just fine on BMWs, but before I start buying the hardware, I wanted to know what others have used to the get the ball rolling and what technical resources or open-source projects you've found helpful.

My current plan is to get the following:
- Komodo CAN DUO Interface (for CAN data analyzing)
- Raspberry Pi 3 B+ (for programmatically sending desired CAN messages/commands using linux can-utils, or something else)
- PiCAN2 (for adding CAN 2.0 A/B + SPI interfaces to Raspberry Pi and interfacing with the vehicles CAN bus via SocketCAN)

I should note, everything I am doing is white hat and on my own vehicle. I just want to make my car "smarter" and make ancillary systems (not safety, or engine management systems) easier and more fun to interface with. I am a software engineer and am completely aware I can brick my bus if not careful.

And a last question, is it correct that the CAN bus is essentially the main information highway with two lanes (CAN high and CAN low) for the transmission of all messages? So I should not need to connect a specific bus, but rather send messages on either CANh or CANl with the correct packet metadata and payload?


P.S. For any other noobs, this is an awesome resource that blew my mind (I haven't finished reading it, yet): http://opengarages.org/handbook/ebook/

Cheers,

Mark
Appreciate 0
      07-25-2018, 10:00 PM   #2
UB2SLOW
New Member
United_States
6
Rep
24
Posts

Drives: '11 135i M Sport
Join Date: Feb 2017
Location: Denver, CO

iTrader: (0)

No auto hackers around?
Appreciate 0
      07-26-2018, 08:30 AM   #3
gamesfrager
Banned
Canada
198
Rep
709
Posts

Drives: 2011 328i
Join Date: Feb 2018
Location: Calgary

iTrader: (0)

You might get more response in the coding forum.
I would have loved for a way to get all CAN data into Android.
Pair it with a Tasker plugin and you're set.
But unfortunately I'm no car hacker.
Still very interested in what you come up with.

Last edited by gamesfrager; 07-26-2018 at 05:00 PM..
Appreciate 0
      07-26-2018, 09:32 AM   #4
opjose
Major
opjose's Avatar
242
Rep
1,353
Posts

Drives: 335xi
Join Date: May 2016
Location: Md

iTrader: (0)

Your post implies that you view Canbus as having two datapaths like opposing lanes on a highway.

It does not.

CanHigh and CanLow are a differential serial bus.

There is only one active datapath which can be used by connected devices.

Canbus works more like old coaxial computer data networks that required endpoint terminations to tie high and low together to prevent "ringing".

Any device can either send or receive via Canbus, but only one can do so at a time and in only one direction. Arbitration is done by the devices themselves. They listen for quite on the line before sending much like an old fashion phone party line.
Appreciate 0
      01-26-2024, 12:11 PM   #5
808AWD325xi
Ballin' out of control.
808AWD325xi's Avatar
No_Country
519
Rep
1,289
Posts

Drives: 2009 335i
Join Date: Jul 2007
Location: Moline, IL

iTrader: (0)

Thumbs up

Quote:
Originally Posted by UB2SLOW View Post
Thought I'd start this thread as searching the internets and boards has yielded nothing for CAN bus hacking (sniff+read+write) specifically related to 2006+ BMWs. Only generic CAN info, which may work just fine on BMWs, but before I start buying the hardware, I wanted to know what others have used to the get the ball rolling and what technical resources or open-source projects you've found helpful.

My current plan is to get the following:
- Komodo CAN DUO Interface (for CAN data analyzing)
- Raspberry Pi 3 B+ (for programmatically sending desired CAN messages/commands using linux can-utils, or something else)
- PiCAN2 (for adding CAN 2.0 A/B + SPI interfaces to Raspberry Pi and interfacing with the vehicles CAN bus via SocketCAN)

I should note, everything I am doing is white hat and on my own vehicle. I just want to make my car "smarter" and make ancillary systems (not safety, or engine management systems) easier and more fun to interface with. I am a software engineer and am completely aware I can brick my bus if not careful.

And a last question, is it correct that the CAN bus is essentially the main information highway with two lanes (CAN high and CAN low) for the transmission of all messages? So I should not need to connect a specific bus, but rather send messages on either CANh or CANl with the correct packet metadata and payload?


P.S. For any other noobs, this is an awesome resource that blew my mind (I haven't finished reading it, yet): http://opengarages.org/handbook/ebook/

Cheers,

Mark
I do most of my exploration nowadays using a Fedora laptop and various SocketCAN interfaces. can-utils makes it easy to poke around from the cli and manually test payloads prior to any programmatic implementation.
__________________
Alpina B3 Flash/BMS OCC/ER CP/ETS 5/HKS BOV/M3 Control Arms
Appreciate 0
Reply

Bookmarks

Tags
can bus, canberry, canbus, hacking, komodo, pican, pican2, raspberry pi


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 05:06 AM.




e90post
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST