S-Class (W221) 2007-2013: S 320 CDI, S 350, S 450, S 500, S 550, S 420 CDI, S 600

W221 CAN bus thread

Thread Tools
 
Search this Thread
 
Rate Thread
 
Old 10-13-2020, 12:07 PM
  #26  
Super Member

 
DaleB's Avatar
 
Join Date: May 2019
Location: Omaha, NE
Posts: 671
Received 280 Likes on 176 Posts
2007 S600
Originally Posted by megacrazy
Nice project! Although it may be easier to just use an android headunit? Depending on which teensy you use power draw at sleep is much much lower than what you mentioned. Putting them to sleep can be a little finnicky but it works well once you get the hang of it. Though definitely use whatever you're comfortable with. There is no shortage of micrcontrollers thankfully.

Speaking of Android units...you guys realize that they handle the functions you are planning to use in this little project. Would be a shame if somebody extracted the app they use and got all the CAN frames from there, instead of messing with a can analyzer? Just saying. For people using the Android unit that could be triggered on every startup...so essentially park assist would be off after android boots up.
I'm absolutely certain it would be well within the capabilities of an Android replacement head unit, especially the one that replaces the little panel with soft buttons for chassis height, PA on/off, etc. It would probably be trivially simple, assuming one had access to the source code used to manage those soft buttons.

Two issues... first, I don't have any plans to dump several hundred bucks into an Android system shipped from somewhere in China, that may or may not work the way I like, and if it doesn't -- well, tough nuggets, you bought it. I'd maybe feel differently if there were one I could actually see and use to try out before making the purchase decision, but I think the chances of ever physically crossing paths with a W221 with one installed are close to zero. I live in Omaha, remember...

Second, while I've done a fair amount of firmware for microcontrollers -- I have thousands and thousands of lines of C code for PICs in various projects and products I've developed over the years -- at no time, ever, have I considered myself a programmer. I have no clue how to develop Android apps, to be honest. I'm willing to learn how to use CANbus because I can see a lot of potential future benefit for me. A lot of the avionics systems I work with in experimental aircraft use CANbus now, as does every car I'm likely to own as a DD before I die. Android -- I can take it or leave it, I don't have any deep desire to invest a lot of time learning how to develop and test Android apps. Just me.
Old 10-14-2020, 02:18 PM
  #27  
Member
 
ClasseMiaMadra's Avatar
 
Join Date: Dec 2016
Location: NJ
Posts: 168
Received 29 Likes on 23 Posts
2016 S212
Subscribed

It sound like Chris the Swede should be invited to this thread. He seems to have done a lot of work on the w221 AND in adding features to the Android screens he sells so his input would make this thread even more interesting. Possibly he can add features to-order ? In a recent DIY install the Autovlog guy did (of youtube AMG hydrolock fame) showed engine performance metrics as android apps (I think).
Old 10-14-2020, 02:25 PM
  #28  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by ClasseMiaMadra
Subscribed

It sound like Chris the Swede should be invited to this thread. He seems to have done a lot of work on the w221 AND in adding features to the Android screens he sells so his input would make this thread even more interesting. Possibly he can add features to-order ? In a recent DIY install the Autovlog guy did (of youtube AMG hydrolock fame) showed engine performance metrics as android apps (I think).
Good idea, but maybe better in a separate thread
Old 10-14-2020, 02:28 PM
  #29  
Member
 
ClasseMiaMadra's Avatar
 
Join Date: Dec 2016
Location: NJ
Posts: 168
Received 29 Likes on 23 Posts
2016 S212
I actually emailed his contact address at his site, cmkdesigns.
Old 10-14-2020, 02:47 PM
  #30  
Super Member

 
DaleB's Avatar
 
Join Date: May 2019
Location: Omaha, NE
Posts: 671
Received 280 Likes on 176 Posts
2007 S600
Originally Posted by Hatzenbach
Good idea, but maybe better in a separate thread
I dunno, he'd be a welcome addition here if he's willing to share any of his knowledge of the CANbus stuff. Especially things that could save time like (for instance) message specifics.
Old 10-16-2020, 01:24 AM
  #31  
Newbie
 
blackmambo90's Avatar
 
Join Date: Oct 2020
Posts: 6
Likes: 0
Received 1 Like on 1 Post
W221 s550, W211 e320 cdi
Hi again,
My project is moving forward, and now i am at a stade where i will be picking up some can messages from the black can bus. Not sure witch one that is (The telematics CAN?), but it is the one that have the joystick and those buttons on left of the screen.

While i am there, i can pick you up some of them. Witch one are you wishing? The one to disable parktronik?

Last edited by blackmambo90; 10-16-2020 at 01:29 AM.
Old 10-16-2020, 10:02 AM
  #32  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by blackmambo90
