Source: https://eurokclub.bike/index.php?topic=2734.msg32312 Thread name: Quick & Easy in-depth electronic diagnosis for CHEAP Author: carl0s Message: > > I am a bit short on time to write in detail. > > AS we know our bikes support OBD, with the right physical adapter (ICOM D cable). > This works with both expensive ACTIA ICOM, as well as eBay K+DCAN cable (K-Line USB cable). > > OBD is OK but is slow. You can query industry standard parameters only. If you want to poll data (PIDs), you can select each PID, but you get each response in a separate packet at it's 10Hz maximum if polling just one PID, e.g. "fuel system status (closed loop/open loop)". If you poll 5 PIDs then you only get responses at 2Hz. Not much good for a datalogger. > > So the bike speaks over KWP2000 protocol. > When requesting standard OBD stuff, the Service Identifiers used are from hex 00 to hex 0F. This is defined in SAE K1979, i.e. OBD2. > Ignore that, and move on to KWP 2000 Part 3, which is where the service identifier goes from 0x10 onwards. Of great interest is service id 0x22 (22 hex), requestdatabycommonidentifier, but others are interesting and useful too. But don't worry about that.. use the job definitions taken out of the dealer tools below.. you don't need to understand the actual hex codes on the wire unless you are trying to reimplement e.g. with Arduino, like I am.. > > Anyway.. i'm out of time already. > > Buy a cheap BMW/VAG INPA USB cable (K+DCAN) from eBay. > > buy an ICOM D adapter so that it fits the motorbike. > > Download "testo" by a person called "pheno". (Google for testo pheno). > > The Motorrad ECU diagnostic job files from BMW original diagnostics data (SPDaten), plus extracted definitions, I have uploaded for you here: http://www.internetsomething.com/bmskp/MRK24ECU.zip > > Extract the ecu stuff to testo\jobs\serialjobs. > > You either need the 'standalone' version of testo, which is easy and possible (although I haven't tested myself) thanks to the work of someone who created EDIABASLIB (a reverse engineered re-implementation of the EDIABAS API), or you need to also install EDIABAS and configure EDIABAS.ini to say interface = STD:OBD and then put your usb-com port number into obd.ini (both in c:\ediabas\bin). I usually install BMW Standard Tools, and then update EDIABAS to version 7.3.0 for full 32-bit compatibility, as older version some tools are 16 bit exe only, which refuse to run on 64 bit Windows. but for my "Cheap, quick and easy" solution I want you to try 'standalone' version of Pheno's TestO which uses ediabaslib. By the way I bet you could also use BMW Deep OBD android tool which is made by the ediabaslib people. I don't know if they have Motorrad definitions in their app though > > EDIABAS is the interface layer between physical hardware and software. The name means "Electronic Diagnostic Basic System" > > I am using original EDIABAS (not ediabaslib & standalone TestO) because I am also using EDIABAS tool32 to look at the ecu PRG files, as it displays all the tables, the correction factors etc, because I am writing my own Arduino interface so I need to actually understand the K-Line packets that come back and to. Also I don't know with ediabaslib (the reverse engineered project), but with original EDIABAS, you can enable ifhtrace and ifhntrace and log all the packets back and to - perfect for me. > > K-Line by the way is just serial uart but level shifted to + and - 12v, and put on a single wire, and run at 10.4kbps. I think so anyway. > > If you are interested in reverse engineering / understanding the packets, you can use the BESTDIS.exe that I have added to the above ecu zip. You can "disassemble" a .prg file (e.g. MRBMSKP2.prg (that's MotorRad BMSKP 2). The resultant disassembled file is all the information for the diagnostics job. Yuu can see the correction factors of the inputs, you can see the actual hex bytes that are put on to the K-Line wire, the data types, etc. The 'assembly' code is EDIABAS BEST/1 (BEST is German from BEschreibungssprache fur STeuergerate' (description language for control units). BEST/1 is assembler like pseudo-code. BEST/2 is like C. If you want a look, here is the disassembled BMSKP2 file: http://www.internetsomething.com/bmskp/mrbmskp2.b1v It's interesting that you can follow what happens with each job. > > but actually, it easier if you have EDIABAS 7.3.0 installed, and just open the jobs in tool32. You can browse through all the tables of data that the factory diagnostics job uses.. > > > Test-O, like some other tools out there, utilise the EDIABAS API which is provided by a nicely documented DLL file, which is why you need EDIABAS installed, but the alternate option is the newer 'standalone' version of Test-o which is written to work with alternate ediabaslib project. > Reply: #1 Author: carl0s Message: > > So with all this, you can actually monitor as low level as the ADC values coming into the ecu. As well as computed analog values, digital values, etc. It's all there.. > (...) Reply: #4 Author: carl0s Message: > > > > > Neither did I but didn't like to say anything for fear of appearing rude ??? > > > > ha. Ok. Maybe i'll record a screen capture. > > Basically it's a cheap and effective way of running fault diagnosis on the bike. Reading live fuel trims, injection quantity, fault codes, erm.. all sorts.. Let me run some of the function names through Google Translate (as they're German) and see if any of it looks useful. > > All the KWP2000 stuff is only of interest if you want to decipher what the tools are actually sending to the bike, in case you want to make your own tools or microcontroller e.g. if you're building a datalogger like I am. You could just skip to the 'buy this, install this' section... > (...) Reply: #9 Author: richtea Message: > > So, let's see if I've got this right :o > > Hardware > 1. Buy one of these: https://www.ebay.co.uk/itm/FOR-BMW-USB-OBD-Diagnostic-Programing-cable-INPA-KDCAN-ISTA-ISID-SSS-NcsExpert/232526670266?hash=item3623ab69ba:g:qtkAAOSwOA1Z5cpt > 2. And one of these: http://www.ebay.co.uk/itm/BMW-ICOM-D-Cable-ICOM-D-Motorcycles-Motobikes-Diagnostic-Cable-OBD2-Diagnose/322445739622?hash=item4b13438666:g:JgwAAOSwV0RXtMAB > > Now I've got physical connectivity, i.e. Windows PC USB -> KCCAN -> ODBD2 -> bike diagnostic socket. > > Software > 3. Download the Motorrad ECU diagnostic job files: http://www.internetsomething.com/bmskp/MRK24ECU.zip > > Then... > > EITHER > 4. Get the Testo standalone (=all-in-one) version: http://phenoboy.kapsi.fi/testo/testo-2016-09-21-standalone.zip (is there a newer version, Carl0s?) > > OR > 5. Get the basic Testo: http://phenoboy.kapsi.fi/testo > 6. And download BMW Standard Tools: (but from where?) > 7. And update the EDIABAS to version 7.3.0 > > Finally: > 8. Sprinkle fairy dust and you have a GS911 for £40? > > I'm a little sketchy on the last part, as you can tell. ;D > > If I go and buy the cables, what's the missing fairy dust bit, Carl0s? > Any installation/config problems likely? Is there an idiots guide? >