Pages: 1 ... 127 128 [129] 130 131 ... 194
Author Topic: The Volvo ME7 thread:  (Read 1760355 times)
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1920 on: November 27, 2022, 09:56:45 AM »

I have some good news. I have almost completed the changes to Sardine that allowed me to talk to the RPI and turn it into a J2534 device. I had to refactor the code to make it work over TCP/IP, I had to also refactor the message handling mechanism to work with multiple messages in one recv operation. I had to write a small python proxy on the Pi , which is still very crude but allows me to spoof some CEM data to get VIDA going.

It took me a week simply because of the awful development environment I set up. Main PC with Visual Studio -> Laptop with VIDA -> RPI. Transferring from PC to laptop, refreshing the localhost/Vida instance via reloading or having to kill the IE tab emulator + needing to restart the RPI python server took a toll on my time. I can't even describe how many times my J2534 dll crashed(bad pointer arithmetic) and I had to manually kill all msedge processes.

All I have to do is wait for my raw OBD2 cable to arrive, set up a charger for my RPI in my car, and most importantly, find a way to relay the CAN messages to VIDA without blocking or saturating VIDA with too many.

Anyway, throughout all this I saw that on my test ECM on the bench, the DLC byte commonly seen here is irrelevant and doesn't actually work with the 2002 HN.2. Perhaps it only works when connected via the CEM.
So commands that should be 000FFFFE#CB7AXXXXXXXXXX do not work, but when removing the 0xCB byte(DLC field) it works just fine, or perhaps I wasn't sending it correctly.

« Last Edit: November 27, 2022, 10:16:16 AM by dikidera » Logged
daniel2345
Full Member
***

Karma: +11/-8
Offline Offline

Posts: 200


« Reply #1921 on: November 27, 2022, 12:52:55 PM »

You are mixing many things.

DLC has nothing to do with that Cx Byte.

DLC defines, how many payload bytes are sent in RAW CAN. Usually 8.

The Cx Byte is part of the encapsulated Volvo D2 protocol on RAW CAN, part of the payload bytes.
It is used as flow control in D2 when in diagnostic session.
It is not used when in programming session, because programming session in D2 does not support flow control.

Good luck. In my opinion you need more basic knowledge in all this stuff, then you wont burn so much time poking in the dark...

Logged
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1922 on: November 27, 2022, 01:42:57 PM »

I was working based on this information.

https://github.com/Alfaa123/Volvo-CAN-Gauge/blob/master/Diag_Request.png

Also, which areas do you feel I am lacking in, genuinely asking for constructive criticism so I can improve. However if I can say one or two things in my defense, it's that the information is fragmented between multiple websites, multiple languages, github repositories or forum pages. Even then some of it is subjective based on whoever wrote it and his or her understanding of it. It took me a long while to get to where am I now, even though important bits such as Sardine J2534 being there free to use and extend which saved me quite some time in and of itself. My last goal which I may fail is the bootloader for Denso-based ECUs. I am really surprised that only the subaru people ever went to explore those ECUs.

Anyway, just how many protocols do Volvo use? I mean there's a ton over CAN, ISO15765, K-line, UDS, a few more(quite a few), D2, GGD.
« Last Edit: November 27, 2022, 02:06:45 PM by dikidera » Logged
daniel2345
Full Member
***

Karma: +11/-8
Offline Offline

Posts: 200


« Reply #1923 on: November 27, 2022, 02:28:47 PM »

Difficult to say. Just honest brainstorming:

Read alot about OSI Layer Model.

You are mixing physical layer, transport layer, protocol, sessions, diagnostic, swdl and so on.

Some ISO documents can cover one or more layers,different sessions, etc.


For Volvo not much is public, so reading everything about that stuff on VAG could help.


Then read stuff about microcontroller software updates in general. Try to find automotive specific informations then. What is a primary Bootloader, why is there a secondary? What is CPU Boot mode, what is customer boot mode? Does it need different stages?

What is internal memory, how external can be addressed in memory space? What is memory space, what are memory segments? What is linear adress space, what is paging and windowing? What is software, what is application data?

