RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sun Aug 14, 2022 3:37 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Trying to add Mazda ECU compatibility - Running into issues
PostPosted: Wed Jan 22, 2020 3:49 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
So I apologize in advance if I am not explaining this well, but I am essentially trying to allow for the logger to work with my 04 Mazda RX-8 ECU.

Right now, I am just trying to do OBD over CAN.. but would like to in the future allow for enhanced data PIDs. One step at a time.

Anyways:

The issue I am running into happens that when Romraider sends the message on the bus to capture the Cal ID of the module to try to look in the XML for PID support. It looks like there is some array overflow for the data returned to build the Cal ID string.. but I'm not quite sure where this is happening. It is clear that the Mazda Cal ID (N3Z2EU00013H6020) is longer than the support Subaru ones (at least from what I can tell?).

Below is my log (I added some extra things in from the main branch of software):
Code:
35478 DEBUG [Thread-9] - QueryManager started.
35479 DEBUG [Thread-9] - Found J2534 Vendor:Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM | Library:C:\WINDOWS\SysWOW64\op20pt32.dll
35479 DEBUG [Thread-9] - Found J2534 Vendor:Vector PassThru XL Library | Library:C:\Program Files (x86)\Vector PassThru XL Library\VectorPassThruXL32.dll
35479 INFO  [Thread-9] - Re-trying previous J2534/ISO15765 connection: Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM
35492 INFO  [Thread-9] - J2534 Version => firmware: 1.17.4822, dll: 1.02.4798 Jun 13 2016 17:16:24, api: 04.04
35497 DEBUG [Thread-9] - J2534/ISO15765 success: deviceId:6, channelId:8, msgId:0
35497 INFO  [Thread-9] - J2534/ISO15765 connection initialized
35497 DEBUG [Thread-9] - ECU Calibration ID Request  ---> 000007E00904
35497 TRACE [Thread-9] - Write Msg: [protocolID=6 | rxStatus=0x00 | txFlags=0x40 | timestamp=0x0 | dataSize=6 | extraDataIndex=0 | data=000007E00904]
35498 TRACE [Thread-9] - Read # Msg: [protocolID=6 | rxStatus=0x09 | txFlags=0x00 | timestamp=0x1f7def4 | dataSize=4 | extraDataIndex=0 | data=000007E0]
35552 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35605 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35658 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35712 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35765 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35818 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35871 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35924 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
35978 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36010 TRACE [Thread-9] - Read # Msg: [protocolID=6 | rxStatus=0x02 | txFlags=0x00 | timestamp=0x1ffad80 | dataSize=4 | extraDataIndex=0 | data=000007E8]
36063 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36116 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36169 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36223 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36276 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36330 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36384 TRACE [Thread-9] - Read # Msg: [protocolID=0 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x0 | dataSize=0 | extraDataIndex=0 | data=]
36435 TRACE [Thread-9] - Read # Msg: [protocolID=6 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x2062a08 | dataSize=23 | extraDataIndex=23 | data=000007E84904014E335A32455530303031334836303230]
36437 DEBUG [Thread-9] - ECU Calibration ID Response <--- 000007E84904014E335A32455530303031334836303230
36437 DEBUG [Thread-9] - ECU Calibration ID Response Length: 23
36437 DEBUG [Thread-9] - ECU Calibration ID Processed Response <--- 000007E84904014E335A324555303030313348363032300000000000000000000000000000000000000000000000
36437 DEBUG [Thread-9] - Parsed the response
36437 DEBUG [Thread-9] - j=8
36437 DEBUG [Thread-9] - response[j]=33
36437 DEBUG [Thread-9] - j=9
36437 DEBUG [Thread-9] - response[j]=5A
36437 DEBUG [Thread-9] - j=10
36437 DEBUG [Thread-9] - response[j]=32
36437 DEBUG [Thread-9] - j=11
36437 DEBUG [Thread-9] - response[j]=45
36437 DEBUG [Thread-9] - j=12
36437 DEBUG [Thread-9] - response[j]=55
36437 DEBUG [Thread-9] - j=13
36437 DEBUG [Thread-9] - response[j]=30
36437 DEBUG [Thread-9] - j=14
36437 DEBUG [Thread-9] - response[j]=30
36437 DEBUG [Thread-9] - j=15
36438 DEBUG [Thread-9] - response[j]=30
36438 DEBUG [Thread-9] - j=16
36438 DEBUG [Thread-9] - response[j]=31
36438 DEBUG [Thread-9] - j=17
36438 DEBUG [Thread-9] - response[j]=33
36438 DEBUG [Thread-9] - j=18
36438 DEBUG [Thread-9] - response[j]=48
36438 DEBUG [Thread-9] - j=19
36438 DEBUG [Thread-9] - response[j]=36
36438 DEBUG [Thread-9] - j=20
36438 DEBUG [Thread-9] - response[j]=30
36438 DEBUG [Thread-9] - j=21
36438 DEBUG [Thread-9] - response[j]=32
36438 DEBUG [Thread-9] - j=22
36438 DEBUG [Thread-9] - response[j]=30
36438 DEBUG [Thread-9] - j=23
36439 DEBUG [Thread-9] - J2534/ISO15765 stopped message filter:0
36439 DEBUG [Thread-9] - J2534/ISO15765 disconnected channel:8
36441 INFO  [Thread-9] - J2534/ISO15765 closed connection to device:6
36441 DEBUG [Thread-9] - Error sending init
java.lang.sx: 23
   at com.romraider.logger.ecu.comms.io.connection.OBDLoggerConnection.ecuInit(Unknown Source)
   at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(Unknown Source)
   at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


