Page 1 of 1
K-line
Posted: Mon Jan 18, 2016 8:29 am
by zechdz
Any information on how I would be able to read from a custom k-line, not full obd2.
Would it be doable through lua scripting and reading a digital input?
Posted: Tue Jan 19, 2016 5:13 pm
by stieg
Sounds like you are talking about bit banging the K line (pin 7) through LUA using the GPIO lines. I have never seen this done before using LUA. Based on the ISO9141-2 spec you would not be able to achieve this as RCP can only drive a signal as high as 5V. The standard dictates that you need 9.6V minimum to replicate a "high" value on the line. See
http://www.onboarddiagnostics.com/page03.htm for more info.
Posted: Fri Jan 22, 2016 8:00 am
by zechdz
Thanks for looking that up. Just looking for other ways to get the bikes data, so i can free up analog lines for other fun things
Posted: Fri Jan 22, 2016 6:48 pm
by stieg
No worries. I learned something too.
Posted: Thu Apr 21, 2016 4:49 am
by JJLudemann
It seems to me that if you can connect the K-line to the RaceCapture Pro CAN bus connector at the physical level, then the RaceCapture PID protocol should just work. This guy has a schematic of how to go from the single K-line to separate transmit & receive lines:
http://www.clubwrx.net/forums/tutorials ... duino.html
These Tx & Rx lines could then be connected to a serial-to-Canbus adapter.
Sparkfun also has a K-line to serial adapter:
https://www.sparkfun.com/products/9555
Then you could connect the serial port to something like this:
http://gridconnect.com/rs232-can-converter.html
Plug that into the CAN-bus connector on the RaceCapture Pro, and you're talking to your ECU. I need something like this so I can communicate with the ECU on my 2007-2008 Suzuki GSX-R1000 engine.
Does this make sense to anybody?
-JJ
Posted: Thu Apr 21, 2016 3:51 pm
by brentp
An alternative to CAN, you can also use the aux serial port of RaceCapture/Pro MK2 and use Lua scripting to communicate over the serial connection.
USB / Serial / Bluetooth Communication to GSX-R1000 ECU
Posted: Tue Apr 26, 2016 9:12 am
by JJLudemann
I see the Lua scripting page says the USB port is available as serial port 0, but recommends against using it as it " may interfere with normal operations of the unit". Is this still the case?
I already have a device, the HealTech OBD Tool for Suzuki (
http://shop.bluemonkeymotorsports.com/H ... _p_12.html ), that already works to connect the USB port of a laptop PC to the GSX-R1000 ECU. I could put USB sniffer software on the laptop's USB port, figure out the communications protocol, then re-implement it in a Lua script if I could just connect it to the RaceCapture USB port. Failing that, maybe I could get a USB to serial converter and plug it into the RC aux serial port.
The problem with connecting the RC serial port directly to the GSXR diagnostic port is that the GSXR wants a 2000 ms hi, 25 ms low, 25 ms high sequence on TxData to initialize, and I don't think I can make this with the RC serial port. Is there some way to directly control the TxData line? This initialization is already taken care of by the HealTech gizmo.
The Lua script page says it's OK to use the Bluetooth port, so maybe I can put a USB to Bluetooth converter on the HealTech gizmo and do it that way...
I'm going to order hardware for all these approaches, but would appreciate any ideas on the best direction to proceed.
-JJ
Posted: Tue Apr 26, 2016 8:48 pm
by stieg
I see the Lua scripting page says the USB port is available as serial port 0, but recommends against using it as it " may interfere with normal operations of the unit". Is this still the case?
Yes. The code that makes use of the USB port is not designed with external use in mind.
I already have a device, the HealTech OBD Tool for Suzuki (
http://shop.bluemonkeymotorsports.com/H ... _p_12.html ), that already works to connect the USB port of a laptop PC to the GSX-R1000 ECU. I could put USB sniffer software on the laptop's USB port, figure out the communications protocol, then re-implement it in a Lua script if I could just connect it to the RaceCapture USB port.
I doubt that plugging in the GSX-R1000 to the RCP unit will even work since (at least on the RaceCapture unit) they are both USB guest devices. The GSX unit would need to support the USB OTG (on the go) spec that allows it to work as both USB host and USB guest devices. I doubt it supports that.
Failing that, maybe I could get a USB to serial converter and plug it into the RC aux serial port.
This is more probable to work.
The problem with connecting the RC serial port directly to the GSXR diagnostic port is that the GSXR wants a 2000 ms hi, 25 ms low, 25 ms high sequence on TxData to initialize, and I don't think I can make this with the RC serial port. Is there some way to directly control the TxData line? This initialization is already taken care of by the HealTech gizmo.
At this time there is no support to do this in our code on our serial ports. Sounds like a PITA.
The Lua script page says it's OK to use the Bluetooth port, so maybe I can put a USB to Bluetooth converter on the HealTech gizmo and do it that way...
Our Bluetooth module only works with tablets and computers as a client. it is not capable of being a host to another Bluetooth device.
I'm going to order hardware for all these approaches, but would appreciate any ideas on the best direction to proceed.
Go USB to serial and use the auxiliary port on the front of MK2 to read in and parse the data. Hands down the best approach of the above mentioned. Or see if there is a way to bypass that annoying serial requirement and go serial to serial directly.
GSX-R1000 to HealTech to Serial Converter
Posted: Wed Apr 27, 2016 12:17 am
by JJLudemann
That's exactly the feedback I needed. Thank you!
First approach will be (GSX-R1000 diagnostic port) to (HealTech gizmo to USB) to (USB to serial converter) to RC aux serial port.
-JJ