Re: Writing on CAN-bus using low-can API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aniello,

You got a mistake in your arguments, you should use:

|low-canwrite{"signal_name":"engine.speed","signal_value":1256} |

Instead of

|low-canwrite{"signal_name":"engine.speed","value":1256} |

Also be informed that not all the signals are writable, you have to change or add the boolean value "writable" to true in your JSON signal definitions to be able to write on them. By default, only the HVAC signals are writable, so you have to change the signals.json in the examples/agl-vcar directory and use the low-can-generator[1] to generate the application-generated.cpp file.

Best regards.

[1]: https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/low-level-can-generator

On 02/11/2018 09:15, ANIELLO CAROTENUTO wrote:
Dear all,

I'd like to do some tests with the low CAN capabilities of this project and all I've managed to do, as of now, is downloading and installing the latest release (6.0.0) on a Raspberry Pi 3, setting up a virtual can device and read/write from/to the bus with cansend and candump commands.

My biggest concern is now on writing on it using the low-can api, but for some reason I cannot manage to do so. Whenever I try to send a message of the form
|low-canwrite{"signal_name":"engine.speed","value":1256}|
what I get in response in the shell where I launched the service is

ERROR: [API low-can] Request argument malformed. Please use the following syntax: [/usr/src/debug/agl-service-can-low-level/6.90.0-r0/git/low-can-binding/binding/low-can-cb.cpp:530,write]

What am I doing wrong? Also, to be clear, I skipped the whole section about the definition of new signals as it would be enough for me to use the default ones.

Thanks in advance!
Nello

_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions

--
Romain Forlot - Embedded Engineer - IoT.bzh
romain.forlot@xxxxxxx - www.iot.bzh - +33675142438

null
_______________________________________________
automotive-discussions mailing list
automotive-discussions@xxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux