Page 1 of 1

Only few OBD Pids are available in BLE charecterstic data stream

Posted: Tue Jan 10, 2017 11:27 pm
by rajeshkt
Hello All,

I am trying to receive OBD data using an Android APP from Freematics ONE data logger.
I am able to connect to the GATT service: 0000ffe0-0000-1000-8000-00805f9b34fb
and through the characteristic 0000fffe1-0000-1000-8000-00805f9b34fb

When I enable notification on this charecteristc I get a stream of OBD PID notifications for these OBD PIDs only.
10C (Engine RPM)
10D (Speed)
111 (Throttle)
104 (Engine Load)
105 (Engine Coolant Temperature)
131 (Distance travelled since DTC cleared).
Apart from this, Non standard PIDs like accelerometer data and battery voltage is coming.

But apart from the above data, No other standard OBD PIDs are sent by the device.
For example, we need the follwing OBD PIDs.

1) Mode 9, PID 02- Vehicle ID
2) 101, malfunction Indicator
3) 101, number of diagnostic trouble codes
4) 11F, Runtime Since Engine started.
5) 15B, Hybrid battery pack life
6) 14D, minutes run with malfunction indicator on.
7) Fuel System status
8) 121,distance since Malfunction indicator on
9) 12F, fuel tank level input.
10) 146, ambinent temperature
11) 15E, engine fuel rate
12) 15C, engine oil temperature
13) average fuel economy, instant fuel economy,
14) GPS co-ordinates.

What can I do from bluetooth LE client, to get the above data?
Is there any way I can write a command (like Mode and PID) into any of the BLE characteristic to get the corresponding data from device?
I tried writing to this characteristic "0000fffe1-0000-1000-8000-00805f9b34fb" and there does not seem to be any response from the device.

I think by default the Freematics ONE has the firmware with this sketch "datalogger", right?
https://github.com/stanleyhuangyc/Freem ... logger.ino

I see these lines in the code: (line 319-320).
byte pids[]= {0, PID_RPM, PID_SPEED, PID_THROTTLE, PID_ENGINE_LOAD};
byte pids2[] = {PID_COOLANT_TEMP, PID_INTAKE_TEMP, PID_DISTANCE};

So I guess only these PID values are by default sent from the device?
What is the reason to send only these codes?
How can I get all the OBD PIDs that we need?

Can I just add all the needed PIDs in the above array "pids" and will I get all the values I need in BLE?
Or for sending the values over bluetooth, we have to anything more?

What is the procedure to build and load new firmware into the device?
I understand it is ardunio sketch, that I can open in Arduino IDE and compile and transfer to device.
Is this correct? Do you have any step-by-step guide for building the firmware for the device?
Can I just load the "datalogger" sketch and just add the required PIDs in the above code.

This is very critical for our project and any help is greatly appreciated.
Thanks,

Regards,
Rajesh

Re: Only few OBD Pids are available in BLE charecterstic data stream

Posted: Fri Feb 03, 2017 7:20 pm
by Jesas
Hello rajeshkt

That's exactly the same problem/need I have.
I need some PIDs that are not being loaded on the SD. I only need to load the captured data on the SD, I do not need to send them over BT or WiFi.
The only I need is to capture some PIDs, on the SD and generate a chart.
I tried to use the chart generator on the Freematics web but it seems not working.
Also I tried to import the .csv to excel generating an excel sheet with the data separated values on different colums, but it is so complicated to establish a rule to make a chart with them.
I'm so frustrated with this purchase.

Also beware, I detected some diferent configuration (config.h) for the Freematics ONE on the different repositories.
In one repository the config.h is configured for the MPU6050 and on the other repo is for MPU9250.... Which one do you have on your unit?
There is a lack of information about this.

Any advances by your side?

Regards,
Jesus.

Re: Only few OBD Pids are available in BLE charecterstic data stream

Posted: Thu Feb 16, 2017 3:14 pm
by rajeshkt
Hello Jesas,

I had to change the Freematics datalogger Arduino sketch to output the PIDs I need.
it is fairly straightforward to do though. you just need to add the PIDs you need to the array, "pids" in the datalogger.ino.
You can build it and upload to the datalogger though USB cable provided, using Arduino IDE.

Regards,
Rajesh