RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Tue Dec 23, 2025 10:56 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 05, 2021 12:18 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
When attempting to connect to the TCM or ABS module (NCS), they both throw errors and fail to connect. (Although, the ABS module seems to get close) Also, it would certainly make sense to have the logger only show the parameters for whatever module you're connected to. For example, only showing ECU parameters if you're connected to the ECU rather than showing ECU, TCM, and ABS parameters.

Following modules throw the following errors;
TCM:
- Response checksum match failure. Expected: 0A, Actual: 34
- Invalid response length

ABS Module:
- Invalid response length
- Invalid response code. Expected one of [5A, EC, 61, 62]. Actual: 7F.


Attached below are two trimmed error logs showcasing the errors shown when attempting to connect to both the ABS Module and the TCM.


You do not have the required permissions to view the files attached to this post.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 05, 2021 6:30 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
The target attribute of the parameter element is used to select ECU or TCU or both. There's no value defined for other modules.
https://www.romraider.com/index.php/Rom ... renceGuide

It will be impossible to debug the comms without a device to test against. If the protocol timing is off, it will be hard to test any code changes.

How useful is this? Subaru users can log TCU, but I've only ever heard from a couple of them, and there are thousands of Subaru owners logging compared to, what, five or six Nissan users I see here ;-)
If useful I can look at getting a TCU to test against in my spare time.


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 05, 2021 7:17 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
dschultz wrote:
How useful is this? Subaru users can log TCU, but I've only ever heard from a couple of them, and there are thousands of Subaru owners logging compared to, what, five or six Nissan users I see here ;-)
If useful I can look at getting a TCU to test against in my spare time.

Yeaaaa, it's probably safe to say you could count the active RR Logger Nissan users on one hand haha Hopefully the number will grow over time, though. But the ABS module is useless to datalog. It would really on "need" to be loggable just to say it is. But the TCM would be extremely beneficial to datalog. Not anytime soon, but eventually I'm going to get the TCM reflashing worked out. So being able to datalog specific RAM addresses to figure out TCM logic would be necessary. But you're talking about something being beneficial for ONE person only, as most automatic owners aren't tuning their ECU's, let alone having the knowledge on tuning a TCM lol

I will say though, Nissan Datascan 2 can datalog the TCM AND ABS CIDs through a VAG-COM cable. So I could sniff that TCM and ABS connection and see what's going on.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 05, 2021 7:50 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
For sure some captures would be helpful.


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Thu Dec 09, 2021 7:31 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
dschultz wrote:
For sure some captures would be helpful.

Do you happen to know of any softwares that would be able to sniff the messages being sent through the VAG-COM cable? I have some old wireshark captures, but I'm not quite sure how to interpret the data. There's a good chance it's just gibberish and doesn't actually contain any of the proper K-line commands, but just thought I'd share so you could take a look.


You do not have the required permissions to view the files attached to this post.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Thu Dec 09, 2021 8:57 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
I just use a Y-cable and another serial software like PuTTY to capture the data.
I'll have a look at the captures, are they taken at the USB interface of the VAG-COM with Wireshark?

EDIT: yes these captures are taken at the USB end of the cable.
This is the ECU connect data:
Code:
83fc10c15d8f3c
021a819d
075a314346343844cb
021a809c
035a00005d
0522110004013d
07621100e4419a619a
0522112004015d
076211203c2c09818c
0522114004017d
076211401f0600c1a0
0522116004019d
0762116020000000fa
0522120004013e
07621200b7af00f1d2
0522122004015e
07621220ec6013fff9
05221301040140
0562130100007b
05221302040141
05221302040141
05621302053fc0
05221303040142
05221303040142
056213033030dd
05221304040143
05221304040143
0562130480908e
05221305040144
05221305040144
0562130548440b
05221307040146
05221307040146
056213070042c3
05221308040147
05221308040147
0562130801088b
05221309040148
05221309040148
05621309100295
0522130a040149
0522130a040149
0562130a1010a4
0522130b04014a
0522130b04014a
0562130b0033b8
0522130d04014c
0522130d04014c
0562130d103fd6
02300032
067000e0d00081a7
02302052
067020007834c103
02304072
06704000000001b7
023b003d
067b00dffff0004f
02310033
067100ae00000025
3f017e7f


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Thu Dec 09, 2021 11:30 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
For real? That's awesome! Thanks for checking it out! It's already obvious just from the ECU connect code that NDS2 handles it much differently than what we do. I'm currently working on some notepad++ regex stuff to see just how neat I can make this look to help with analysis.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Fri Dec 10, 2021 12:02 am 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
It would appear that timing parameters are identical between the ECU and TCM.

