Notices
Audio & Electronics Use this forum to discuss audio and electronic upgrades for your Mercedes-Benz.
Sponsored by:
Sponsored by: Innova

W211 CAN B Hacking

Thread Tools
 
Search this Thread
 
Rate Thread
 
Old Jul 26, 2022 | 10:56 PM
  #226  
pa28pilot's Avatar
Senior Member
20 Year Member
Liked
Loved
 
Joined: Sep 2004
Posts: 314
Likes: 10
From: In the shadow of D.C. (No.Va.)
'05 E320CDI, 1987 300E, Vanagon Syncro, Turbo Arrow III
If any of you folks are planning to be at Black Hat/DEF CON Car Hacking Village/BSides LV this year, I'd love to find an opportunity to get together for a drink or cigar or something. This thread has warmed my heart.
Reply
Old Aug 9, 2022 | 08:00 AM
  #227  
Fatih AkbaÅŸ's Avatar
Newbie
 
Joined: Aug 2019
Posts: 3
Likes: 0
203.045
We can connect to Can B using Can arduino. I could read Can C, but unfortunately I could not connect to Can B.
Reply
Old Aug 9, 2022 | 01:32 PM
  #228  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
Need to change the data rate speed to read CAN B.
Reply
Old Aug 9, 2022 | 03:00 PM
  #229  
Fatih AkbaÅŸ's Avatar
Newbie
 
Joined: Aug 2019
Posts: 3
Likes: 0
203.045
Originally Posted by nemiro
Need to change the data rate speed to read CAN B.
Thank you for your reply. I change the speed but it doesn't work. Canbus shild is 120 ohm. and is there an arduino code for can B that you are sure is working?
Reply
Old May 15, 2024 | 02:27 PM
  #230  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
CANB is 83.3kbps. Often times at the lower speeds, the 120ohm resistor actually causes problems. Take it out, and try it again. As for code, there are dozens of examples out there, and most are specific to the hardware you are using. If you bought a shield, I guarantee there is code out there to run it properly. Just set your code up to listen, and print out all data to the terminal window to start with.
Reply
Old Aug 11, 2024 | 09:45 PM
  #231  
bawbanksy's Avatar
Junior Member
 
Joined: Feb 2024
Posts: 15
Likes: 0
CLA200
Hoping for some steering in the right direction.

i have a set of seats from 2017 cla, they bolt in. However obviously the seat controls aren’t working.

i had previously installed them In another car (non can bus) and using the seat controler(Lin) to the door controller (can) I was able to wire directly to can on the seat.

Question is, where too from here. I could have it closed circuit like I had previously but I think ideally I’d like to intercept the w211 seat controller can messages and then trigger can messages to control the newer seats via arduino or similar.
Reply
Old Aug 11, 2024 | 11:02 PM
  #232  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
Your W211 CAN Bus speaks MBus protocol. The 2017 speaks a much newer protocol (STAR?), and I would expect the speed to be much higher than the W211, also. Your best bet is going to be to use a W211 seat controller, and use a modified W211 seat wiring harness to suit.

I do not have listings of the messaging of cars beyond PTCAN for protocol, but if you do, I can probably assist in a translation matrix.
Reply
Old Aug 11, 2024 | 11:16 PM
  #233  
bawbanksy's Avatar
Junior Member
 
Joined: Feb 2024
Posts: 15
Likes: 0
CLA200
Originally Posted by nemiro
Your W211 CAN Bus speaks MBus protocol. The 2017 speaks a much newer protocol (STAR?), and I would expect the speed to be much higher than the W211, also. Your best bet is going to be to use a W211 seat controller, and use a modified W211 seat wiring harness to suit.

I do not have listings of the messaging of cars beyond PTCAN for protocol, but if you do, I can probably assist in a translation matrix.

Ahh I see. As in, re pin the harness from the new seats to suit the older W211 seat controller box? I'd need to try and get a wiring pinout/diagram for the seats.

Hypothetically, could two protocols exist in the same bus if the timing is different?