It looks like it's having a hard time trying to put together the calId array in OBDLoggerConnection, but i don't really see a reason why THAT would overflow.. but I am also confused what's happening.

Specifically I think this part is giving me trouble:

Code:
    @Override
    // Build an init string similar to the SSM version so the logger definition
    // can reference supported parameters with ecubyte/bit attributes.
    public void ecuInit(EcuInitCallback callback, Module module) {
        final byte[] processedResponse = new byte[46];
        final byte[] request = protocol.constructEcuInitRequest(module);
        LOGGER.debug(String.format("%s Calibration ID Request  ---> %s",
                module, asHex(request)));
        final byte[] tmp = manager.send(request);
        final byte[] response = protocol.preprocessResponse(
                request, tmp, new PollingStateImpl());
        LOGGER.debug(String.format("%s Calibration ID Response <--- %s",
                module, asHex(response)));
        System.arraycopy(response, 0, processedResponse, 0, response.length);
        int j = 7;
        while (response[j] != 0 && j < response.length) { j++; }
        final byte[] calIdStr = new byte[j - 7];
        System.arraycopy(response, 7, calIdStr, 0, j - 7);
        System.arraycopy(calIdStr, 0, processedResponse, 5, 8);
        LOGGER.info(String.format("%s Calibration ID: %s", module, new String(calIdStr)));


Does anyone have any insight on how romraider treats Cal IDs returned over CAN or how this array works? I'm really confused and wondering how I need to change this.

Also yes, I did add my Cal ID to the XML with bogus parameters to be able to see if it can grab it, which I never got to that point so..

Also, also, when I just stub the return that looks for the cal to always be true (read: ignored looking for PIDs supported and just blasts em) everything works okay-ish and I can read data from the Mazda.. but I am trying to make it less ghetto and better defined for proper PID support.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Wed Jan 22, 2020 9:17 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7031
Location: Canada eh!
The SSM init string we are trying to emulate is described here, scroll down to the "Capability Bits" section.
http://www.romraider.com/index.php/RomR ... smProtocol

OBD-II supported PIDs look like this:
https://en.wikipedia.org/wiki/OBD-II_PI ... _01_PID_00

The CAL ID provided, we are only interested in the first 8 bytes and then we append the "Capability Bits" to that.

Maybe provide a TRACE level rr_system.log for the init sequence.


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Thu Jan 23, 2020 11:53 am 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
dschultz wrote:
The SSM init string we are trying to emulate is described here, scroll down to the "Capability Bits" section.
http://www.romraider.com/index.php/RomR ... smProtocol

OBD-II supported PIDs look like this:
https://en.wikipedia.org/wiki/OBD-II_PI ... _01_PID_00

The CAL ID provided, we are only interested in the first 8 bytes and then we append the "Capability Bits" to that.

Maybe provide a TRACE level rr_system.log for the init sequence.


Good info on the CAL ID. Kinda assumed this was the case. For my testing, I was just simulating in vehicle by sending the first 8 bytes of the Subaru CAL ID over CAN to see how the software worked, and figured my Mazda ID being longer was causing problems.. sounds like it's not the case. I don't have a CAN Subaru to test with to confirm so I need to work on my simulation to compare I supposed

Thanks for the info.

As far as the log for the init sequence, I'm a bit confused at what you're asking for. I don't think the software makes it that far in the process, unless I am not understanding the sequence of events properly.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Thu Jan 23, 2020 9:05 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7031
Location: Canada eh!
After the ID query it should proceed to check the OBD-II capability bits (supported PIDs).
This is what it looks like for a Subaru diesel.
Code:
8422  DEBUG [Thread-5] - QueryManager started.
9055  DEBUG [Thread-5] - Found J2534 Vendor:Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM | Library:C:\Windows\system32\op20pt32.dll
9062  INFO  [Thread-5] - Re-trying previous J2534/ISO15765 connection: Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM
9149  INFO  [Thread-5] - J2534 Version => firmware: 1.14.4010, dll: 1.00.3707 Dec 28 2012 19:28:21, api: 04.04
9171  DEBUG [Thread-5] - J2534/ISO15765 success: deviceId:1, channelId:3, msgId:0
9171  INFO  [Thread-5] - J2534/ISO15765 connection initialized
9178  DEBUG [Thread-5] - ECU Calibration ID Request  ---> 000007DF0904
9193  DEBUG [Thread-5] - ECU Calibration ID Response <--- 000007E849040139393146343431410000000000000000
9193  INFO  [Thread-5] - ECU Calibration ID: 991F441A
9193  DEBUG [Thread-5] - ECU PID Group 00 Request  ---> 000007DF0100
9201  DEBUG [Thread-5] - ECU PID Group 00 Response <--- 000007E84100983B8013
9201  DEBUG [Thread-5] - ECU PID Group 20 Request  ---> 000007DF0120
9208  DEBUG [Thread-5] - ECU PID Group 20 Response <--- 000007E84120A001A015
9208  DEBUG [Thread-5] - ECU PID Group 40 Request  ---> 000007DF0140
9216  DEBUG [Thread-5] - ECU PID Group 40 Response <--- 000007E8414044D00000
9216  DEBUG [Thread-5] - ECU Init Response <--- 000007E8413939314634343141983B8013A001A01544D000000000000000000000000000000000000000000000
9219  INFO  [Thread-5] - ECU ID = 9911D87407
9220  INFO  [AWT-EventQueue-0] - CAL ID: 991F441A, Car: 2010 EDM Subaru Impreza 2.0 Diesel MT

I think the problem lies in the fact that your CAL ID reply has no 0x00 values in it. This code is looking for a 0x00 and setting j to that position.
/romraider/src/main/java/com/romraider/logger/ecu/comms/io/connection/OBDLoggerConnection.java
Code:
while (response[j] != 0 && j < response.length) { j++; }
j is the array length.
It will then toss the first part of the CAL ID away and only use the last 7 bytes.
Code:
final byte[] calIdStr = new byte[j - 7];
System.arraycopy(response, 7, calIdStr, 0, j - 7);

These are the bytes that have to match an ECU definition string.


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Thu Jan 23, 2020 10:58 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
dschultz wrote:
After the ID query it should proceed to check the OBD-II capability bits (supported PIDs).


Yeah, the program doesn't get that far before it dies.

dschultz wrote:
I think the problem lies in the fact that your CAL ID reply has no 0x00 values in it. This code is looking for a 0x00 and setting j to that position.
/romraider/src/main/java/com/romraider/logger/ecu/comms/io/connection/OBDLoggerConnection.java
Code:
while (response[j] != 0 && j < response.length) { j++; }
j is the array length.
It will then toss the first part of the CAL ID away and only use the last 7 bytes.
Code:
final byte[] calIdStr = new byte[j - 7];
System.arraycopy(response, 7, calIdStr, 0, j - 7);

These are the bytes that have to match an ECU definition string.


Yeah I thought the && may have been the issue, so I tried setting it to an ||stead of an && (little unstable, but I figured there shouldn't be a 0 value for any ascii char in a cal ID), and it still dies.

This is encompassed in the log I posted earlier.

It looks like it dies before it can create an array with size j-7.. or it's dying there... maybe I'm unclear.

This is my modified code encompassed in the log from above too:

Code:
 public void ecuInit(EcuInitCallback callback, Module module) {
        final byte[] processedResponse = new byte[46];
        final byte[] request = protocol.constructEcuInitRequest(module);
        LOGGER.debug(String.format("%s Calibration ID Request  ---> %s",
                module, asHex(request)));
        final byte[] tmp = manager.send(request);
        final byte[] response = protocol.preprocessResponse(
                request, tmp, new PollingStateImpl());
        LOGGER.debug(String.format("%s Calibration ID Response <--- %s",
                module, asHex(response)));
        LOGGER.debug(String.format("%s Calibration ID Response Length: %s", module, response.length));
        System.arraycopy(response, 0, processedResponse, 0, response.length);
        LOGGER.debug(String.format("%s Calibration ID Processed Response <--- %s",
                module, asHex(processedResponse)));
        LOGGER.debug(String.format("Parsed the response"));
        int j = 7;
        while ((response[j] != 0) || (j <= response.length)) {
              LOGGER.debug(String.format("j=%s",j));
              LOGGER.debug(String.format("response[j]=%s",asHex(response[j])));
              j++;
           }
        LOGGER.debug(String.format("j outside of loop=%s",j));
        final byte[] calIdStr = new byte[j - 7];
        System.arraycopy(response, 7, calIdStr, 0, j - 7);
        System.arraycopy(calIdStr, 0, processedResponse, 5, 8);
        LOGGER.info(String.format("%s Calibration ID: %s", module, new String(calIdStr)));


Maybe I am missing something fairly obvious... I do C programming so going back to old Java is driving me nuts haha.

Let me keep staring at it and see if anything sticks out.

Thanks for the replies.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Sat Jan 25, 2020 12:01 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7031
Location: Canada eh!
If you know C then you know 0x00 terminates a string. That's what that line of code is doing, looking for the end of the string. Since the CAL ID response has no 0x00, then j is just the length of the String.
The last 7 bytes are copied to calIdStr which ultimately is copied to the init response byte array before the capabilities bytes are requested.
I don't see why it would fail to proceed to the next stage.
The rr_system.log snip didn't provide the line number of the failure. Since you've modified the code I can't reconcile it against the current source.


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Sun Jan 26, 2020 4:51 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
Here's the log from an official RR logger release and from actual in car data (was simulating it on my bench before, but I don't think that was an issue)

Just dumping more info in this thread.

Code:
16442 DEBUG [Thread-6] - Found J2534 Vendor:Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM | Library:C:\WINDOWS\SysWOW64\op20pt32.dll
16442 DEBUG [Thread-6] - Found J2534 Vendor:Vector PassThru XL Library | Library:C:\Program Files (x86)\Vector PassThru XL Library\VectorPassThruXL32.dll
16442 INFO  [Thread-6] - Re-trying previous J2534/ISO15765 connection: Tactrix Inc. - OpenPort 2.0 J2534 ISO/CAN/VPW/PWM
16454 INFO  [Thread-6] - J2534 Version => firmware: 1.17.4822, dll: 1.02.4798 Jun 13 2016 17:16:24, api: 04.04
16459 DEBUG [Thread-6] - J2534/ISO15765 success: deviceId:9, channelId:11, msgId:0
16459 INFO  [Thread-6] - J2534/ISO15765 connection initialized
16459 DEBUG [Thread-6] - ECU Calibration ID Request  ---> 000007E00904
16460 TRACE [Thread-6] - Write Msg: [protocolID=6 | rxStatus=0x00 | txFlags=0x40 | timestamp=0x0 | dataSize=6 | extraDataIndex=0 | data=000007E00904]
16461 TRACE [Thread-6] - Read Msg: [protocolID=6 | rxStatus=0x09 | txFlags=0x00 | timestamp=0x50b7dfaa | dataSize=4 | extraDataIndex=0 | data=000007E0]
16463 TRACE [Thread-6] - Read Msg: [protocolID=6 | rxStatus=0x02 | txFlags=0x00 | timestamp=0x50b7e15d | dataSize=4 | extraDataIndex=0 | data=000007E8]
16465 TRACE [Thread-6] - Read Msg: [protocolID=6 | rxStatus=0x00 | txFlags=0x00 | timestamp=0x50b7ea72 | dataSize=23 | extraDataIndex=23 | data=000007E84904014E335A32455530303031334836303230]
16467 DEBUG [Thread-6] - ECU Calibration ID Response <--- 000007E84904014E335A32455530303031334836303230
16467 DEBUG [Thread-6] - J2534/ISO15765 stopped message filter:0
16468 DEBUG [Thread-6] - J2534/ISO15765 disconnected channel:11
16469 INFO  [Thread-6] - J2534/ISO15765 closed connection to device:9
16469 DEBUG [Thread-6] - Error sending init
java.lang.sx: 23
   at com.romraider.logger.ecu.comms.io.connection.OBDLoggerConnection.ecuInit(OBDLoggerConnection.java:86)
   at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.doEcuInit(QueryManagerImpl.java:178)
   at com.romraider.logger.ecu.comms.manager.QueryManagerImpl.run(QueryManagerImpl.java:149)
   at java.lang.Thread.run(Unknown Source)


Looks like now it's showing me a place where it's getting caught up in.


Here's also raw bus data just for extra stuff to confuse everyone haha:

Time Chn ID Name Event Type Dir DLC Data length Data
161.773126 CAN 1 7E0 CAN Frame Rx 8 8 02 09 04 00 00 00 00 00
161.773543 CAN 1 7E8 CAN Frame Rx 8 8 10 13 49 04 01 4E 33 5A
161.773831 CAN 1 7E0 CAN Frame Rx 8 8 30 00 00 00 00 00 00 00
161.774735 CAN 1 7E8 CAN Frame Rx 8 8 21 32 45 55 30 30 30 31
161.775727 CAN 1 7E8 CAN Frame Rx 8 8 22 33 48 36 30 32 30 00

Everything looks like it's doing what it should for what that's worth.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Thu Jan 30, 2020 9:10 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7031
Location: Canada eh!
dschultz wrote:
Since the CAL ID response has no 0x00, then j is just the length of the String.

Code:
 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22
00 00 07 E8 49 04 01 4E 33 5A 32 45 55 30 30 30 31 33 48 36 30 32 30

Since j = 23, that, as an index position is 1 past the end of the string array. So an array copy using 23 as an index position will fail. j can't be larger than 22.
You could try to check j such as:
Code:
if (j == response.length) { j--; }
That should at least fix the index issue.


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Fri Jan 31, 2020 3:08 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
Will give that a shot this weekend.

So with that addition it looks like I'll just have to add my cal ID string in the XML to match what would be returned/looked at by the software and then from there I can populate supported PIDs as needed.

We'll see how this goes.

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Sat Feb 01, 2020 1:32 pm 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
Well I got OBD stuff to work just by adding a try catch statement in. It grabs the entire CAL ID and does fit into the array.

I'm just realizing now that for OBD logging it doesn't even care about the CAL ID, which makes sense because duh.. you can request the supported PIDs from the module.

Anyways, in order to get extended PIDs from the ECU I need to make a whole new interface, so I guess I'll do that next now that I've at least gotten past being able to get the CAL ID

_________________
98 Impreza RS - V8 STi EJ207 Swapped


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Sun Feb 02, 2020 3:22 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7031
Location: Canada eh!
Which extended PIDs are you referring to?

The NCS protocol class can resolve supported mode 21 & 22 PIDs.


Top
 Profile  
 
 Post subject: Re: Trying to add Mazda ECU compatibility - Running into iss
PostPosted: Mon Feb 03, 2020 11:05 am 
Offline
Newbie

Joined: Tue Nov 21, 2017 7:56 pm
Posts: 61
dschultz wrote:
Which extended PIDs are you referring to?

The NCS protocol class can resolve supported mode 21 & 22 PIDs.


See, I'm glad I just posted random updates because I didn't even think to look in the NCS stuff because "why would I care about Nissan" .

I think I can just use that module after look at some of the code. Thanks for stating the obvious because it wasn't obvious to me haha :)

_________________
98 Impreza RS - V8 STi EJ207 Swapped


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

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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