I think someone mentioned already, that for volvo secondary Bootloaders will be needed. Prepare yourself for the cpu and ecu specific development of it. Your CPU is a Renesas SH7055.
Get familiar with assembly programming and the SH2 Instruction set. User MAT concept is to be understood. Ram, Rom...etc.

Or, as everyone else is doing here obviously: steal it from someone / some tool developer rather then think yourself Cheesy

« Last Edit: November 27, 2022, 02:33:28 PM by daniel2345 » Logged
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1924 on: November 27, 2022, 02:48:59 PM »

Maybe you were referring to my TCP/IP implementation. The RPI has no native way to communicate with Windows via USB or anything else. I decided to change this by using TCP sockets and using a shared network between the Raspberry Pi and Windows, as Sardine was written to work with Arduino and COM ports. And obviously Linux has native support for pretty much anything I could think of. So it's working nicely.
Anyway, thanks for the pointers. The VAG group are all Bosch. And, at least in my case, my S60 is Denso. And yes, I understood early on that there are less open source tools for Denso than there are for Bosch, but luckily the Subie guys have done the hard part(arguably the hardest out of all of this)

Here is the link in case anyone ever needs a base start on the kernel aka bootloader. https://github.com/fenugrec/npkern . As-is, it's currently not compatible with Volvo for a variety of reasons, but I will get to it in the near future.
« Last Edit: November 27, 2022, 02:55:21 PM by dikidera » Logged
daniel2345
Full Member
***

Karma: +11/-8
Offline Offline

Posts: 200


« Reply #1925 on: November 27, 2022, 02:54:56 PM »

Maybe you were referring to my TCP/IP implementation. The RPI has no native way to communicate with Windows via USB or anything else. I decided to change this by using TCP sockets and using a shared network, as Sardine was written to work with Arduino and COM ports.

Nope. That's yust communication with your tool choice. Im talking only about "ecu side".
My text are hints, things i came across. Must admit took me some years to understand everything. My impression was, you haven't so far. Sorry if im wrong. Smiley

When you have understood everything above, you will know why someone's subaru boot loader will not help you much. Start from scratch.
« Last Edit: November 27, 2022, 02:57:25 PM by daniel2345 » Logged
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1926 on: November 27, 2022, 02:59:18 PM »

Nope. That's yust communication with your tool choice. Im talking only about "ecu side".
My text are hints, things i came across. Must admit took me some years to understand everything. My impression was, you haven't so far. Sorry if im wrong. Smiley
I do not believe you are truly wrong. It has been only like 2 months since I started from scratch when it comes to car ECUs and Tuning. I truly had no idea how people did tunes, what maps were nor the software. It was very very difficult to build context between all the information(that is again, very fragmented). It took me a while afterwards to find dumps for my specific vehicle, to compare tunes and see what was changed, guess it's factors. As soon as I had some semblance of understanding I wanted to try and tune myself, I needed to flash my changes(to a test ECU I bought online, I wouldn't dare change anything on my running car), which is where all this lead me. Obviously, all the while reverse engineering the SH2 dumps I have, the SH2 arch is...unusual to say the least. But at least I was able to easily see what was data and what was code, as the architecture is such, that IDA produces almost sensible code from the data.

EDIT:
The subaru bootloader cannot work for me as-is, I know this, because it relies on the Subaru specific semantics, the guy's code will hopefully at least get me started in some direction. I just haven't had time to look at it properly. I am very focused on having VIDA communicate with my RPI.

As soon as I progress further will I have time to look at the next objective. Yes I have split everything into smaller tasks.
« Last Edit: November 27, 2022, 03:52:46 PM by dikidera » Logged
keichi
Full Member
***

Karma: +11/-2
Offline Offline

Posts: 100


« Reply #1927 on: November 28, 2022, 04:40:55 AM »

Does anyone have an Tune with Antilag/NLS Inside which works in every Mode?  Softwareversion could be GPHJ/GSJH something 05>

With Best Regards

Some time ago I asked about your MAF readings because i do exactly the same 100-200 time (12,3s?) and i am trying to estimate my HP (no dyno yet) but no answer form you Smiley

As for NLS i have it implemented on my 02 2.3 T5 and it is working well (perfectly flat boost between gear changes) Smiley I belive you need to dissasemple your bin to do it on your car. At least i can't imagine it be done on bare bin by just patching "random" things Smiley
Logged
V70_T5
Jr. Member
**

