Android Canbus: Difference between revisions
From Variscite Wiki
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- | --> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- | ||
--> {{#lst:Android_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_N7.1.1_1.0.0_VAR-SOM-MX6}}}} <!-- | --> {{#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}} | --> {{PageHeader|{{#var:HARDWARE_NAME}} - Android {{#var:ANDROID_NAME}} {{#var:ANDROID_VERSION}} - CAN bus}} {{DocImage|category1=Android|category2=VAR-SOM-MX6}}[[Category:DART-MX8M]][[Category:DART-MX8M-MINI]][[Category:VAR-SOM-MX8X]][[Category:VAR-SOM-MX8]] __toc__ | ||
== Hardware setup == | == Hardware setup == | ||
Line 20: | Line 20: | ||
Then:<br> | Then:<br> | ||
On board | On board A:<br> | ||
# candump can0 | # candump can0 | ||
On board | On board B:<br> | ||
# cansend can0 500#1E.10.10 | # cansend can0 500#1E.10.10 | ||
Latest revision as of 09:52, 1 January 2020
VAR-SOM-MX6 - Android Nougat N7.1.1 - CAN bus
Hardware setup
Connect 2 boards like the following:
Board A Board B CAN_H --- CAN_H CAN_L --- CAN_L GND ----- GND
Software setup
Android releases comes with the canutils pre-installed. Please use below commands either via serial terminal or via adb shell.
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:
# candump can0
On board B:
# cansend can0 500#1E.10.10
CAN bus at Framework - Android Java application
If you want your application to use the CAN bus, you must port the framework level changes
Port https://github.com/zhangjie201412/Flexcan to your android release