Code:
TCM Connect:

$81 18 FC 81 16 (Start Communication)

$83 FC 18 C1 5D 8F 44 (Access Timing Parameter)

02 $1A 81 9D (Return ECU ID)
07 5A 20 43 46 34 30 41 AF

02 $1A 80 9C (Return ECU ID)
03 5A 01 08 66

05 $22 11 00 04 01 3D (Checks $22 Support)

01 $3E 3F  (Tester is Present)

ECU Connect:

$81 10 FC 81 0E (Start Communication)

$83 FC 10 C1 5D 8F 3C (Access Timing Parameters)

02 $1A 81 9D (Return ECU ID)

02 $1A 80 9C (Return ECU ID)

05 $22 11 00 04 01 3D (Checks $22 Support)

01 $3E 3F (Tester Present)




Code:
TCM Checksum Error Log from RR:

$81 18 FC 81 16 (Start Communication)

$83 FC 18 C1 5D 8F 44 (Access Timing Parameters)

02 $1A 81 9D (Return ECU ID)
07 5A 20 43 46 34

$81 18 FC 82 17 (Start Communication, but with the last two bytes changed. Possible that this is just a $82 stop communication request?)
30 41 AF
Response checksum match failure. Expected: 0A, Actual: 34 (From the "Return ECU ID" response)

TCM Response Error Log:
$81 18 FC 81 16

$83 FC 18 C1 5D 8F 44

02 $1A 81 9D
07 5A

$81 18 FC 82 17
20 43 46 34 30 41 AF
Error: Invalid Response Length

So the issue is that RR is splitting the TCM ID response into two separate responses. The normal response (as seen in the NDS2 log) is "07 5A 20 43 46 34 30 41 AF", but RR is splitting this response into two separate responses, causing it to throw checksum and response length errors. Also, it tries to re-establish comms during the split, but I'm not quite sure why?

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Fri Dec 10, 2021 6:04 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Pytrex wrote:
So the issue is that RR is splitting the TCM ID response into two separate responses. The normal response (as seen in the NDS2 log) is "07 5A 20 43 46 34 30 41 AF", but RR is splitting this response into two separate responses, causing it to throw checksum and response length errors. Also, it tries to re-establish comms during the split, but I'm not quite sure why?
RR is not splitting anything. That's what the J2534 cable provided. Split responses happens when the module doesn't reply with all the data in a timely fashion. Then the J2534 cable sends up to the application a partial packet, resulting in an error.
Maybe try different timing values, adjust it in NCS in the logger.xml.


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Fri Dec 10, 2021 6:11 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
dschultz wrote:
RR is not splitting anything. That's what the J2534 cable provided. Split responses happens when the module doesn't reply with all the data in a timely fashion. Then the J2534 cable sends up to the application a partial packet, resulting in an error.
Maybe try different timing values, adjust it in NCS in the logger.xml.

Ahhhh, it's starting to make more sense now. I was confused as to why RR would ever split messages, so it's good to know that it's just needing a longer delay! I'll definitely have to experiment to see what values can help out!

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sat Dec 11, 2021 9:25 am 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
TCM Problems:
Adjusting the p1_max volume seems to solve the response issues! Setting it to 5 (ms?) allows for the TCM to connect. While it DOES actually work for a few parameters, the "Next Gear Position" CID is throwing an error now. Is this caused by having an incorrectly defined byte size for a parameters? Because RR logger has no issues reading 8 of 8 bytes even with the TCM. And since it's actually reading the full messsage, but then saying "read 5 of 6 bytes", that means it's presumably choosing to do so.