Karma: +1/-1
Offline Offline

Posts: 28


« Reply #1928 on: November 28, 2022, 02:11:00 PM »

Some time ago I asked about your MAF readings because i do exactly the same 100-200 time (12,3s?) and i am trying to estimate my HP (no dyno yet) but no answer form you Smiley

As for NLS i have it implemented on my 02 2.3 T5 and it is working well (perfectly flat boost between gear changes) Smiley I belive you need to dissasemple your bin to do it on your car. At least i can't imagine it be done on bare bin by just patching "random" things Smiley


Did you asked me over PM or in this Thread, maybe i overread it... my MAF Readings would be actually useless because i have 10% Airleak Somewhere...

Answered you with an PM Smiley
« Last Edit: November 28, 2022, 02:14:47 PM by V70_T5 » Logged
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1929 on: November 28, 2022, 02:16:25 PM »


Did you asked me over PM or in this Thread, maybe i overread it... my MAF Readings would be actually useless because i have 10% Airleak Somewhere...

Answered you with an PM Smiley
Check your brake booster seal from within the cabin. It's a common failure point on the S60s. Replacement can be in-car but difficult if a manual due to the clutch pedal.
Logged
keichi
Full Member
***

Karma: +11/-2
Offline Offline

Posts: 100


« Reply #1930 on: November 29, 2022, 03:26:24 AM »

Brake booster leak shouldn't be related with boost leak because vacuum hose from engine to BB has one way valve - at least if it's working Smiley
Logged
dikidera
Full Member
***

Karma: +10/-8
Offline Offline

Posts: 152


« Reply #1931 on: November 29, 2022, 03:55:00 AM »

Brake booster leak shouldn't be related with boost leak because vacuum hose from engine to BB has one way valve - at least if it's working Smiley
Both should be checked out then. Not unlikely failure point. Then all the rest of the hoses, the PCV(on the old S40s a failed PCV diaphragm caused vacuum leaks for me)
Logged
Vollmer
Full Member
***

Karma: +14/-256
Offline Offline

Posts: 78

Professional Cat Herder


« Reply #1932 on: November 29, 2022, 04:33:49 PM »

"I got my transceiver (NXP TJA1040) from an old XC70 Rear Electronic Module.
There is poetic pleasure in using a Volvo component to recover what was taken from you by Volvo Smiley
I'm alluding here to your right to customize or repair your car.
This PIN business or being locked out of using spare parts is really sleazy."
« Last Edit: November 29, 2022, 08:43:56 PM by Vollmer » Logged

Volvo HALL of SHAME:

Guitar24t aka Robert Hilton
SparkyR aka Brandon Halme
Prometey1982 aka Artem Vasiliev
MAXX ECU - Brett Willet
VIDA Leach - David Leech

Useless Twats:
PRJ - Dmitri from Estonia
BaxtR
Full Member
***

Karma: +17/-25
Offline Offline

Posts: 68


« Reply #1933 on: November 30, 2022, 05:43:42 PM »

"I got my transceiver (NXP TJA1040) from an old XC70 Rear Electronic Module.
There is poetic pleasure in using a Volvo component to recover what was taken from you by Volvo Smiley
I'm alluding here to your right to customize or repair your car.
This PIN business or being locked out of using spare parts is really sleazy."


Dude can you just like, stop? no one cares and youre just making a fool out of yourself. go ahead and "bring the ship down" "turn everything to ashes"

youre literally a moron filling up useful threads with nonsense.
Logged

2007 Volvo S60R, PT6266 BB, 1700x ID Injectors, Walbro525. Halme Built manifold and exhaust #BaxtrPerformance
SparkyR
Full Member
***

Karma: +19/-21
Offline Offline

Posts: 84



« Reply #1934 on: November 30, 2022, 05:54:42 PM »

He’s just seeking attention. The more you acknowledge him he’s just getting what he wants.
Logged

2005 S60R m66, Xona Rotor 7864, turbosmart 45mm wastegate, 1300cc injectors
Pages: 1 ... 127 128 [129] 130 131 ... 194
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.624 seconds with 17 queries. (Pretty URLs adds 0.097s, 0q)