has anyone been able to get this to work yet? to start, ive only been using vb for a few months now…so i am years behind the curve. im attempting to create a working copy of ecucontrol, using 2005 so that it may be edited by myself and others by just downloading a free copy of 2005 express. so far im not 100% sure its possible….
all the code ive seen, (except for ecucontrol.net) uses mscomm to control the serialport. from what ive read, you need a copy of vb6 in order to even use mscomm control.
ive added mscomm and tried using it, but on mscomm1.output i get an error “exception from HRESULT: 0x800A017C (CTL_E_INVALIDPROPERTYVALUE)”, i assume this is because its not registered with vb6…
since i cant get mscomm to work, ive been trying to use the serialport resource available in 2005, and i can read and write through the port (looping through a modem), but when connected to the ecu i don’t seem to be able to read anything… i know that there is incoming data when connected to the ecu, because the serialport.datarecieved event is firing….
i just don’t know if the data i am sending is formatted correctly, therefore im not really receiving anything?
original vb6 mscomm code
Code:
Me.MSComm1.Output = Chr(CByte(General.HextoLong(databyte)))
Buffer(sensor) = CByte(HextoLong(Hex(Asc(StrConv(Me.MSComm1.Input, vbUnicode)))))
vb 2005 serialport code
Code:
Me.SerialPort1.WriteLine(Chr(CByte(General.HextoLong((databyte)))))
Buffer(sensor) = CByte(General.HextoLong(Hex(Asc(Me.SerialPort1.ReadLine))))
Example, for the iat
Writeline -
databyte = “32” (hex)
HextoLong = Val("&h" & HexNum$) = val(“&h32”) = 50 (dec)
Cbyte(50) = 50
Chr(50) = 2 (ascii)
since im really new at this, im not sure what exactly im sending and recieving from the ecu...
im not really sure what the strconv(mscomm1.input, vbunicode) is doing either (if that is one of my problems)…its not supported in 2005…
anybody have any luck with 2005 or have any suggestions for me...ive tried doing my research, but i just cant get past this part...
thanks in advance, and sorry for the long drawn out post