Hello,
Hardware: AM3517
OS: Android Froyo development kit
Problem: How to bring up CAN interface can0, and access it from a java application?
I need to be able to access the CAN interface on my CPU, from an Android user-application.
The socketCAN project (berlios) introduces the CAN module as a socket interface and provides you with a utility to test the same.
This is now supported in the Linux kernel release, as from 2.6.32 as far as I understand.. and therefore in Android Froyo as well.
Using the linux development kit for the AM3517, this is working fine, as you cross-compile your utility and then you can run your test from terminal, or access it from your user application.
I need to do the same on Android.
It would be nice to be able to compile one of these utilities as a native application, and access it from a java application.
The problem is, Android-NDK is not supporting this... at the moment. The header files to be found in ...include/linux/can.h and ..include/linux/can/raw.h etc. are not there.
Another thing, how can I bring up the can0 interface, using netcfg, or more specific set the bit-timing.
# netcfg can0 up
ti_hecc ti_hecc.1: bit-timing not yet defined
ti_hecc ti_hecc.1: open_candev() failed -22
action 'up' failed (Invalid argument)
From standard linux, you have the ip tool, which is not available in Android.
Does all this mean a dead end for Android, apart from doing major rebuilds and re-configuration?
Regards
Palsson