Moderator: Freon
crazymikie wrote:No need the for the ELM interface. You just need a serial to OBD cable (making sure you have the circuitry to shift the voltage levels appropriately).
I've used the cable from my DeltaDash and the cable from my AccessPort and both work find the code. Now that Colby's interface is available, we should work on updating the code to work with the USB interface as well.
Please let me know if you have any questions.
Mike
crazymikie wrote:
Please let me know if you have any questions.
Mike
80 10 F0 05 A8 00 02 80 11 C0
crazymikie wrote:For the IAM to change, you need to make sure the car is up to operating temp.
Then, what I do is go to the highway and in 5th gear, get the car going about 2500 rpm. Then very slowly, increase throttle and you should see the IAM advance. It will only advance under certain conditions for load, rpm and temp.
Please let me know how that works. The IAM will reset to 8, so that sounds right.
Mike
crazymikie wrote:Yup
Now I need to collect a bunch of data from different ECU types.
higB_0x05 was trying to get some info on how to convert a cygwin program into a native windows one. Once that's done, if people can get their hands on an HW interface (simple ISO version of an OBD2->serial will work fine- plans are available on the internet), we can collect data from different ecu types that I need.
I've been a little tied up too, so I haven't had a lot of time to devote to this.
Mike
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <stdio.h>
#include <string.h>
typedef struct ecu_t
{
HANDLE Handle;
// Maybe add more in here later.
} ecu_t;
VOID
InitEcuContext(
ecu_t *e
)
{
e->Handle = INVALID_HANDLE_VALUE;
}
VOID
Disconnect(
ecu_t *e
)
{
CloseHandle( e->Handle);
e->Handle = INVALID_HANDLE_VALUE;
}
BOOLEAN
Connect(
ecu_t *e,
ULONG PortNum
)
{
UCHAR Path[32];
DWORD EventMask;
DCB Dcb;
BOOLEAN Result = FALSE;
sprintf( Path, "\\\\.\\com%d", PortNum);
e->Handle = CreateFile( Path,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING,
NULL);
if (INVALID_HANDLE_VALUE == e->Handle) {
printf("Failed to open com port, error %d\n", GetLastError());
return FALSE;
}
//
// Ignore all events.
//
EventMask = 0;
if (!SetCommMask( e->Handle, EventMask)) {
printf("Failed to set event mask, error %d\n", GetLastError());
goto Exit;
}
//
// Set communication parameters.
//
memset( &Dcb, 0, sizeof( Dcb));
Dcb.DCBlength = sizeof( Dcb);
Dcb.BaudRate = CBR_4800;
Dcb.fBinary = 1;
Dcb.fParity = NOPARITY;
Dcb.StopBits = ONESTOPBIT;
Dcb.ByteSize = 8;
Dcb.fRtsControl = RTS_CONTROL_DISABLE;
Dcb.fDtrControl = DTR_CONTROL_ENABLE;
Dcb.XoffChar = 32;
Dcb.XonChar = 33;
if (!SetCommState( e->Handle, &Dcb)) {
printf("Failed to set comm state, error %d\n", GetLastError());
goto Exit;
}
Result = TRUE;
printf("Successfully configured com port\n");
Exit:
if (!Result) {
Disconnect( e);
}
return Result;
}
INT
_cdecl
main(
INT Argc,
UCHAR *Argv[]
)
{
ecu_t Ctxt;
if (Argc != 2) {
printf("Args: <comport#>\n");
exit(1);
}
InitEcuContext( &Ctxt);
if (!Connect( &Ctxt, atoi( Argv[1]))) {
printf("Failed to configure communications\n");
exit(1);
}
return 0;
}
crazymikie wrote:Hey all-
I've posted some stuff up here:
http://mikeschear.com/SSM/
In there is:
ssm data.xls - this is a spreadsheet of all of the data that Mumbles posted, but cleaned up a bit and I've added some cars and what parameters they support. Anything highlighted in yellow means that I guessed at the address. I started filling thing in to see if I could figure out how to address some of the parameters that are listed as being supported but not documented (look at the first sheet- the initalization command says that some bytes are supported, but the documentation doesn't say what they are or how to address them).
logger_DEVEL3.c - this is the latest version of the program I've been playing with. It's based off the original version Visceral posted, but I've made it easier to add/remove parameters.
Thanks
Mike
Return to Data Logging Software
Users browsing this forum: No registered users and 21 guests