Dear NXP Developer:
When I using imx8qxp android P automotive version.
I found property int value passing from vehicle driver to vehicle hal occurs error.
int value encoded in function 'vehicle_hal_set_property' in vehicle_core.c.
This value will pass to vehicle hal.
Such as 4 will become 2, 5 will become -3.
Did you find it.
I think it related with encode function.
Could you help fix it ?
Thank you.
VehcileDriver get value from M4 side by rpmsg. such as value is 5 which is int type.
In vehicle_hal_set_property it will encoded by nanopb.
file:/android/vendor/nxp-opensource/kernel_imx/drivers/mxc/vehicle/vehicle_core.c
file : /android/vendor/nxp-opensource/kernel_imx/drivers/mxc/vehicle/vehicle_protocol_callback.c
Hello Jimmy Chan:
Which 2.1.1 version are you using ?
Imx8qxp only release 2.1.0.
Imx8qxm released 2.1.1, but there is no difference in vehicle_hal_set_property .
you mean imx8qxp 2.1.1 verison ?
It still not release on NXP web.
Could you give me a download link ?
imx-manifest - i.MX Release Manifest
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-android-pie -m imx-p9.0.0_2.1.1-auto-ga.xml
hi jimmychan / nxp developers,
I would like to know how did u test this?
vehicle driver to vehicle hal ?
I am looking for CAN communication between CAN driver to Vehicle HAL?
Any idea of running vehicle hal test found here
<sources>packages/services/Car/tests/vehiclehal_test
or
running emulator in
<sources>/hardware/interfaces/automotive/vehicle/2.0/default/tests
Regards,
Ramesh
Add log in file /vendor/nxp-opensource/kernel_imx/drivers/mxc/vehicle/vehicle_protocol_callback.c
212bool encode_value_callback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg)213{ ....237 propvalue.int32_values.arg = &data->value; // using pr_info check it, take value as 5 for example.... }
In below file to check the value received in Vehicle HAL received.
135void VehicleEmulator::doSetProperty(VehicleEmulator::EmulatorMessage& rxMsg,136 VehicleEmulator::EmulatorMessage& respMsg) { { ...157 if (protoVal.int32_values_size() > 0) {158 val.value.int32Values = std::vector<int32_t> { protoVal.int32_values().begin(),159 protoVal.int32_values().end() };160 }// recevice -3 at here. }
File path : /android/vendor/nxp-opensource/kernel_imx/drivers/mxc/vehicle/vehicle_core.c
In this file,function vehicle_hal_set_property will be called for encoding values.
Those value encoded by nanopb and decode by protobuf in HAL.
Please check it again.