Only few OBD Pids are available in BLE charecterstic data stream
Posted: Tue Jan 10, 2017 11:27 pm
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
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