Custom sensor description in ecuxml syntax
Сообщений: 13
|Страница 1 из 1
Custom sensor description in ecuxml syntax
hobdrive supports dynamic sensor definition files, named ecuxml, to easily describe sensor fetching logic, parsing and conversion from ECU.
A number of predefined ecuxml files could be found within hobdrive distribution, under "ecu" folder. They could be used as examples for further work in different ECU support.
Here is a formal description of ecuxml syntax format. It is xml based, so to edit you should have basic xml knowledge or use any of XML editors.
In all vehicle configurations hobdrive always reads "hobdrive/ecu/default.ecuxml" and "hobdrive/user.ecuxml" files.
You should use "user.ecuxml" file for your own sensor descriptions. This way they are guaranteed not to be overwritten/erased during hobdrive version update.
parameters
This is a root tag, it contains two attributes:
description - Free text describing this ECU
namespace - Single word namespace, where all described sensors belong to
disable-obd2
Not currently supported
Tag with text values of true or false. true means this ECU is not OBD2 compatible, therefore standard OBD2 sensors are not applicable for this ECU.
false means this ECU description is an extra addition to the existing OBD2 PIDs and sensors.
init-string
Not currently supported
This is a ELM init string which should be used to enable ELM for the described ECU.
models
List of known vehicle models and years, this ECU is used on.
parameter
Main tag, describing one sensor/PID.
Each sensor has an id (attribute of the tag) - which is a sensor's system name. This name is system wide and should not be ECU specific. F.e. you should name vehicle's speed as id="Speed", not as "MyECUSpeed". This way hobdrive will reuse this sensor in generic calculations.
display attribute is optional, and is a system sensor name normally used in documentation or hardware testers. F.e. Catalyst Temperature on bank 1 sensor 1 is oficcially named with display CATEMP11
description
This sub-tag contains description tags of a sensor:
name - Short display name.
unit - Sensor unit name.
description - Longer (one-two line) description of a sensor.
Description may contain optional attribute lang, showing two-letter iso language code which is used for sensor description.
There are different ways to define sensors. They mainly differ by source of sensor data. There are multiple sources:
1. base
This tag should contain other sensor name, which this sensor is based on. f.e.
This defines a new sensor, which is derived from MAP sensor, and its value is a multiplication of MAP value by 0.01.
2. raw
3. base-raw
4. class
<value-09> 0.3 </value-09> - значение берется из девятого байта ответа и умножается на число 0.3
<word-09> 0.3 </word-09> - значение берется из двух байтов по адресу девятого байта ответа и умножается на число 0.3
<dword-09> 0.3 </dword-09> - значение берется из четырех байтов по адресу девятого байта ответа и умножается на число 0.3
wordle-xx и dwordle-xx - то же, что и word/dword, но порядок байтов "little endian" - первый байт - младший, далее - более старшие.
<offset> 10 </offset> - к значению добавляется указанное смещение
<bit> 4 </bit> - из значения берется лишь 4-й бит
A number of predefined ecuxml files could be found within hobdrive distribution, under "ecu" folder. They could be used as examples for further work in different ECU support.
Here is a formal description of ecuxml syntax format. It is xml based, so to edit you should have basic xml knowledge or use any of XML editors.
In all vehicle configurations hobdrive always reads "hobdrive/ecu/default.ecuxml" and "hobdrive/user.ecuxml" files.
You should use "user.ecuxml" file for your own sensor descriptions. This way they are guaranteed not to be overwritten/erased during hobdrive version update.
parameters
This is a root tag, it contains two attributes:
description - Free text describing this ECU
namespace - Single word namespace, where all described sensors belong to
disable-obd2
Not currently supported
Tag with text values of true or false. true means this ECU is not OBD2 compatible, therefore standard OBD2 sensors are not applicable for this ECU.
false means this ECU description is an extra addition to the existing OBD2 PIDs and sensors.
init-string
Not currently supported
This is a ELM init string which should be used to enable ELM for the described ECU.
models
List of known vehicle models and years, this ECU is used on.
parameter
Main tag, describing one sensor/PID.
Each sensor has an id (attribute of the tag) - which is a sensor's system name. This name is system wide and should not be ECU specific. F.e. you should name vehicle's speed as id="Speed", not as "MyECUSpeed". This way hobdrive will reuse this sensor in generic calculations.
display attribute is optional, and is a system sensor name normally used in documentation or hardware testers. F.e. Catalyst Temperature on bank 1 sensor 1 is oficcially named with display CATEMP11
description
This sub-tag contains description tags of a sensor:
name - Short display name.
unit - Sensor unit name.
description - Longer (one-two line) description of a sensor.
Description may contain optional attribute lang, showing two-letter iso language code which is used for sensor description.
There are different ways to define sensors. They mainly differ by source of sensor data. There are multiple sources:
1. base
This tag should contain other sensor name, which this sensor is based on. f.e.
- Код: Выделить всё
<base>IntakeManifoldPressure</base>
<value> 0.01 </value>
This defines a new sensor, which is derived from MAP sensor, and its value is a multiplication of MAP value by 0.01.
2. raw
3. base-raw
4. class
<value-09> 0.3 </value-09> - значение берется из девятого байта ответа и умножается на число 0.3
<word-09> 0.3 </word-09> - значение берется из двух байтов по адресу девятого байта ответа и умножается на число 0.3
<dword-09> 0.3 </dword-09> - значение берется из четырех байтов по адресу девятого байта ответа и умножается на число 0.3
wordle-xx и dwordle-xx - то же, что и word/dword, но порядок байтов "little endian" - первый байт - младший, далее - более старшие.
<offset> 10 </offset> - к значению добавляется указанное смещение
<bit> 4 </bit> - из значения берется лишь 4-й бит
HobDrive(свежак) + Android4 rk3188 2din + Elm327USB + Pontiac Vibe 2003
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Re: Custom sensor description in ecuxml syntax
- Код: Выделить всё
<parameters namespace="OBD2">
<parameter id="CatTemp">
<description>
<unit>percent</unit>
</description>
<raw>023C</raw>
<value-1>1</value-1>
</parameter>
</parameters>
Thanks for a swift response, I shall have a go with log file and let you know how it goes
Последний раз редактировалось madjad 23 апр 2014, 11:06, всего редактировалось 2 раз(а).
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
You have some typo in the above code, here is full file's content:
Please also look into the log.txt file - it may contain some error messages regarding your syntax or other errors.
- Код: Выделить всё
<parameters namespace="OBD2">
<parameter id="CatTemp">
<description>
<unit>percent</unit>
</description>
<raw>023C</raw>
<value-1>1</value-1>
</parameter>
</parameters>
Please also look into the log.txt file - it may contain some error messages regarding your syntax or other errors.
HobDrive(свежак) + Android4 rk3188 2din + Elm327USB + Pontiac Vibe 2003
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Re: Custom sensor description in ecuxml syntax
- Код: Выделить всё
<parameter id="CatTemp">
<description>
<unit>celsius</unit>
<name>CAT Temp</name>
<description>CAT Converter Temperature</description>
</description>
<raw>023C</raw>
<value-1>1</value-1>
</parameter>
FAQ: https://hobdrive.userecho.com/knowledge-bases/4-baza-znanij/articles
Уровень trace лога:экраны/настройки/системные настройки/отладочные логи/trace
Просьба сделать себе подпись:
HobDrive(1.6.25lic)+ZenFoneM1(9.0)+Elm327Carista+RenMegane3(SID305)
Уровень trace лога:экраны/настройки/системные настройки/отладочные логи/trace
Просьба сделать себе подпись:
HobDrive(1.6.25lic)+ZenFoneM1(9.0)+Elm327Carista+RenMegane3(SID305)
Re: Custom sensor description in ecuxml syntax
wolaa!!! not found error is gone
hail to mighty Cail
but now it is a different problem....basically it is giving two different errors
log.txt
1. ecuxml://\SDMMC\4 hobd\user.ecuxml System.IO.FileNotFoundException:
2. [ERROR] 2014-4-23 13:39:18.582[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp 7F 02 12
[ERROR]
I am using following files to run
User.vehicles
<?xml version="1.0" encoding="utf-8"?>
<vehicles>
<vehicle id="Toyota JDM" make="Toyota" title="Common, JDM">
<obd>
<engine>hobd.OBD2Engine</engine>
<engine-init>ATIB 10; ATIIA 13; ATSH 80 13 F1; ATSP A4</engine-init>
<sensors>ecuxml://ecu/obd2.ecuxml</sensors>
<sensors>hobd.OBD2Sensors</sensors>
<sensors>hobd.ELMSensors</sensors>
<sensors>hobd.ToyotaSensors</sensors>
<sensors>hobd.MAFSensors</sensors>
<sensors>hobd.CommonSensors</sensors>
</obd>
<injector-ccpm>134.23</injector-ccpm>
<liters>2.3</liters>
<volumetric-efficiency>75</volumetric-efficiency>
<warm-engine-level>70</warm-engine-level>
<trip-interval>30</trip-interval>
<cylinders>4</cylinders>
<weight>1450</weight>
<tank>60</tank>
</vehicle>
</vehicles>
OBD2.ecuxml
<?xml version="1.0" encoding="utf-8" ?>
<!--
<parameters namespace='OBD2Extra' description="Extra obd2 sensors">
-->
<parameters namespace="OBD2">
<parameter id="CatTemp">
<description>
<name>Spark Plug Temperature</name>
<unit>°C</unit>
<description>Engine Temperature</description>
</description>
<raw>013C</raw>
<value-1>1</value-1>
</parameter>
<parameter id="ShiftPosition">
<description>
<name>ShiftPosition</name>
<description>Display Auto Shifter Position</description>
<raw>21BB</raw>
<value-0>1</value-0>
</parameter>
</parameters>
In addition to this how did you manage to get shiftpostion working in android version because "21BB" is giving me some crap data when using hyper terminal. The engine initialization codes do they make a difference to what kind of data I would receive from ECU?
![Очень доволен :D](./images/smilies/icon_e_biggrin.gif)
but now it is a different problem....basically it is giving two different errors
log.txt
1. ecuxml://\SDMMC\4 hobd\user.ecuxml System.IO.FileNotFoundException:
2. [ERROR] 2014-4-23 13:39:18.582[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp 7F 02 12
[ERROR]
I am using following files to run
User.vehicles
<?xml version="1.0" encoding="utf-8"?>
<vehicles>
<vehicle id="Toyota JDM" make="Toyota" title="Common, JDM">
<obd>
<engine>hobd.OBD2Engine</engine>
<engine-init>ATIB 10; ATIIA 13; ATSH 80 13 F1; ATSP A4</engine-init>
<sensors>ecuxml://ecu/obd2.ecuxml</sensors>
<sensors>hobd.OBD2Sensors</sensors>
<sensors>hobd.ELMSensors</sensors>
<sensors>hobd.ToyotaSensors</sensors>
<sensors>hobd.MAFSensors</sensors>
<sensors>hobd.CommonSensors</sensors>
</obd>
<injector-ccpm>134.23</injector-ccpm>
<liters>2.3</liters>
<volumetric-efficiency>75</volumetric-efficiency>
<warm-engine-level>70</warm-engine-level>
<trip-interval>30</trip-interval>
<cylinders>4</cylinders>
<weight>1450</weight>
<tank>60</tank>
</vehicle>
</vehicles>
OBD2.ecuxml
<?xml version="1.0" encoding="utf-8" ?>
<!--
<parameters namespace='OBD2Extra' description="Extra obd2 sensors">
-->
<parameters namespace="OBD2">
<parameter id="CatTemp">
<description>
<name>Spark Plug Temperature</name>
<unit>°C</unit>
<description>Engine Temperature</description>
</description>
<raw>013C</raw>
<value-1>1</value-1>
</parameter>
<parameter id="ShiftPosition">
<description>
<name>ShiftPosition</name>
<description>Display Auto Shifter Position</description>
<raw>21BB</raw>
<value-0>1</value-0>
</parameter>
</parameters>
In addition to this how did you manage to get shiftpostion working in android version because "21BB" is giving me some crap data when using hyper terminal. The engine initialization codes do they make a difference to what kind of data I would receive from ECU?
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
OBD2.CatTemp 7F 02 12
Response basically means your ECU does not support this PID. Or, the request header configuration should be different for this request.
I'm not sure about ShiftPosition sensor, please show me the response you get on this PID in terminal.
Also, please notice latest beta versions include a "calculated, virtual" shift position sensor. You may be mixing these two.
And please, let us know your exact vehicle model, year and ecu type (if known).
Response basically means your ECU does not support this PID. Or, the request header configuration should be different for this request.
I'm not sure about ShiftPosition sensor, please show me the response you get on this PID in terminal.
Also, please notice latest beta versions include a "calculated, virtual" shift position sensor. You may be mixing these two.
And please, let us know your exact vehicle model, year and ecu type (if known).
HobDrive(свежак) + Android4 rk3188 2din + Elm327USB + Pontiac Vibe 2003
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Re: Custom sensor description in ecuxml syntax
Ohh... yes I was refering to the beta version, I thought it had resolved the issue. how do I use the same calculated shift position for Wince... because the beta is only available for android i guess.
as for vehicle I have there test subjects JDM toyota Camry 2009, gulf spec toyota Yaris (Vitz) 2008 and mercedes 350ML 2006 (which doesnt seem to support much of my hyperteminal commands).
as for the catalytic temp problem in the new beta version the cat_Temp_b1s1 does the same job and it provide the correct output on my android but the same PID doesn't seem to be working with wince version any idea why?
as for vehicle I have there test subjects JDM toyota Camry 2009, gulf spec toyota Yaris (Vitz) 2008 and mercedes 350ML 2006 (which doesnt seem to support much of my hyperteminal commands).
as for the catalytic temp problem in the new beta version the cat_Temp_b1s1 does the same job and it provide the correct output on my android but the same PID doesn't seem to be working with wince version any idea why?
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
Any idea how to I resolve the parsing issue for cattemp_b1s1 since I am getting this response in log file
339[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s1 41 3C 12 5C
[ERROR] 4/23/2014 6:45:31 PM.449[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s2 61 3E 12 5C
[ERROR] 4/23/2014 6:45:32 PM.556[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s1 41 3C 12 5C
[ERROR] 4/23/2014 6:45:32 PM.634[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s2 61 3E 12 5C
[ERROR]
as for the ecu type when I send 00 it replies back with "ecu $78-CAN-ID ECU #1" does that mean $78 is ecu type ?
as for shiftposition 02BB it replies back with '7F 02 12 '. Although I was hoping a response at 21BB since it is toyota ecu. complete log is something like this
21BB
SEARCHING...
NO DATA
>010c
41 0C 0A B4
>01bb
NO DATA
>02bb
7F 02 12
>0111
41 11 2D
>21bb
NO DATA
>21bb
NO DATA
>300b
7F 30 12
>3008
7F 30 12
>3005
7F 30 12
>02bb
7F 02 12
>21AA
NO DATA
>210E
61 0E 81
>2142
61 42 33 1D
339[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s1 41 3C 12 5C
[ERROR] 4/23/2014 6:45:31 PM.449[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s2 61 3E 12 5C
[ERROR] 4/23/2014 6:45:32 PM.556[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s1 41 3C 12 5C
[ERROR] 4/23/2014 6:45:32 PM.634[OBD2Sensor] Fail parsing sensor value: OBD2.CatTemp_b1s2 61 3E 12 5C
[ERROR]
as for the ecu type when I send 00 it replies back with "ecu $78-CAN-ID ECU #1" does that mean $78 is ecu type ?
as for shiftposition 02BB it replies back with '7F 02 12 '. Although I was hoping a response at 21BB since it is toyota ecu. complete log is something like this
21BB
SEARCHING...
NO DATA
>010c
41 0C 0A B4
>01bb
NO DATA
>02bb
7F 02 12
>0111
41 11 2D
>21bb
NO DATA
>21bb
NO DATA
>300b
7F 30 12
>3008
7F 30 12
>3005
7F 30 12
>02bb
7F 02 12
>21AA
NO DATA
>210E
61 0E 81
>2142
61 42 33 1D
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
First, there is the same beta build for wince as for the Android.
If you have demo, you may download it from our site,
If you have full purchased version, you may upgrade from
http://hobdrive.com/payment/orders/manage
(enter your email, account ID)
Requests starting with "7F" means ECU does not support the specified PIN.
If you have demo, you may download it from our site,
If you have full purchased version, you may upgrade from
http://hobdrive.com/payment/orders/manage
(enter your email, account ID)
Requests starting with "7F" means ECU does not support the specified PIN.
HobDrive(свежак) + Android4 rk3188 2din + Elm327USB + Pontiac Vibe 2003
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Re: Custom sensor description in ecuxml syntax
ohh ok... i thought it was replying with some data.
thanks a lot for all your help and I didnt knew i can update my version with my old license thats y i was using only demo for android which seemed to be a lot better than the paid version on my wince. will upgrade that one and see if it makes a diff.
thanks again.
thanks a lot for all your help and I didnt knew i can update my version with my old license thats y i was using only demo for android which seemed to be a lot better than the paid version on my wince. will upgrade that one and see if it makes a diff.
thanks again.
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
Hello again, sorry I was away for few days.
can you guide me where can I get a beta trial for wince because the link on downloads site
"Windows CE Standalone package" is not working.
can you guide me where can I get a beta trial for wince because the link on downloads site
"Windows CE Standalone package" is not working.
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Re: Custom sensor description in ecuxml syntax
HobDrive(свежак) + Android4 rk3188 2din + Elm327USB + Pontiac Vibe 2003
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Не пишите пожалуйста вопросы в личку. Создавайте тему в соответствующем форуме.
Re: Custom sensor description in ecuxml syntax
and once again you are a savior ![Очень доволен :D](./images/smilies/icon_e_biggrin.gif)
![Очень доволен :D](./images/smilies/icon_e_biggrin.gif)
- Новичок
- Сообщения: 7
- Зарегистрирован: 20 апр 2014, 10:52
Сообщений: 13
|Страница 1 из 1
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 15