Avt 852 not working with vpwexplorer or older tuner cat programs help

Programs / Tools / Scripts
kur4o
Posts: 955
Joined: Sun Apr 10, 2016 9:20 pm

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by kur4o »

You can also use a serial port sniffer like eltima to see the actual communication between pc and tool.
User avatar
antus
Site Admin
Posts: 8253
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by antus »

04colyZQ8 wrote: Sun Jan 14, 2024 1:01 am Also I don’t see that adding a case for the 853 would help? Because the 853 will still arrive at the same case 27, without modified code. And it should respond to all the same commands. So vpwexplorer so would only print 852 Instead of 853.
Each model returns a different reponse to the "AVT Reset" command. The differences tell PCMLibrary which model it is, and it changes its behavior just a little so that it works with supported models. It's not just that the command is responded to, its the content of the response. Get PCMHammer working first, then you can figure out how to build vpw explorer. I havn't built this, but I assume its in the project solution. If you get hammer building you can modify the error message to tell you what was in the byte that is being checked for 853.

If you want more help your going to need to post debug logs, just saying it doesn't work doesn't give us anything to see why.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

Ok I’ll try to get some logs. The 853 responds exactly as the 852. So far as I can tell.
User avatar
antus
Site Admin
Posts: 8253
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by antus »

Post a debug log of where it fails to init
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

found source for vpw added debug line
Debug.WriteLine("Initializing " + this.ToString());

here is the log:

PCM Logger
[03:02:12:029] Thursday, January 18 2024 @03:02:12:02
[03:02:12:030] Initializing AVT (838/842/852) on Select...
[03:02:12:031] Unable to initialize AVT (838/842/852) on Select...
[03:02:12:032] System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The given port name does not start with COM/com or does not resolve to a valid serial port.
Parameter name: portName
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at PcmHacking.StandardPort.PcmHacking.IPort.OpenAsync(PortConfiguration configuration) in C:\Users\jake_\Downloads\New folder\PcmHacks-develop\Apps\PcmLibraryWindowsForms\Ports\StandardPort.cs:line 70
at PcmHacking.AvtDevice.<Initialize>d__20.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at PcmHacking.Vehicle.<ResetConnection>d__29.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at PcmHacking.MainFormBase.<InitializeCurrentDevice>d__23.MoveNext() in C:\Users\jake_\Downloads\New folder\PcmHacks-develop\Apps\PcmLibraryWindowsForms\MainFormBase.cs:line 182
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.ArgumentException: The given port name does not start with COM/com or does not resolve to a valid serial port.
Parameter name: portName
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at PcmHacking.StandardPort.PcmHacking.IPort.OpenAsync(PortConfiguration configuration) in C:\Users\jake_\Downloads\New folder\PcmHacks-develop\Apps\PcmLibraryWindowsForms\Ports\StandardPort.cs:line 70
at PcmHacking.AvtDevice.<Initialize>d__20.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at PcmHacking.Vehicle.<ResetConnection>d__29.MoveNext()
---> (Inner Exception #0) System.ArgumentException: The given port name does not start with COM/com or does not resolve to a valid serial port.
Parameter name: portName
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
at PcmHacking.StandardPort.PcmHacking.IPort.OpenAsync(PortConfiguration configuration) in C:\Users\jake_\Downloads\New folder\PcmHacks-develop\Apps\PcmLibraryWindowsForms\Ports\StandardPort.cs:line 70
at PcmHacking.AvtDevice.<Initialize>d__20.MoveNext()<---
<---
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

the avtdevice.cs file from working universal patcher is very similar to the vpwexplorer avtdevice.cs that doesn't work!
this code is different could it be why?
public override bool Initialize(int BaudRate, J2534InitParameters j2534Init)
kur4o
Posts: 955
Joined: Sun Apr 10, 2016 9:20 pm

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by kur4o »

It points to unable to open COM port, if pcmhammer doesn`t initialize baud that might be the reason it fails.
avt852 doesn`t care for baud, modded avt853 should have correct baud rate.
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

[03:43:54:164] PCM Logger
[03:43:54:165] Thursday, January 18 2024 @03:43:54:14
[03:43:54:166] Initializing AVT (838/842/852) on COM4
[03:43:54:166] Sending 'reset' message.
[03:43:55:170] Waited 2seconds.. no data present
[03:43:55:171] AVT device not found or failed reset
[03:43:55:172] Unable to initialize AVT (838/842/852) on COM4

Sometimes I get this error log instead with the new cable
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

[04:04:04:472] PCM Logger
[04:04:04:475] Thursday, January 18 2024 @04:04:04:45
[04:04:04:477] Initializing AVT (838/842/852) on COM4
[04:04:04:478] Initializing AVT (838/842/852) on COM4
[04:04:04:479] Sending 'reset' message.
[04:04:04:480] Sending 'reset' message.
[04:04:14:481] Trace: ReadAVTPacket
[04:04:14:485] Waited 2seconds.. no data present
[04:04:14:487] This is m Timeout
[04:04:14:489] AVT device not found or failed reset
[04:04:14:491] Unable to initialize AVT (838/842/852) on COM4

if I do it a few times I get this error I added this line This is m Timeout when I used the old cable it said 27, which is success of requesting the model on the 852 and 853. Seems like a we need to extend the timer I tried adding a zero to this: while (sw.ElapsedMilliseconds < 10000) it was 1000, didn't work.

code snippet

this.Logger.AddDebugMessage("Trace: ReadAVTPacket");
int length = 0;
bool status = true; // do we have a status byte? (we dont for some 9x init commands)
byte[] rx = new byte[2]; // we dont read more than 2 bytes at a time

// Get the first packet byte.
try
{
Stopwatch sw = new Stopwatch();
sw.Start();
while (sw.ElapsedMilliseconds < 10000)
{
if (await this.Port.GetReceiveQueueSize() > 0) { break;}
}
if (await this.Port.GetReceiveQueueSize() > 0)
{
await this.Port.Receive(rx, 0, 1);
}
else
{
04colyZQ8
Posts: 380
Joined: Thu Jan 16, 2014 12:41 pm
cars: 2004 Colorado 4.8L swap
86/90 Jimmy 6.5L diesel swap
80 Chevrolet Silverado TBI swap
88dodge W100 LPG conversion

Re: Avt 852 not working with vpwexplorer or older tuner cat programs help

Post by 04colyZQ8 »

kur4o wrote: Fri Jan 19, 2024 6:44 am It points to unable to open COM port, if pcmhammer doesn`t initialize baud that might be the reason it fails.
avt852 doesn`t care for baud, modded avt853 should have correct baud rate.
I think it sets to 57600; here:

SerialPortConfiguration configuration = new SerialPortConfiguration();
configuration.BaudRate = 57600; // default RS232 speed for 838, 842. ignored by the USB 852.

which is fine cause I changed it to that
Post Reply