Page 1 of 2
Question about OBDII bluetooth
Posted:
Wed Feb 07, 2007 7:43 am
by javasti
Would it be possible to communicate to the ecu using ssm with a OBDII bluetooth unit such as this one:
http://cgi.ebay.com/ebaymotors/ws/eBayI ... 0086351638
Any input would be appreciated... I just bought this unit the other day and plan on developing a data logger for my 04 STi and T-Mobile Dash.
Posted:
Wed Feb 07, 2007 7:52 am
by javasti
This is how the com is setup in code:
- Code: Select all
// stopbits = 1
// databits = 8
// parity = 0
// baudrate = 4800
intHandle = CreateFile("COM" + port.ToString() + ":", GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
if (intHandle != INVALID_HANDLE_VALUE)
{
//----- clear comm port rx and tx buffer
intResult = PurgeComm(intHandle, PURGE_RXCLEAR | PURGE_TXCLEAR);
//----- get existing comm port configuration
intResult = GetCommState(intHandle, out lpDCB);
//----- set required comm port configuration
lpDCB.fBinary = 1; // binary mode, so no EOF check
lpDCB.fParity = 1; // enable parity checking
lpDCB.fOutxCtsFlow = 0; // No CTS output flow control
lpDCB.fOutxDsrFlow = 0; // No DSR output flow control
lpDCB.fDtrControl = 1; // DTR_CONTROL_ENABLE = 1 // DTR flow control type
lpDCB.fDsrSensitivity = 0; // DSR sensitivity
lpDCB.fTXContinueOnXoff = 1; // XOFF continues Tx
lpDCB.fOutX = 0; // No XON/XOFF out flow control
lpDCB.fInX = 0; // No XON/XOFF in flow control
lpDCB.fErrorChar = 0; // Disable error replacement
lpDCB.fNull = 0; // Disable null stripping
lpDCB.fRtsControl = 0; // RTS_CONTROL_ENABLE = 1 // RTS flow control
lpDCB.fAbortOnError = 0; // Do not abort reads/writes on error
lpDCB.StopBits = stopbits; // 0, 1, 2 = 1, 1.5, 2
lpDCB.ByteSize = databits; // Number of bits/byte, 4-8
lpDCB.Parity = parity; // 0-4 = no, odd, even, mark, space
lpDCB.BaudRate = baudrate; // baud rate (port speed)
// XonChar may not equal XoffChar to prevent SetCommState from failing.
// I picked a random character. Perhaps this should be something else.
lpDCB.XoffChar = (char)0x32;
lpDCB.XoffChar = (char)0x33;
lpDCB.XonLim = 2048;
lpDCB.XoffLim = 512;
intResult = SetCommState(intHandle, ref lpDCB);
//----- set comm port buffer size in number of bytes
intResult = SetupComm(intHandle, rxbuffersize, txbuffersize);
//----- set comm port timeouts mintTimeout miliseconds
lpCommTimeouts.ReadIntervalTimeout = 500;
lpCommTimeouts.ReadTotalTimeoutMultiplier = 0;
lpCommTimeouts.ReadTotalTimeoutconstant = timeout;
lpCommTimeouts.WriteTotalTimeoutMultiplier = 0;
lpCommTimeouts.WriteTotalTimeoutconstant = 5000;
intResult = SetCommTimeouts(intHandle, lpCommTimeouts);
}
Posted:
Wed Feb 07, 2007 8:00 am
by javasti
Here is a log file from the test application:
- Code: Select all
OUT: 0x80 0x10 0xF0 0x1 0xBF 0x40
IN : 0x3F 0xD 0xD 0x3E 0x80 0x10 0xF0 0x1 0xBF 0x40 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
OUT: 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E
IN : 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
OUT: 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E
IN : 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
OUT: 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E
IN : 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
OUT: 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E
IN : 0x80 0x10 0xF0 0x11 0xA8 0x0 0x0 0x0 0x11 0x0 0x0 0xE 0x0 0x0 0xF 0x0 0x0 0x15 0x0 0x0 0x22 0x9E 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
As you can see I get a response of 0x3F 0xD 0xD 0x3E followed by an echo of the original request. Not sure what is going on here...
Posted:
Wed Feb 07, 2007 8:14 am
by marky9074
Depends how old your car is.
Might want to pool resources with Shane at Jdash who is already halfway there.
Mark
Posted:
Wed Feb 07, 2007 8:30 am
by javasti
I don't think he has his source code available, at least I couldn't find it. I'm going to keep messing around with the comms... In the meantime if anyone has any input on the code or datalog above please let me know.
Posted:
Wed Feb 07, 2007 11:05 am
by marky9074
Ahh, didnt see it was an 04 STi before! I doubt that a 'normal' OBD-II interface will work with pure SSM....
Posted:
Wed Feb 07, 2007 12:58 pm
by javasti
Hmmm, I guess I should have researched this more... maybe I should have bought a Tactrix cable and used a Serial->Bluetooth unit instead. Can anyone confirm that a setup like that actually works?
I'd hate to find out that my $150+ investment into OBDII->Bluetooth datalogging is wasted.
Posted:
Wed Feb 07, 2007 1:02 pm
by javasti
I'm still a little confused about all this: the OBDII->Bluetooth unit supports ISO 9141, and doesn't the tactrix/cobb cable use the same interface? Is there anything hardware specific in regards to SSM?
Posted:
Wed Feb 07, 2007 1:15 pm
by marky9074
http://forums.openecu.org/viewtopic.php?t=138
The tactrix pin outs are here, and you can see that there are two subaru specific pins that will not be on a normal OBD-II interface, like say the Elmscan...
Mark
Posted:
Wed Feb 07, 2007 1:30 pm
by javasti
Ah thanks for the info Mark.. any idea if a RS-232->Bluetooth adapter works with ecuexplorer? If ecuexplorer can use this setup then I could use it as well.
Posted:
Wed Feb 07, 2007 1:59 pm
by marky9074
As far as I am aware all OBD-II functions will be available, just none of the SSM functions, like for example flashing....
Posted:
Thu Feb 08, 2007 8:33 am
by Skidd
Bingo.
You can't use SSM with any ELM modules. ELM uses their own protocol.
Posted:
Thu Feb 08, 2007 9:16 am
by Skidd
javasti wrote:I don't think he has his source code available, at least I couldn't find it. I'm going to keep messing around with the comms... In the meantime if anyone has any input on the code or datalog above please let me know.
p.s.
JDash is 100% open source, so the source code actually is available. But, it's only available through the Sourceforge.net CVS server.
Posted:
Thu Feb 08, 2007 11:25 am
by javasti
I just talked to shane through email and got more info regarding the elm327 module... It appears that ssm will not be possible with this module which sucks, but I might as well make the best of it. I guess having the ability to monitor and clear trouble codes with my Dash isn't so bad... time to start programming.
Also, the complete documentation regarding the ELM327 can be found here:
http://www.elmelectronics.com/DSheets/ELM327DS.pdf
Posted:
Thu Feb 08, 2007 11:27 am
by javasti
I'm still up in the air about the idea of Tactrix cable to RS232->Bluetooth however. No one seems to have a definite answer on this.