Hi again,
My project is moving forward, and now i am at a stade where i will be picking up some can messages from the black can bus. Not sure witch one that is (The telematics CAN?), but it is the one that have the joystick and those buttons on left of the screen.

While i am there, i can pick you up some of them. Witch one are you wishing? The one to disable parktronik?
That would be awesome!

Yes, the codes for Parktronic ON/OFF, and - of course - we also would need to know in which pair of twisted wires you tapped into.
And the CAN bus speed (I believe not all are 500 kbps)

Many thanks!

Last edited by Hatzenbach; 10-16-2020 at 10:17 AM.
Old 10-16-2020, 12:43 PM
  #33  
Super Member

 
DaleB's Avatar
 
Join Date: May 2019
Location: Omaha, NE
Posts: 671
Received 280 Likes on 176 Posts
2007 S600
Originally Posted by blackmambo90
Hi again,
My project is moving forward, and now i am at a stade where i will be picking up some can messages from the black can bus. Not sure witch one that is (The telematics CAN?), but it is the one that have the joystick and those buttons on left of the screen.

While i am there, i can pick you up some of them. Witch one are you wishing? The one to disable parktronik?
Ideally, the messages for the Park Assist button pressed and released, AND the messages to turn the LED in that button on and off would be helpful.

If I had my way, I'd replace that red LED with a green one, and turn it on (green) to indicate PA is enabled, instead of red to indicate disabled. If I retire early and have enough spare time on my hands it would be a nice weekend project... but honestly given the rate with which other stuff on this car is breaking, I don't know that I'd ever get to it., The damn heater didn't work when I drove it today, now that temperatures are down in the 40s. grumblegrumble.... more parts to replace.
Old 10-17-2020, 04:10 PM
  #34  
Newbie
 
blackmambo90's Avatar
 
Join Date: Oct 2020
Posts: 6
Likes: 0
Received 1 Like on 1 Post
W221 s550, W211 e320 cdi
Hey, it look like this button is not on this can bus 🤔
i will plug to the second one (the one that i will plug the video in motion filter) and i will see if it is there later. Maybe tomorrow or next week
Old 10-17-2020, 06:24 PM
  #35  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
OK, I had some time this afternoon, so I decided I do some CAN bus sniffing.
My equipment: A MCP2515 "shield" that connects to the CAN bus and sends the data to an Arduino via SPI
The Ardunio is connected to a laptop via USB and sends the data on the COM bus to a freeware app that reads and displays the data.

And - positive surprise - after i opened the access panel I found out that all the twisted wires with the same color are connected to each other, well that makes it much easier
So I start with the yellow bus, I get good readings and lots of data, but don't find the signal I'm looking for
Next the green bus, same result
(My search algorithm is that I press the button repeatedly and look for data that changes the same time I press the button)
OK, that leaves us with the brown bus: I attach my probes to the brown bus and something strange happens:
Every time I connect my probes, the bus "collapses". It goes so far that the lights in the footwell go out.
I first thought that my probes created a short circuit on the CAN bus but, no they are fine.
Next troubleshooting step is to pull the terminator resistor, no change, same problem.
Looks like when I attach the MCP2515 to the brown CAN bus it just doesn't like it.
Any ideas? Wrong CAN bus speed?





Last edited by Hatzenbach; 10-17-2020 at 06:33 PM.
Old 10-17-2020, 08:14 PM
  #36  
Newbie
 
blackmambo90's Avatar
 
Join Date: Oct 2020
Posts: 6
Likes: 0
Received 1 Like on 1 Post
W221 s550, W211 e320 cdi
Originally Posted by Hatzenbach
Any ideas? Wrong CAN bus speed?
Yes, that what a wrong speed can do
try 125 000

Also there is more than 3 can network on this vehicle, so it may be that you will not find it, how ever i do guess that is suppose to be the yellow one...
Old 10-17-2020, 09:22 PM
  #37  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by blackmambo90
Yes, that what a wrong speed can do
try 125 000

Also there is more than 3 can network on this vehicle, so it may be that you will not find it, how ever i do guess that is suppose to be the yellow one...
Thanks, I'll try that.
where would i find the other CAN bus(es)?
Old 10-18-2020, 04:00 PM
  #38  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by blackmambo90
Yes, that what a wrong speed can do
try 125 000

Also there is more than 3 can network on this vehicle, so it may be that you will not find it, how ever i do guess that is suppose to be the yellow one...
Good news: after changing the speed to 125kbps I could read the brown bus
Bad news: The signal which I'm looking for is not on the brown bus either (and I also double-checked the yellow and green buses again - nada)

Throwing in the towel...
Old 10-18-2020, 06:41 PM
  #39  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