Last edited by bawbanksy; Aug 11, 2024 at 11:18 PM.
Reply
Old Aug 12, 2024 | 09:35 AM
  #234  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
Yes, exactly. It may be easiest to use a wiring harness for a W211 seat and then adapt that to the seat. You may find that it is straightforward enough to do. I have done similar things on my own projects, and found it to not be too hard at all. When you have both seats flipped over, you'll likely see the same.
Reply
Old Sep 14, 2024 | 12:51 PM
  #235  
gareth8585485's Avatar
Newbie
 
Joined: Sep 2024
Posts: 5
Likes: 3
Hi All,

I’ve recently completed a manual swap on my W211 648 using a BMW gearbox. However, I encountered an issue involving the automatic shifter and its integration with the CAN Bus system. I’m hoping to get some guidance on replicating the CAN messages for reverse, drive, and park using an Arduino setup.

I'm using an Arduino Uno with a CAN Bus shield.

I started by trying Alex’s sketch but encountered an error:

class MCP2515' has no member named 'sendMsg'.

https://github.com/angelovAlex/can-bus-w211/tree/master

I’ve since switched to using Adam’s CANDrive library: CANDrive GitHub link, which has allowed me to successfully sniff CAN-C using the access block in the passenger door sill.


https://github.com/adamtheone/canDrive

I'm able to capture the following filtered CAN messages from the automatic shifter:


I’ve attempted to replay the captured messages with the Arduino. When I broadcast the message before turning the ignition on, the dashboard correctly displays "P" when switched on. However, when I try switching to the reverse message, the dashboard does not update to reflect the change. It only updates if I cycle the ignition, although the Android radio will exit reverse mode after a few seconds even though the message is still being broadcasted.



My goal is to install an Arduino in the car that:

Sends a reverse message when the reverse switch on the gearbox is triggered.
Sends a drive message when the handbrake is off and the car isn’t in park or reverse.
Sends a park message when the handbrake is engaged.

I’m new to CAN Bus hacking and would appreciate any pointers on why my messages aren't working as expected

Thanks in advance for your help!

Last edited by gareth8585485; Sep 14, 2024 at 12:53 PM.
Reply
Old Sep 14, 2024 | 01:04 PM
  #236  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
This message would come down the CAN C side of things. You would have to emulate the can signals from both the shifter and the transmission. It is a straightforward thing, but that is how you would approach it. You would want it to indicate that it was in drive at all other times. If not you will hit rev limiters that are very low, in all likelihood. The other approach would be to recode the ECU for a manual gearbox. However it depends very much on what chassis you have to determine how the reverse light signal comes across.
Reply
Old Sep 14, 2024 | 01:35 PM
  #237  
nemiro's Avatar
Senior Member
Photogenic
Shutterbug
Loved
Community Favorite
 
Joined: Jul 2021
Posts: 310
Likes: 36
From: Holt, FL
2004 Crossfire (w/M113K), 2008 Crossfire (w/M156), 2008 ML63, 2018 AMG GT
This message would come down the CAN C side of things. You would have to emulate the can signals from both the shifter and the transmission. It is a straightforward thing, but that is how you would approach it. You would want it to indicate that it was in drive at all other times. If not you will hit rev limiters that are very low, in all likelihood. The other approach would be to recode the ECU for a manual gearbox. However it depends very much on what chassis you have to determine how the reverse light signal comes across.
Reply
Old Feb 9, 2025 | 04:55 PM
  #238  
gareth8585485's Avatar
Newbie
 
Joined: Sep 2024
Posts: 5
Likes: 3
I managed to get this project finished after switching to a better tool. I used the peakcan tool to analize the messages and used a longan labs canbed v1 with a custom sketch to emulate the original gear shifter.

https://github.com/garethiowc/W211-G...ector-Emulator

This is my first canbus project and i'm open to any pointers/feedback
Reply

Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 


You have already rated this thread Rating: Thread Rating: 0 votes,  average.


All times are GMT -4. The time now is 04:22 AM.