Need to Add Custom PID

Inquiry and support for Freematics products
alikapatibabu
Posts: 1
Joined: Mon Mar 21, 2016 10:39 pm

Need to Add Custom PID

Postby alikapatibabu » Mon Mar 21, 2016 10:41 pm

Hi,

Can any one help me to add Custom PID for OBD-II Emulator.

Thank You
Babu A

onche
Posts: 20
Joined: Thu Sep 24, 2015 7:00 am

Re: Need to Add Custom PID

Postby onche » Tue Jul 19, 2016 12:05 am

Hello,

I also have the same question. I want to have brake Data for my Renault Clio 3 and i also know the adress : https://x0r.fr/blog/39

The brake pedal information is on :
(see image)
pid.JPG
pid.JPG (25 KiB) Viewed 6552 times


(1): bit 3 = clutch pedal pressed
bit 0 = brake pedal pressed
(2): vary between 0x10 and 0xe0
(3): divide by 8 to have real value

Can someone explain how to sniff this custom PID: 0x181 -> 4174 4C 52 4D 20 3A 00
I looked at the library and I don't understand how I can implement this, because the adress is 0x181 and in wikipedia, usual PID have different format (#define PID_ENGINE_LOAD 0x04 for instance).

Thanks for your help.

Regards.

cottjr
Posts: 10
Joined: Sat Jun 03, 2017 8:08 am

Re: Need to Add Custom PID

Postby cottjr » Wed Jun 14, 2017 12:37 pm

+1 on this request.

In order to use the Freematics ONE for a fleet project I'm working on, I need to be able to access several non-standard PIDs with ARB ID in the 2xx range. Can somebody say if a) this is even possible with the ONE? and b) where to find sample code or docs if it is/should be possible?

jonathan
Posts: 18
Joined: Thu Feb 04, 2016 1:25 pm

Re: Need to Add Custom PID

Postby jonathan » Mon Jun 19, 2017 4:16 pm

It's quite simple really. Download the freematics repo from github.

Make sure you move the libraries folder to your home directory (Documents/Arduino/libraries on windows)

1. Define the pids you want to log here: https://github.com/stanleyhuangyc/Freem ... ticsBase.h
2. Add a new entry to the switch here: https://github.com/stanleyhuangyc/Freem ... E.cpp#L101 You may need to write a custom function to interpret the bytes returned by the query in the char* data.
3. Add your new pids to the array here: https://github.com/stanleyhuangyc/Freem ... r.ino#L329

Compile and upload the sketch to your FreematicsONE

cottjr
Posts: 10
Joined: Sat Jun 03, 2017 8:08 am

Re: Need to Add Custom PID

Postby cottjr » Wed Jun 21, 2017 6:45 am

Jonathan,

thanks for highlighting those sections of code and offering encouragement. I previously found that code, but thought it was only good for proactively polling data - somehow I got the idea from other posts that some custom PID need to be sniffed, as in, you could not count on being able to poll or query them, and you had to observe them by sifting through existing traffic e.g. as with wireshark...

Do you have any idea if one can generally obtain ARB-ID by sending a query? Or are some ARB-ID such that only certain e.g. authorized ECU can poll them? Or are some ARB-ID such that they only always broadcast on a regular cadence, and you can't query them at all?

Is there any risk of perturbing vehicle operation, e.g. by causing too much traffic on the bus with excessive queries, or by requesting messages too fast for one ECU or another?

Thanks,
Carl


Return to “Freematics Products”

Who is online

Users browsing this forum: No registered users and 5 guests