Android Canbus: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{PageHeader|CAN bus}}
<!-- Set release according to "release" parameter in URL and use RELEASE_N7.1.1_1.0.0_VAR-SOM-MX6 as default
{{DocImage|category1=Android|category2=VAR-SOM-MX6}}
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{#lst:Android_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_N7.1.1_1.0.0_VAR-SOM-MX6}}}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} - Android {{#var:ANDROID_NAME}} {{#var:ANDROID_VERSION}} Android Canbus}} {{DocImage|category1={{#var:HARDWARE_NAME}}|category2=Android}} __toc__
 
==Hardware Setup ==
==Hardware Setup ==



Revision as of 21:40, 26 December 2019

VAR-SOM-MX6 - Android Nougat N7.1.1 Android Canbus

Hardware Setup

Connect 2 boards with the appropriate cable.
File:CAN Bus Connection.png

Board A CAN_H --- CAN_H Board B
Board A CAN_L --- CAN_L Board B


Software Setup

Android current releases come with the canutils already installed. Set up the boards by running the following on each of them:

$ ip link set can0 up type can bitrate 125000

Then:
On board #A:

$ cansniffer can0

On board #B:

$ cansend can0 500#1E.10.10

Canbus at Framework - Android Java application

- If you want the application to use the canbus, you must port the framework level changes - Port https://github.com/zhangjie201412/Flexcan to your android release.