NefMoto

Technical => Flashing and Chipping => Topic started by: MegaZu on September 15, 2022, 05:50:31 AM



Title: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 15, 2022, 05:50:31 AM
Hey guys, I'm trying to talk with mg1 unit on bench, but don't have success with response from it.
After start the ecu sends messages for a few seconds to can bus at 500kbits, after that silence. Messages depend in what mode is my can device - listening only or normal. If it's silence - the same message couple hundreds times, in normal - different messages are being sent.
When I try to send general commands to it, like ID or anything else - it doesn't respond. Tried different speeds - no luck. Maybe it requires some "wake-up" sequence ?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 15, 2022, 06:55:07 AM
The ECU is flexray, CAN is only for SBOOT pretty much.
If you want to communicate in normal mode with the ASW or the CBOOT, then you need the gateway.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 15, 2022, 08:47:17 AM
Thanks ! May you advice any gateway for that ?
PS. So they use the same pins for can and flexray ?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 15, 2022, 11:21:45 AM
btw, on what speed flexray is working in that ecu ?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 15, 2022, 12:35:45 PM
What does it matter what speed it is?
You need the GW anyway to wrap and unwrap the data.
For pinout look at wiring diagrams on ISTA and see what is connected to GW.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 01:23:22 AM
To communicate via OBD\ENET cable - FEM\BDC module is required. But what about direct connection to CAN bus, pins 41\42, like bench flashers do ?
I clearly can see CAN packets from flasher and dme, but before that flasher sends some non CAN packets data to the line, so maybe someone knows what is that ? Wakeup sequence ? Logic analyzer doesn't recognize them as flexray packets.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 03:32:49 AM
What do you want to communicate with?
If SBOOT, then yes you can communicate with it. This is useful only for flashing the ECU, and this is what the "bench flashers" communicate with.
It is available at boot of ECU until the CBOOT has started.

As I said before the CBOOT and ASW do not have any CAN communication on those pins, only through the flexray wrapper, and for that you need GW, yes FEM/BDC provides the GW function.
Same goes for VAG in MQB Evo and MLB Evo.

You want to communicate over UDS right? The CBOOT and the ASW are what implement this, and neither of them gives a fuck about the CAN pins.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 06:22:44 AM
I want to communicate with it for flashing\diagnostic purpose.
I think that bench flasher turns ECU to SBOOT using PWM(will verify with analyzer later) or\and specific data on CAN bus.
Yes UDS over CAN(for SBOOT, as you said), at least that is what I see during reading\writing to ECU. I believe ENET will encapsulate UDS into FlexRay.
Another option is to build test environment and use ENET


