Zed Diagnostic Software - roll your own

Discussion in 'Non Technical' started by Vader, Jun 23, 2009.

  1. Vader

    Vader Just another guy

  2. Vader

    Vader Just another guy

    Update

    Ok, so I have worked out where I went wrong and corrected it.

    The bad news is that I was so caught up in trying to find the reason for the USB to Serial cable failure that I broke things a little too much. Oh well, that's life. Two steps forward, one step back...

    So, now I can connect, retrieve the Part number, reset the codes, but not read any codes.



    The good news is:
    • I have cleaned the code up considerably
    • I have added lots of debugging code to allow me to follow it easier
    • I can now read ECU data with either a real COM or USB to Serial port
    Tomorrow (acually - today again) I will get the codes back.

    I also realised there is another challenge: I have to restrict my use of generics so that the conversion to Android/iPhone/iPad/C++ will be easier.
    Not so hard except I have been using them to hold my Faults (as a LinkedList<of T> ) Why can't all languages use Generics? Would be so much easier.

    Anyway... that's a job for another day :)
     
  3. Good stuff! :br:
     
  4. gmbrezzo

    gmbrezzo Moderator

    Keep up the good work guys.
    I have been following this project, and am so looking forward to seeing the first beta release.

    I like the idea of a cross platform system for Android, iphone, and windows xp+

    Are you still going with the original gameplan of an all-in-one control software for diagnosics, GPS, and media player?
    I do like the Tab (modular) system for thoses that only want to run the diagnostic portion of the software with the option to upgrade to GPS or media player modules.
    I also like the idea of a user custormisable interface.

    Sorry to hear you "broke the code" chasing a USB interface problem.
    Being a past code cutter, I know the frustrations of when this happens.
    The word "why" does not exist in the world of code cutting. As soon as you start looking for the "why did that happen" then the slower things progress.

    I'll be watching this thread for the advancements, and thank you for doing this project.
     
  5. Z steve

    Z steve New Member

    "Keep up the good work guys.
    I have been following this project, and am so looking forward to seeing the first beta release.

    I like the idea of a cross platform system for Android, iphone, and windows xp+"

    Me too...

    [​IMG]

    Im ready and waiting...ha!!
     
  6. Vader

    Vader Just another guy

    Let's not get away from ourselves - this is just plumbing code. It can/will form the basis of a cross-platform capable system, but only insomuch that the same code can be used as a basis of the end-result for each platform. Because I'm not a Java nut, I can't and don't want to produce something that is adequate across all platforms. I guess if I standardised on the AGK, then they would all be exactly the same. That's something to consider once I get this plumbing 100% done.

    Yes, that's the end-goal, however, without the plumbing, what's the use of having a Uber Spa bath?

    So do I. I have built a complicated system like that in the past, but again, it is useless without the underlying code that does all the heavy lifting. You gotta walk before you can run.



    I understand that the rationale for this [current] work I am doing may not be understood by all, so here's the meat of a conversation I had with my younger son today...

    "It's kind of like I am building a new router. The router is used to build specialist furniture for use around the home or office. Without the router you can still build the furniture, but it's hard work.
    Once I have finished building the router, I can build my own tables, chairs and lounge suite."

    So, if you are waiting for a new "lounge", you will either have to do one of the following:
    1. Wait for me to finish the "router" and "lounge"
    2. Wait for me to finish the "router" and using that, build your own "chair" or "table" or "lounge"
    3. Build your own "router" to then build your own "furniture" or manually [ie using old-school methods] build the "chair" or "table" or "lounge" without the specialist "router"
    4. Buy someone else's generic "chair" or "table" or "lounge" and adopt it for use in your "home" or "office" [zed].

    I hope that simplistic explanation helps.

    Most people go with option 4, or as has been shown by some talented people on here, option 3 works for them. I think this is the first time someone has taken this approach for our cars.

    The downside is that even if [when] I am successful, how many people will be in the market to buy this specialist system just for the Z32? Certainly not hundreds :(
     
  7. bRACKET

    bRACKET Do Right Dean

    Forgive me if I've missed this, but what's the difference between this and simply running conzult or datascan from a windows tablet?

    I know it's been done, clears fault codes, reads all sensors, logs data (i think) and is readily available... Simply plug and play too.
     
  8. Vader

    Vader Just another guy

    What if you wanted to run it inside something else for a particular reason?
    What if you wanted to integrate a Navigation system with a diagnostic interface?
    What if you wanted a single specialist device that performed all of the following at the same time:
    a) Monitored engine diagnostics
    b) Set car to "I'm stolen mode" if a certain key code isn't entered within 30 seconds of starting it
    c) Showed Navigation information, with aforementioned diagnostics superimposed on the map
    d) Sent SMS with GPS co-ordinates to a given phone number
    e) Sent real-time information on speed, altitude etc to a Google Maps interface
    f) Sent an email every 30 seconds/minute/5 minutes with speed, Lat/Long etc
    g) Provided a linear temperature gauge/warning
    How about a single device that did all of the above, but also had Km's remaining in tank, Km's travelled, Average speed, courtesy headlight off timer, courtesy interior light dimmer etc etc

    The number of things that are possible with this are endless. This is just the beginning.
     
  9. bRACKET

    bRACKET Do Right Dean

    I'm not as computer savvy as I once was haha, thanks for that though, I guess the possibilities are endless.

    I'll for sure keep my eye out on this, good work :)
     
  10. Vader

    Vader Just another guy

    Ok, so here's what I have done today.
    • Added much debugging code (to allow me to get it working again :rolleyes: )
    • Added a simple Listbox to my Test app to better visualise the output
    • Got the fault code reading working again
    • Got the sensor reading almost working (at least it doesn't throw an exception on me now)
    I'm doing some labouring tomorrow (gotta make ends meet somehow), so don't know when I will get back to this. Maybe tomorrow afternoon.

    Here's a current debug output (cut down a lot - I don't want to bore you too much).

    This is necessary just to connect and retrieve the ECU part number...

    =======Command Start========
    # Opening Port #
    # Port cleared #
    -----------Sent-> 0xFF (255)
    -----------Sent-> 0xFF (255)
    -----------Sent-> 0xEF (239)
    <-Received------- 0x0 (0)
    <-Received------- 0x0 (0)
    <-Received------- 0x10 (16)
    # Connected #
    =======Command Start========
    # Port cleared #
    -----------Sent-> 0xD0 (208)
    <-Received------- 0x2F (47)
    -----------Sent-> 0xF0 (240)
    <-Received------- 0xFF (255)
    <-Received------- 0x16 (22)
    # 22 bytes to read #
    <-Received------- 0x21 (33)
    <-Received------- 0x5 (5)
    <-Received------- 0x80 (128)
    <-Received------- 0x1F (31)
    <-Received------- 0xC0 (192)
    <-Received------- 0xE3 (227)
    <-Received------- 0xE9 (233)
    <-Received------- 0x17 (23)
    <-Received------- 0x6 (6)
    <-Received------- 0x34 (52)
    <-Received------- 0x31 (49)
    <-Received------- 0x50 (80)
    <-Received------- 0x30 (48)
    <-Received------- 0x31 (49)
    <-Received------- 0xFF (255)
    <-Received------- 0x16 (22)
    <-Received------- 0x21 (33)
    <-Received------- 0x5 (5)
    <-Received------- 0x80 (128)
    <-Received------- 0x1F (31)
    <-Received------- 0xC0 (192)
    <-Received------- 0xE3 (227)
    -----------Sent-> 0x30 (48)
    -----------Sent-> 0x30 (48)
    # Stop sent-----> ^^
    # Port cleared #
    # Part #: 41P01 #
    =======Command Start========
    etc...
     
  11. ZXOCET

    ZXOCET Member

    Not able to help but seriously interested in this project. Any thoughts about an ECU that is non-OEM? The Link GT4 GTR ECU for the 300ZX has greater performance tuning capabilities and is available as a stealth module, meaning it is located inside the OEM ECU housing so from the outside it looks like an original item (not like a mother-and-daughter piggyback which is a defect item). It would be helpful to have software to connect to a double DIN in-car touch-screen computer for real-time diagnostics and displays by USB connection, as well as bluetooth, reversing camera or whatever one wanted. Any thoughts? ZXOCET
     
  12. gmbrezzo

    gmbrezzo Moderator

    I so understand this is in its infancy.
    What I was saying is I am a patient fan of what you are doing and just observing your progress.

    From what I have read from the thread you appear to have all the pipe for the plumbing, but require the thread tape and wrenched to assemble it. :)

    Don't under estimate the market out there as you will have the USA and UK markets as well as the Oz market.
    Long as the package is a fair and justifiable price.

    Anyway just waiting and watching. thanks
     
  13. Wrathlon

    Wrathlon Member

    Well here is how my car works:

    I have an android tablet that is linked to my phone via WiFi for internet and Bluetooth.

    My phone is connected to my headunit.

    I have all my media on the tablet and it streams to the phone via a nice big car friendly UI. I can access it by swiping down anywhere on the screen in any program with 3 fingers. Bam its there, it has all my music and playlists, streams to my phone and then through my head unit. I can control volume, repeat, shuffle, playlists - everything, all from my tablet.

    My phone provides the internet to my tablet to run the GPS app, again I get to this with a simple two finger down swipe from anywhere.

    If I receive an SMS it syncs from my phone to my tablet and comes up on the screen which is far easier to use.

    If someone calls me, the phone call is synced with my tablet and I get a giant red and green bar across the tablet to answer with. I can also redirect my phone to bluetooth handsfree from my tablet at the press of a button. Again, all big car friendly interfaces.

    I can also place a call on my phone via my tablet using voice command or again via a nice big car friendly UI.

    All of this can be done just by mashing the screen with the appropriate number of fingers (Though the gestures are completely customisable). To be able to, at a swipe, see statistics from the engine, or have widgets up to show the statistics of various things and reset codes etc right from my tablet that already runs everything else in my car would make it complete. I'm seriously considering gutting it and upgrading to OBDII and a standalone VTC controller purely for this functionality via the Torque app. If an app comes out to do this without the need for OBDII Id be all over that shit like a fat kid on cake.

    Edit: With the proliferation of Android phones/tablets now days and the increasing interest in android based engine management, this could very well become a must have 300ZX "modification". Also, correct me if Im wrong, but dont several other Nissans from the same era use the exact same interface and codes in their ECU's? Because if so, it would also give it functionality beyond the zed.
     
  14. Vader

    Vader Just another guy

    Right now I haven't even considered non OEM ECU's. If they are OBDII, then there should be a way to talk to it. If they are the same "standard" as the OEM, then we should be able to talk to it natively. The only way to know for sure is to either a) get one and play with it, or b) start a conversation with the manufacturer.

    I don't want to inflate your hopes, but it is a long road I have in front of me.

    Well, I certainly hope so. I was really only considering the Aussie market, but you are 100% correct. Hmmm, now you have me thinking...

    Your setup sounds very nice, and I agree, you probably just need diagnostics and your system would be complete. I am not ignoring Android, I just need to get the code working consistently on one platform before I hit another, and from my other thread, I can see that Android will be the next after Windows.
     

  15. http://www.trackelectronics.com.au/consultBT

     
  16. Vader

    Vader Just another guy

    Ok, so not a lot of progress today. I got all the sensors reading again - almost. They all read, but for some reason, they are all reading the wrong values. :confused:

    Anyway, tomorrow I am out mowing lawns for a buck, so I probably won't feel like doing this tomorrow night. But, you never know...
     
  17. Vader

    Vader Just another guy

    Update

    Ok, so now it is reading codes and actually showing the correct values.

    Done:
    • Connects to ECU
    • Reads Part number
    • Reads fault codes
    • Clears fault codes
    • Reads Z32 sensors
    Next on the list:
    1. Run tests (Idle adjust, etc)
    2. Read ROM
    3. Modify ROM (temporarily of course)
    4. [more]
     
  18. QLDZDR

    QLDZDR ID=David

    yes OK, I remember seeing it demonstrated at a ComDex debrief.
    I just didn't remember it being referred to as 'Surface' as it's name.
    [​IMG]
    [​IMG]

    But there it is, Bill Gates demonstrates Surface in 2007
    [​IMG]
     
  19. Vader

    Vader Just another guy

    I just realised that I now have everything I require for "read-only" diagnostics, ie if I want to put something into a car to show info about its performance, then I am there!


    So taking the above into consideration, now the next steps are to:
    • Clean up the code,
    • Make it easier to retrieve the information on multiple sensors,
    • Build a demonstration project(s)
    • Convert to the next platform: Android
     
  20. Vader

    Vader Just another guy

    Ok, so my Android development platform doesn't allow me to read/write from/to the serial port.

    That means I have to purchase another development platform.

    I will also have to purchase a bluetooth serial device to actually talk to my consult adapter.

    So that I know that I have a chance to get my money back, I have posted another thread and poll in the FSBB around this idea. Hopefully a mod approves it soon (hint, hint).

    It will be kind of like the NikoZ app I suppose.

    Yes, I know you haven't seen anything, and that's why this is not me asking for a guarantee of $ - it's just me trying to work out if I would get my money back.

    It would be around or less than $50. How much exactly? I don't know.

    Also, we are only talking about the ability to read the sensors and codes at this stage. I will be able to reset the codes, but not perform tests [just yet].
     

Share This Page