Simple Logger

Developer topics relating to software that logs data from ECUs

Moderator: Freon

Postby crazymikie » Thu Apr 07, 2005 6:36 pm

If you look at the xls file linked above, you can find the offsets for the fuel trims. I think you want to use cyl #1 correction (ST) and cyl #1 learning (LT).

Please let me know if you have any questions. I can help you out. Just IM me if you want.


Mike
crazymikie
 
Posts: 105
Joined: Mon Jan 03, 2005 6:45 pm
Location: Watertown, MA

Postby aura781 » Sun Apr 17, 2005 7:30 am

Hi Mike and others, great work!!!

an i just confirm that your source code will work with the
ELM based ISO interface? I ordered one previously,
only to realise that the default OBD2 rates sucks big time.

Please advise, thanks!
aura781
 
Posts: 3
Joined: Sun Apr 17, 2005 7:26 am

Postby crazymikie » Sun Apr 17, 2005 7:47 am

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
 
Posts: 105
Joined: Mon Jan 03, 2005 6:45 pm
Location: Watertown, MA

Postby aura781 » Sun Apr 17, 2005 8:09 am

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


thanks for the prompt reply!
I m handy with s/w programming and all,
but totally clueless with all the h/w stuff.

will the code update for colby's interface be done soon?
aura781
 
Posts: 3
Joined: Sun Apr 17, 2005 7:26 am

Postby NeverLies » Mon Apr 18, 2005 4:27 am

Why do you need to upgrade the code as Colby interface is seen as a RS232 interface ? (that's sould be the job done by the driver)
NeverLies
 
Posts: 179
Joined: Tue Apr 12, 2005 1:49 am

Postby crazymikie » Mon Apr 18, 2005 1:30 pm

Good point. I guess that's why I don't do development anymore and deal with release management ;)
crazymikie
 
Posts: 105
Joined: Mon Jan 03, 2005 6:45 pm
Location: Watertown, MA

Postby aura781 » Thu Apr 21, 2005 7:41 am

Need a little help Mike.
have downloaded n installed cygwin as per instructions.
compiled and tried running it.
but it throws the error message
"Could not open port: No such file or directory"

are there any more things that i might been missing?
please advise, thanks!
chris


did a search on goggle and figured out.
seems that the naming for linux n cygwin are different?

// linux
//fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NONBLOCK);

// cygwin
fd = open("/dev/com1", O_RDWR | O_NOCTTY | O_NONBLOCK);

thought can share with the rest.

crazymikie wrote:
Please let me know if you have any questions.

Mike
aura781
 
Posts: 3
Joined: Sun Apr 17, 2005 7:26 am

Postby NeverLies » Thu Apr 21, 2005 11:31 am

Can anyone get the anwser to this query :
Code: Select all
80 10 F0 05 A8 00 02 80 11 C0
?

My data answer is E8 6F (Ecu modified by Ecutek). Would like to have the anwser of a stock WRX.
NeverLies
 
Posts: 179
Joined: Tue Apr 12, 2005 1:49 am

Postby scooter » Sat Apr 30, 2005 6:13 pm

So, I am running Mike's most recent logging software, and it works great.

The only problem I seem to be having is that my IAM is always 8. It doesn't change. I resent my ECU this morning, and at initial startup... my IAM read 8. I drove around aggressively, did the ECU learning trick, and the IAM stayed at 8. I wonder if my ECU is different.

Anyone know what address I should be using for a 2002 USDM 4EAT ECU? Serial code is 22611-AF413.

Thanks!
scooter
 
Posts: 2
Joined: Sat Apr 30, 2005 6:10 pm

Postby crazymikie » Sat Apr 30, 2005 7:45 pm

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
 
Posts: 105
Joined: Mon Jan 03, 2005 6:45 pm
Location: Watertown, MA

Postby scooter » Sat Apr 30, 2005 8:31 pm

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

Ah, thanks. Resetting to 8 explains much. Unfortunately, while I would love put it in 5th... I'm 4EAT. Best I can do is to put it in second gear on the road, or keep it in drive on the highway, and try part throttle. I can try braking and hitting the gas at the same time; I have a 40,000 lbs gross weight ATF cooler (yeah... overkill :D it looks like a small FMIC). But... while I thought I had mastered the "ECU learning trick"... apparently I haven't. I will have to try various techniques and see if I get it right.
Thanks! Again, great software.
scooter
 
Posts: 2
Joined: Sat Apr 30, 2005 6:10 pm

Postby west_minist » Tue May 24, 2005 7:45 pm

subscribe
west_minist
 
Posts: 515
Joined: Fri Jan 07, 2005 1:31 pm
Location: Barbados

Postby realwomble » Thu May 26, 2005 4:59 pm

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


Windows...

I think (NT/2k/xp) to open the serial port, you need to to CreateFile with aname of \??\comX.

I'll look into this.

<< EDIT >>

Sorry, I'm wrong, thats an NT 'native' name format. For Win32 CreateFile, you need

\\.\COMx

as per MSDN. On this handle shoudl be able to send serial driver IOCTls etc.

http://msdn.microsoft.com/library/defau ... tefile.asp

This link

http://msdn.microsoft.com/library/defau ... erties.asp

Seems to cover the serial APIs, if you don't want to control the UART via IOCTLs etc.
realwomble
 
Posts: 21
Joined: Thu May 26, 2005 4:07 pm
Location: Seattle, WA

Postby realwomble » Thu May 26, 2005 10:46 pm

This is the "windowsified" version of the COM port configuration.

I've not got as far as actually trying to talk to the car yet.


Code: Select all
#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;
}
realwomble
 
Posts: 21
Joined: Thu May 26, 2005 4:07 pm
Location: Seattle, WA

Postby west_minist » Sun May 29, 2005 8:34 am

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


Hi Mike!

I wanted to add more code to you logger, but I do not know how some of the calculation is arrived at, but i want to add VVT to the loggin.

I will be getting the openport soon, although I have the TARI DL1 (Diagnostics Level 1), I would like to still mess around w/ the code.
west_minist
 
Posts: 515
Joined: Fri Jan 07, 2005 1:31 pm
Location: Barbados

PreviousNext

Return to Data Logging Software

Who is online

Users browsing this forum: No registered users and 6 guests

cron