This is a followup thread to this one.
longfeltwant was getting occasional NO DATA responses to the same PID that was working the rest of the time.
I was just re-reading the elm327 spec [there's a copy in doc/ in the svn repo]. There's an internal timeout that might explain what you're seeing. Could you try editing logger/obdserial.c, around line 105, and add a blindcmd that increases the timeout? Something like
The default is 32, which represents about 200ms [according to the doc. Also according to the doc, it represents 128 if you do the math. Yay embedded documentation].
Try increasing that to, say, 50 [which represents a timeout of either 312 or 200ms depending on which bit of the docs are correct...]
— OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
— Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!
You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.
I tried adding
at line 106 of /src/logger/obdserial.c and ran it in my 2005 Jeep Liberty. On the command line, right when obdgpslogger starts up, after saying it connected to the serial ports, in the middle of the errors about creating the tables, it saysCode:blindcmd(fd,"ATST50\r");
Then it prints lines for temp, rpm, vss, throttlepos, and gpspos -- then repeats. It never prints any values for MAF. Before, when I was sometimes getting lines with readings for "maf", it may have been some kind of bug printing the wrong field name. Who knows.Code:OBD PID 16 [maf] unsupported
Anyway, I continue to get reasonable results, except without the red/green coloration which would indicate the incalculable mpg. I will modify obd2kml to use some other criteria for the coloration, or will calculate it a different way, and then I will post my results.
Attached are two trips I took yesterday and today. I have changed the extension from kml to txt to attach to this post. This little system is looking better and better, and your improvements have really made a difference.
I have an answer to why my Jeep won't give out a MAF reading. I asked an automotive professional friend and he said:
"There is an easy answer for your MAF sensor question...your Jeep
doesn't have one. The fuel injection system does speed-density
calculations where the PCM uses data from the MAP (Manifold Absolute
Pressure) sensor and RPM readings from the CKP (Crankshaft Position)
sensor to calculate injector pulsewidth and timing."
So I will try to think of a different strategy for calculating MPG.
Heh. No MAF for you, sorry. I'm not sure why it was successful before, perhaps it was an errant response from another ECU [currently I'm trying to figure out how to safely only get the engine ECU to respond using ATCRA].Code:OBD PID 16 [maf] unsupported
Errors about the database; were they "table already exists" kinda things? It's worth noting that once the code has noticed MAF isn't available, when it creates the database it won't create a maf column.
It's just occurred to me that there may be a bug lurking in obd2kml where if the maf column doesn't exist, you may get unreliable output. Can you make sure that if you create a brand new logfile from scratch, without maf in it, that obd2kml doesn't just crash? I remember writing code for obd2csv that sanity checked and refused to try to calculate certain columns if you don't have maf or vss, but I don't remember doing the same thing in obd2kml.
Rather than change the colorations, feel free to add new graphs to obd2kml. If you can figure out good graphs to add, go ahead! To add colored graphs, check kml/heightandcolor.h. To add plain graphs, check kml/singleheight.h
If you come up with completely new and better visualisations, please let me know.
At this point I've crossed into the realm where my knowledge of statistics and useful data visualisation is holding me back, so if you have useful stuff to add, *please* do so :-D
Oh, and I'm abundantly aware that the progress reporting in obd2kml is hopelessly busted. It's only used for the gui, but fixing it "properly" is pretty high on my list of stuff to do. If you add stuff, and "forget" to bother with progress reporting, that's fine; it'll incite me to figure out a decent fix for the problem.
I'm glad! I know I've said this many times before, but seeing people actually using my stuff gets me totally stoked. One day I hope to actually have an easy-to-use, popular tool for linux and OSX users.This little system is looking better and better, and your improvements have really made a difference.
Heh. I'm glad that obdgpslogger is getting the engine capabilities right. I rewrote most of the capabilities code at the weekend, and was slightly worried I might have introduced bugs :-)I have an answer to why my Jeep won't give out a MAF reading
No I did not ever find a solution to the MPG problem. I found a few different descriptions online of people who calculated MPG using complicated calculations with things like engine displacement, so it wouldn't be a universal calculation. I decided to focus on other ways to make the data look good in Google Earth. But if you have a bright idea, I'm keen to hear it.