Good news: after changing the speed to 125kbps I could read the brown bus
Bad news: The signal which I'm looking for is not on the brown bus either (and I also double-checked the yellow and green buses again - nada)

Throwing in the towel...
The problem is more complicated than you guys are assuming. Hint to advance the project: the switch sits on LIN B3

connects to N72/1 which sits on can B aka interior can which goes to the CGW.

Last edited by megacrazy; 10-18-2020 at 06:54 PM.
Old 10-18-2020, 06:57 PM
  #40  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by megacrazy
The problem is more complicated than you guys are assuming. Hint to advance the project: the switch sits on LIN B3

connects to N72/1 which sits on can B aka interior can which goes to the CGW.
thanks but not enough hints for me
Unfortunately I’m way more familiar with the inner workings of Porsches
Old 10-18-2020, 07:12 PM
  #41  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
thanks but not enough hints for me
Unfortunately I’m way more familiar with the inner workings of Porsches

N72/1 is the climate control stack in the center console. The park assist button connects to that via LIN bus. The center climate control switch sits on CAN B. So the switch itself has no connection to the can bus.
The following users liked this post:
Hatzenbach (10-18-2020)
Old 10-18-2020, 07:18 PM
  #42  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
got it (hmmmmmm, at least I believe I got it ;-)
But am I assuming right that when I push the button, that this will create an event on the interior CAN bus B?
Old 10-18-2020, 07:19 PM
  #43  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
got it (hmmmmmm, at least I believe I got it ;-)
But am I assuming right that when I push the button, that this will create an event on the interior CAN bus B?
Absolutely it should. So don’t throw in the towel yet
Old 10-18-2020, 08:44 PM
  #44  
Super Member

 
DaleB's Avatar
 
Join Date: May 2019
Location: Omaha, NE
Posts: 671
Received 280 Likes on 176 Posts
2007 S600
Yeah... the switch itself isn’t doing squat, it’s just an input to a controller. The switch state is read by a control unit, which (eventually) causes a message to be placed on the CAN bus. I suspect that message is not “someone pressed the PA button”... probably the controller is monitoring the state of the users input, controlling the LED via LIN (bummer if that’s the case), and sending “Turn PA on/off” messages on the CAN bus. But... there are numerous ways to do it, and I could well be totally wrong. Just need to dig in and see.

I don’t have the CAN bus interface I ordered yet, and won’t for at least a couple of weeks I suspect. Sigh. In the mean time I can work on getting my stupid heater to work, grumble grumble.
Old 10-18-2020, 09:28 PM
  #45  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
I am assuming that in order to get to the interior CAN-B I need to take off the panel with the A/C vents (the one which goes across the whole dash)?
If yes does anyone have anymore pointers what I'm looking for then?
Old 10-18-2020, 10:26 PM
  #46  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
I am assuming that in order to get to the interior CAN-B I need to take off the panel with the A/C vents (the one which goes across the whole dash)?
If yes does anyone have anymore pointers what I'm looking for then?
Or tap at one of the can distribution blocks. It’s brown and brown red wiring as far as I remember.
Old 10-18-2020, 10:47 PM
  #47  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by megacrazy
Or tap at one of the can distribution blocks. It’s brown and brown red wiring as far as I remember.
but you don't mean the one from the first picture?
Old 10-19-2020, 08:50 AM
  #48  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
but you don't mean the one from the first picture?
That should be the one. If that doesn’t work for you, you can always look at tackling the Lin bus. 1 wire to tap behind the button. Similar approach to can bus with some differences.

Last edited by megacrazy; 10-19-2020 at 08:54 AM.
Old 10-19-2020, 09:53 AM
  #49  
Member
 
Hatzenbach's Avatar
 
Join Date: Oct 2017
Location: Silicon Valley, 94070
Posts: 144
Received 31 Likes on 23 Posts
2009 W221
Originally Posted by megacrazy
That should be the one.
If that's the case then I'm afraid that we went full circle, see my post #38
Picking up the towel from the floor and throwing it in again ;-)
Old 10-19-2020, 08:19 PM
  #50  
MBWorld Fanatic!
 
megacrazy's Avatar
 
Join Date: Oct 2012
Posts: 1,376
Received 293 Likes on 194 Posts
CLK55 W209, CL63 W216
Originally Posted by Hatzenbach
If that's the case then I'm afraid that we went full circle, see my post #38
Picking up the towel from the floor and throwing it in again ;-)
The signal is definitely on a bus. Pack your towel away and go back to the garage for more scanning

I am assuming you had the car running - obvious but you never know.


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

Quick Reply: W221 CAN bus thread



All times are GMT -4. The time now is 10:25 AM.