Title: Re: Bosch MG1 (bmw) and can bus
Post by: jcsbanks on September 20, 2022, 08:13:58 AM
With BMW MEVD17, ZGW and DME (from different cars) had to have the same VIN (it was done through E-Sys, I don't have a guide) so that UDS on CAN or ethernet with the ZGW would allow a conversation with the DME CBOOT or ASW. Whether this helps in your MG1 quest I do not know.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 08:49:15 AM
I want to communicate with it for flashing\diagnostic purpose.
I think that bench flasher turns ECU to SBOOT using PWM(will verify with analyzer later) or\and specific data on CAN bus.
Yes UDS over CAN(for SBOOT, as you said), at least that is what I see during reading\writing to ECU. I believe ENET will encapsulate UDS into FlexRay.
Another option is to build test environment and use ENET
I don't think you understand what you are talking about whatsoever. Learn what the building blocks of the ECU are.

Diagnostics over CAN are not supported by this ECU (ASW).
OBD flashing is done in CBOOT, this also does not support CAN.
Flashing over CAN is supported only on bench in SBOOT.

There is no CAN tester communication with the ECU outside of SBOOT.

Even if you send CAN frames to the gateway, they get encapsulated into flexray and only then sent to the ECU.
They are not forwarded, the ECU does not listen to CAN at all when it has moved on from SBOOT.

You're trying to run before you learned to walk. I already answered your question in my first reply. It contained everything needed.
Why are you continuing this?
It doesn't matter what you use to talk to GW. ENET or CAN. In the end it's the same. It is converted to flexray encapsulated CAN frames and sent to ECU.
The GW is not optional, there is no "option to build test environment". And if you repeat it another 100x it won't become true. No, it is a requirement to communicate in normal mode.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 08:57:48 AM
With BMW MEVD17, ZGW and DME (from different cars) had to have the same VIN (it was done through E-Sys, I don't have a guide) so that UDS on CAN or ethernet with the ZGW would allow a conversation with the DME CBOOT or ASW. Whether this helps in your MG1 quest I do not know.
Same thing, BMW went flexray with F series.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 09:07:28 AM
I don't think you understand what you are talking about whatsoever. Learn what the building blocks of the ECU are.

Diagnostics over CAN are not supported by this ECU (ASW).
OBD flashing is done in CBOOT, this also does not support CAN.
Flashing over CAN is supported only on bench in SBOOT.

There is no CAN tester communication with the ECU outside of SBOOT.

Even if you send CAN frames to the gateway, they get encapsulated into flexray and only then sent to the ECU.
They are not forwarded, the ECU does not listen to CAN at all when it has moved on from SBOOT.

You're trying to run before you learned to walk. I already answered your question in my first reply. It contained everything needed.
Why are you continuing this?
It doesn't matter what you use to talk to GW. ENET or CAN. In the end it's the same. It is converted to flexray encapsulated CAN frames and sent to ECU.


This ECU is new for me, that's why I started this topic. Right now I have ECU on bench and my very first goal is to get boot loader version and ID over the CAN, like flasher does and read backup. So my main question is how to turn ECU into SBOOT mode on bench to talk with it.

I asked few times about data I see before CAN packets on the bus, as well I mentioned about PWM and wakeup sequence. But you didn't replied on any of that.





Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 09:11:57 AM
This ECU is new for me
I don't think only this ECU is new for you.
Quote
Right now I have ECU on bench and my very first goal is to get boot loader version and ID over the CAN, like flasher does and read backup. So my main question is how to turn ECU into SBOOT mode on bench to talk with it.

I asked few times about data I see before CAN packets on the bus, as well I mentioned about PWM and wakeup sequence. But you didn't replied on any of that.
Nobody is going to tell you how to make a bench loader for MG1.
Sniff a tool and figure it out is your only option.

Btw, the method involves multiple exploits to gain RCE. The SBOOT is RSA protected.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 09:33:56 AM
@prj, nice, thank you for the help :D You could let me know that you won't share anything instead of blaming :)

PS. I'm ready to pay for a useful information.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 09:56:59 AM
@prj, nice, thank you for the help :D You could let me know that you won't share anything instead of blaming :)
You don't even know what you want.
Quote
PS. I'm ready to pay for a useful information.
For what information?
Seems like you don't even know what SBOOT is. You already have your Aurix and SPC5777 custom loader programmed?
Probably not.

All you are making here is hot air.
For solution on silver platter you will probably have to pay 5 digits.

Just so others are on the same page, here's an excerpt from PM:
Quote
Do you know how to communicate with that ecu ? First of all, I'd like to get ID from it, for that is command 22 f1 01, but I can't send it
That's not even how you get full ID on BMW, nor is it applicable in any way to SBOOT.

You talk like you're tough shit, but your level of understanding is below beginner.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 10:14:37 AM
You are super arrogant, what I noticed is that you like to say here something like "bla bla bla you don't know even what is SBOOT, CBOOT, ASW bla bla" ... slow down because your chair will blow


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 10:15:40 AM
You are super arrogant, what I noticed is that you like to say here something like "bla bla bla you don't know even what is SBOOT, CBOOT, ASW bla bla" ... slow down because your chair will blow
But you don't. You do not understand the structure of the ECU, it is clear to anyone that does.

So, more hot air?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: MegaZu on September 20, 2022, 10:20:52 AM
"hot air" comes only from you. Pick the medal from box for the most clever person in the universe who knows what SBOOT is :)
PS. Why you are still here ? Trying to assert yourself ?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on September 20, 2022, 10:23:30 AM
"hot air" comes only from you. Pick the medal from box for the most clever person in the universe who knows what SBOOT is :)
PS. Why you are still here ? Trying to assert yourself ?
I am here as long or as little as I want to be.
But you're just a passing phenomenon, like many before and after.

Your level of intelligence can be summed up with one picture:
(https://i.kym-cdn.com/entries/icons/original/000/000/266/no_u_for_knowyourmeme.jpg)

:D

BTW your MSD81 also has SBOOT, CBOOT and ASW.
Just like any other ECU in existence.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: terminator on November 06, 2022, 06:58:33 AM
Flashing over CAN is supported only on bench in SBOOT.

Are you sure it goes over CAN? I tried to sniff so called bench mode without any luck. I'm not talking about BMW but in general about all Bosch ECUs.
Have you sniffed it? I will be grateful for a short guide. Because I tried any speed settings and nothing. Could it be ASC?


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on November 06, 2022, 07:50:17 AM
It's done over the CAN transceiver. Whether it's CAN or some other protocol it's a different story.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: sharmzy519 on May 06, 2024, 02:27:58 AM
So who has any progress outside femto, also anyone play with DAP over CAN Physical Layer (DXCPL) Converter function, i realize its being a debug password/key for PRJ looking to call it a stupid idea.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: prj on May 06, 2024, 03:28:10 AM
So who has any progress outside femto, also anyone play with DAP over CAN Physical Layer (DXCPL) Converter function, i realize its being a debug password/key for PRJ looking to call it a stupid idea.
What is discussed here has nothing to do with femto.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: sharmzy519 on May 06, 2024, 03:37:56 AM
I realize there method isn't this, but unless you have been welcomed you into the office and showed there process, you couldn't say forsure. I do realize that companies solution is something else all together (edited for monetary reasons) but i expect you all will have a smoother solution soon.


Title: Re: Bosch MG1 (bmw) and can bus
Post by: kkk91 on August 21, 2025, 10:17:40 AM
I realize there method isn't this, but unless you have been welcomed you into the office and showed there process, you couldn't say forsure. I do realize that companies solution is something else all together (edited for monetary reasons) but i expect you all will have a smoother solution soon.

actually looks like they use either bootctrl or tsw to flash ECU. Since they never erased ALL sectors of BMW CBoot (0x80028000 - 0x80060000).