Getting started - DTC management?

Inquiry and support for Freematics products
BoxOfSnoo
Posts: 12
Joined: Tue Jun 24, 2014 6:35 am

Re: Getting started - DTC management?

Post by BoxOfSnoo »

stanley wrote:I will take a look at your code!
As for iOS App, are you capable of iOS development?


Technically, I suppose... but it would be quite a stretch. :) I'm not in the dev program, and only played around with sample code.
stanley
Site Admin
Posts: 1027
Joined: Sat Mar 01, 2014 3:15 am

Re: Getting started - DTC management?

Post by stanley »

I really hope some one can help me a bit with iOS development cause I am so busy doing everything on my own. My kickstarter campaign was aiming for funding for the iOS app development. As it didn't succeed, the project is still left behind in iOS app development up to now.
BoxOfSnoo
Posts: 12
Joined: Tue Jun 24, 2014 6:35 am

Re: Getting started - DTC management?

Post by BoxOfSnoo »

stanley wrote:I really hope some one can help me a bit with iOS development cause I am so busy doing everything on my own. My kickstarter campaign was aiming for funding for the iOS app development. As it didn't succeed, the project is still left behind in iOS app development up to now.


I hear ya, and I'd love to say I'd take a crack at it... but I don't know if I could do it any justice, at this point.

If any of us wanted to dump a message of anything - even to the Debug log on the iOS app, what would be the best way? Would it work as it stands, or does it need to be a specific set of PIDs? I have noticed there were few without a name, just a hex ID in angle brackets.
serch2708
Posts: 2
Joined: Sun Aug 24, 2014 3:43 am

Re: Getting started - DTC management?

Post by serch2708 »

Hi, im just starting with arduino an this freematics obd adapter, I have this http://arduinodev.com/store/index.php?route=product/product&path=20&product_id=52
and im trying to use it just as an ELM327, but i dont know how to use the library, using the begin and init commands, so Im asking if you could post a complete sketch from including libraries to easily read a PID (just one), so then i could modify it to read more PID's and to store it on the SD card. I need help please :? , but thanks anyway.
serch2708
Posts: 2
Joined: Sun Aug 24, 2014 3:43 am

Re: Getting started - DTC management?

Post by serch2708 »

BoxOfSnoo wrote:This is where I am at this point, getting the actual codes should be very similar. Does it look reasonable? Do you know if the commands and responses are bytes or are they strings - including or excluding the separating space?

It's still at a debugging stage, obviously, and I haven't received data I can use, just yet. I thought this might help some others too.

Thanks

Code: Select all

    void queryDTCCount()
    {
      char buffer[64];
      write("0101\r");  // send OBD request for DTCs
      int bytesReceived = receive(buffer,1000);
      buffer[bytesReceived+1] = 0;  // just in case, terminate the string

      if (bytesReceived>0) {

         // Response should be "41 01 xx yy yy yy"
         // looking for the value in xx

#if LCD_DISPLAY
         int response = strncmp(buffer,"41",2);
         if (response > 0) {
            lcd.print("OK");
            lcd.println(buffer);

// if (val3 & 128) { // MIL is on
//   val3 = val3 - 128;
// }
           
            queryDTCs();
         } else {
            lcd.print("No");
            lcd.println(buffer);
         }
         
#endif
      }

    }


Hi, could you please post the a complete sketch from libraries declaration thru the init and begin commands, and how to read 1 PID, then I can modify it to read more PID's and to save the results on a SD card. Im new in this project and need some help, thanks beforehand :)
BoxOfSnoo
Posts: 12
Joined: Tue Jun 24, 2014 6:35 am

Re: Getting started - DTC management?

Post by BoxOfSnoo »

This is a hard project to get started in, it's hard to get info out of Stanley some times.

Still, check on my github site here https://github.com/BoxOfSnoo/Freematics to see what I have at the moment. It needs fixing and polishing.

I had it displaying on the LCD, but the i2c driver for this board doesn't seem to like control characters so formatting it is still an issue.
Post Reply