How do I tx signals on the CAN bus?

83 views
Skip to first unread message

David B

unread,
Feb 3, 2015, 10:02:09 PM2/3/15
to ope...@googlegroups.com
From the documentation I know how to set up the VI to transmit CAN signals, what I can't figure out is how to set up my android device to send the request to the VI to send the signals on the CAN bus. From the DiagnosticActivity I can see how PID requests are sent to the VI but what I can't figure out is how I use the JSON format example "{"bus": 1, "id": 1234, "value": "0x12345678"}" to send withe the "OpenXC raw CAN message format". Is there an android application that shows how this is done? What *.java file should I look at in the openxc project that would give me an idea on how this could be accomplished?

Zac

unread,
Feb 4, 2015, 3:49:35 PM2/4/15
to ope...@googlegroups.com
Hi David,

The latest Enabler as of version 6.X has a screen that allows you to send raw CAN messages. This is handled in the SendCanMessageFragment.java file in the Enabler: https://github.com/openxc/openxc-android/blob/master/enabler/src/com/openxc/enabler/SendCanMessageFragment.java#L106

I've successfully used the enabler to send raw CAN with the correct firmware, so this format should work in your Android app. Let us know if that doesn't work out.

- Zac

Zac

unread,
Feb 4, 2015, 3:50:56 PM2/4/15
to ope...@googlegroups.com

David B

unread,
Feb 4, 2015, 10:48:37 PM2/4/15
to ope...@googlegroups.com
Thanks Zac,

I did not see the CanMessage output on the latest enaber. That is what I was looking for. 

-Dave


On Tuesday, February 3, 2015 at 10:02:09 PM UTC-5, David B wrote:
Reply all
Reply to author
Forward
0 new messages