Need to Add Custom PID

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

Need to Add Custom PID

Post by alikapatibabu »


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

Thank You
Babu A

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

Re: Need to Add Custom PID

Post by onche »


I also have the same question. I want to have brake Data for my Renault Clio 3 and i also know the adress :

The brake pedal information is on :
(see image)
pid.JPG (25 KiB) Viewed 7615 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.


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

Re: Need to Add Custom PID

Post by cottjr »

+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?

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

Re: Need to Add Custom PID

Post by jonathan »

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: ... ticsBase.h
2. Add a new entry to the switch here: ... 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: ... r.ino#L329

Compile and upload the sketch to your FreematicsONE

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

Re: Need to Add Custom PID

Post by cottjr »


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?


Post Reply