Code:
Simplified:
05 $AC 81 02 13 0D 54
02 EC 81 6F

04 $21 81 04 01 AB
04 61 81 00 FF E5

Then, RR interprets the 6-byte total as only having 5 bytes, resulting in it reading:
04 61 81 00 FF

And then throwing a checksum error.


ABS Problems:
The ABS error is just because CID 1500 isn't supported. So while ABS logging really isn't all that useful, technically it would be good if it could understand that a 7F response to a CID check marks the end of supported CIDs.
Code:
05 $22 15 00 04 01 41
03 7F 22 10 B4
Error caused by 7F response.

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sat Dec 11, 2021 1:36 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Pytrex wrote:
TCM Problems:
Code:
04 $21 81 04 01 AB
04 61 81 00 FF E5
This is returning a word (16 bits) "00FF", not a byte (8 bits) of data.


Pytrex wrote:
ABS Problems:
Code:
05 $22 15 00 04 01 41
03 7F 22 10 B4
Error caused by 7F response.
7F is does not mean the end of CIDs, 7F means "negativeResponse Service Id" and 10 means generalReject. We would need to drop the query for 2215 from the init request to allow it to proceed. The init is currently setup to query 2211, 2212, 2213, and 2215. If 2215 will never be used we can drop it in the future.


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sat Dec 11, 2021 11:33 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
dschultz wrote:
This is returning a word (16 bits) "00FF", not a byte (8 bits) of data.

So it is a definition error, how strange. Not sure why Nissan thought it was necessary to make a 1-5 gear position value a word value, but whatever lol

Quote:
7F is does not mean the end of CIDs, 7F means "negativeResponse Service Id" and 10 means generalReject. We would need to drop the query for 2215 from the init request to allow it to proceed. The init is currently setup to query 2211, 2212, 2213, and 2215. If 2215 will never be used we can drop it in the future.

Is there a specific response that signifies the end of CIDs? I was just thinking that since it errored, it meant that it could be implied that the requested CIDs don't even exist for the ABS module.

As for 2215, it might be certain switches, but they're all completely undefined in the logger (even though there are quite a few that are enabled in the supmask for CF48D). Couldn't the logger be setup to just notice the error, but keep running as if it didn't happen? Since it's just a CID check, I'm sure there aren't many normal instances that it returns a 7F 22 10 error. Bu then again, it's my first time seeing a CID request throw an error lol

I'll definitely need to mess with RR logger's code sometime so that way I can be of more use with some of these more personal endeavors :P

_________________
NissanDefinitions Repository


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 12, 2021 10:23 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Pytrex wrote:
Is there a specific response that signifies the end of CIDs? I was just thinking that since it errored, it meant that it could be implied that the requested CIDs don't even exist for the ABS module.
Yes the end of CIDs has the last bit = 0.
Once you figure out some useful 2215 parameters they can be added to the Logger.xml anytime.
I'll have to look at how to handle the 7F response differently. The Logger is expecting some data and 7F returns the wrong amount of data so it is handled as a comms error right now.


Top
 Profile  
 
 Post subject: Re: Logger - Error When Attempting to Log TCM or ABS Module
PostPosted: Sun Dec 12, 2021 1:23 pm 
Offline
RomRaider Donator
User avatar

Joined: Fri Jul 26, 2019 3:35 am
Posts: 789
Location: United States of America
dschultz wrote:
Yes the end of CIDs has the last bit = 0.

Huh. I suppose I'll have to checkout the ABS logs and do some personal testing with Nisprog to see if I can figure anything out.

Quote:
Once you figure out some useful 2215 parameters they can be added to the Logger.xml anytime.

I'll definitely send you the updated def once I finish it up! It looks like 2215 is going to be emissions info, such as emissions readiness testing and such.

_________________
NissanDefinitions Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl