BrianHumlicek / J2534-Sharp

A .Net interface for J2534 vehicle communications.
Other
43 stars 14 forks source link

Fast Init not working? #24

Closed Nii-Saan closed 1 year ago

Nii-Saan commented 2 years ago

When i try to fast init with the correct message I end up getting a GetLastError failed with result Failed. I am trying to connect with the message 0x81, 0x10, 0xFC, 0x81, 0x0E but it only returns an error. Is there some specific way you have to go about setting up the device for fast init?

I currently setup a device in a class like so

public J2534Device(string DLLFilename, Protocol protocol, Baud baud, ConnectFlag flags = ConnectFlag.NONE)                
                _api = APIFactory.GetAPI(DLLFilename);
                _device = _api.GetDevice();
                _channel = Device.GetChannel(protocol, baud, flags);

I am initalizing it as such(Its a KWP2000 vehicle)

                    J2534Device j2534 = new J2534Device(_apiInfo.Filename, Protocol.ISO14230, Baud.ISO14230);
                    SConfig[] configList = new SConfig[2] { new SConfig(Parameter.LOOP_BACK, 0), new SConfig(Parameter.DATA_RATE, 10400) };
                    j2534.SetConfig(configList);
                    j2534.SetFilter(new byte[] { 0x00 }, UserFilterType.PASSALL) ;

then i try to send the fast init right after that. Am i going about it wrong?

BrianHumlicek commented 2 years ago

I’m not sure off hand. Sometimes these kind of things are manufacturer specific. If you have another diagnostic tool you can sniff, that might be a good option. Otherwise, does your 2534 device support logging (Drewtech does)? If so, that can be really helpful to figure out what you may need to get it to work.

Brian

Nii-Saan commented 2 years ago

So my message I'm sending is what we would send over a dumb cable (kkl) to get it to init just trying to use a more modern cable so we can work with newer nissans. The databytes I'm trying to send are 100% the correct ones. Checksum manually calculated and included.

On Fri, Jun 3, 2022, 4:47 PM BrianHumlicek @.***> wrote:

I’m not sure off hand. Sometimes these kind of things are manufacturer specific. If you have another diagnostic tool you can sniff, that might be a good option. Otherwise, does your 2534 device support logging (Drewtech does)? If so, that can be really helpful to figure out what you may need to get it to work.

Brian

— Reply to this email directly, view it on GitHub https://github.com/BrianHumlicek/J2534-Sharp/issues/24#issuecomment-1146459639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWPPSKKLPKMW2LR4KLXYRLVNKKSDANCNFSM5X2JBDBA . You are receiving this because you authored the thread.Message ID: @.***>

BrianHumlicek commented 1 year ago

Did this ever get resolved?

Nii-Saan commented 1 year ago

No i believe we ever resolved the issue, we started working on other things in the program. Still have yet to solve the 5baud init.

prj commented 1 year ago

Fast- and slow init works perfectly fine in this library, this is an end-user / hardware problem.

Nii-Saan commented 1 year ago

Possibly a hardware issue. I have ran into a couple using an openport 2.0, I did manage to recently get it working but it was a hacky fix to get operating correctly.

On Sat, Apr 8, 2023 at 1:27 PM prj @.***> wrote:

Fast- and slow init works perfectly fine in this library, this is an end-user / hardware problem.

— Reply to this email directly, view it on GitHub https://github.com/BrianHumlicek/J2534-Sharp/issues/24#issuecomment-1500971868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUWPPSI44JNKN4RVSKKH3BLXAHC4FANCNFSM5X2JBDBA . You are receiving this because you authored the thread.Message ID: @.***>

prj commented 1 year ago

There are no issues on the OP2.0 with fast and slow init whatsoever. Most likely you need to read the ISO14230-2 spec better.

Nii-Saan commented 1 year ago

it was a hardware issue but not with the openport, it was a failing ecu on the bench, replaced with an identical ecu and it worked without any modification. (Also we were about 2 years out of date on the library, so could have been related to that as well.)

BrianHumlicek commented 1 year ago

Glad to hear its working.