linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SocketCAN support in Android
@ 2012-02-27  9:26 Yegor Yefremov
  2012-03-19 14:33 ` Yegor Yefremov
  0 siblings, 1 reply; 5+ messages in thread
From: Yegor Yefremov @ 2012-02-27  9:26 UTC (permalink / raw)
  To: linux-can@vger.kernel.org, Wolfgang Grandegger, Oliver Hartkopp

I'm working with TI's am3517. The next generation 33xx is also on the way. Considering lot's of requests about SpcketCAN support in Android on various mailing lists and forums I wanted to summarize how I see this situation:

1. ip from iproute2. Android version prior 4.0 provided only tc utility from iproute2 and due to header issues in NDK there were no easy way to get ip compiled. Ice Cream Sandwich introduced ip support, but ip/iplink_can.c symbols are missing in final ip binary, so it is not usable now. I tried to figure out what's wrong, but failed, so any help would be appreciated.

2. NDK: can.h is still not a part of NDK's headers, so for now can.h must be supplied to compile can-utils and user software. As one can see from this post: https://groups.google.com/d/topic/android-ndk/K1w5IqGSKCA/discussion NDK dev's don't seem to accept CAN as standard kernel protocol. Lobby work needed ;-)

3. As soon as there is solution for both issues, Java wrapper will be needed to enable App development

What do you think about this?

Best regards,
Yegor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support in Android
  2012-02-27  9:26 SocketCAN support in Android Yegor Yefremov
@ 2012-03-19 14:33 ` Yegor Yefremov
  2012-03-19 16:10   ` Oliver Hartkopp
  2012-03-19 16:12   ` SocketCAN support in Android: userspace headers Kurt Van Dijck
  0 siblings, 2 replies; 5+ messages in thread
From: Yegor Yefremov @ 2012-03-19 14:33 UTC (permalink / raw)
  To: yegor_sub1
  Cc: linux-can@vger.kernel.org, Wolfgang Grandegger, Oliver Hartkopp

Am 27.02.2012 10:26, schrieb Yegor Yefremov:
> I'm working with TI's am3517. The next generation 33xx is also on the way. Considering lot's of requests about SpcketCAN support in Android on various mailing lists and forums I wanted to summarize how I see this situation:
> 
> 1. ip from iproute2. Android version prior 4.0 provided only tc utility from iproute2 and due to header issues in NDK there were no easy way to get ip compiled. Ice Cream Sandwich introduced ip support, but ip/iplink_can.c symbols are missing in final ip binary, so it is not usable now. I tried to figure out what's wrong, but failed, so any help would be appreciated.

This issue is theoretically fixed (https://android-review.googlesource.com/#/c/34240/)

> 2. NDK: can.h is still not a part of NDK's headers, so for now can.h must be supplied to compile can-utils and user software. As one can see from this post: https://groups.google.com/d/topic/android-ndk/K1w5IqGSKCA/discussion NDK dev's don't seem to accept CAN as standard kernel protocol. Lobby work needed ;-)

what headers are necessary/usable for userspace? linux/can.h, linux/can/raw.h - what else? 

I've added all of then to NDK, patches some other headers and could cross-compile candump. Now it is working. As soon as I'm finished I would like Android.mk file to be included in can-utils. I hope it will be O.K.
 
> 3. As soon as there is solution for both issues, Java wrapper will be needed to enable App development

Still open.

Yegor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support in Android
  2012-03-19 14:33 ` Yegor Yefremov
@ 2012-03-19 16:10   ` Oliver Hartkopp
  2012-03-20  9:53     ` Yegor Yefremov
  2012-03-19 16:12   ` SocketCAN support in Android: userspace headers Kurt Van Dijck
  1 sibling, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2012-03-19 16:10 UTC (permalink / raw)
  To: yegor_sub1; +Cc: linux-can@vger.kernel.org, Wolfgang Grandegger

Hello Yegor,

On 19.03.2012 15:33, Yegor Yefremov wrote:

> Am 27.02.2012 10:26, schrieb Yegor Yefremov:
>> I'm working with TI's am3517. The next generation 33xx is also on the way. Considering lot's of requests about SpcketCAN support in Android on various mailing lists and forums I wanted to summarize how I see this situation:
>>
>> 1. ip from iproute2. Android version prior 4.0 provided only tc utility from iproute2 and due to header issues in NDK there were no easy way to get ip compiled. Ice Cream Sandwich introduced ip support, but ip/iplink_can.c symbols are missing in final ip binary, so it is not usable now. I tried to figure out what's wrong, but failed, so any help would be appreciated.
> 
> This issue is theoretically fixed (https://android-review.googlesource.com/#/c/34240/)


Good job!


>> 2. NDK: can.h is still not a part of NDK's headers, so for now can.h must be supplied to compile can-utils and user software. As one can see from this post: https://groups.google.com/d/topic/android-ndk/K1w5IqGSKCA/discussion NDK dev's don't seem to accept CAN as standard kernel protocol. Lobby work needed ;-)
> 
> what headers are necessary/usable for userspace? linux/can.h, linux/can/raw.h - what else? 
> 
> I've added all of then to NDK, patches some other headers and could cross-compile candump. Now it is working. As soon as I'm finished I would like Android.mk file to be included in can-utils. I hope it will be O.K.


candump only needs linux/can.h and linux/can/raw.h
cansniffer also needs linux/can/bcm.h

So adding all includes (as it is also done by the iproute2 package too) is a
good idea.

Additionally to

linux/can.h

there is the userspace relevant stuff from

http://lxr.linux.no/#linux+v3.3/include/linux/can/Kbuild

needed:

linux/can/raw.h
linux/can/bcm.h
linux/can/gw.h
linux/can/error.h
linux/can/netlink.h

>  
>> 3. As soon as there is solution for both issues, Java wrapper will be needed to enable App development
> 
> Still open.
> 


What kind of java wrapper do you think of?

Do you know Kayak? http://2codeornot2code.org/?p=1033

Kayak is using a socketcand which offers a network transparent interface via
IP to omit a JNI for SocketCAN which would also be an approach indeed.

Regards,
Oliver

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support in Android: userspace headers
  2012-03-19 14:33 ` Yegor Yefremov
  2012-03-19 16:10   ` Oliver Hartkopp
@ 2012-03-19 16:12   ` Kurt Van Dijck
  1 sibling, 0 replies; 5+ messages in thread
From: Kurt Van Dijck @ 2012-03-19 16:12 UTC (permalink / raw)
  To: Yegor Yefremov
  Cc: linux-can@vger.kernel.org, Wolfgang Grandegger, Oliver Hartkopp

On Mon, Mar 19, 2012 at 03:33:09PM +0100, Yegor Yefremov wrote:
> Am 27.02.2012 10:26, schrieb Yegor Yefremov:

> what headers are necessary/usable for userspace? linux/can.h, linux/can/raw.h - what else? 
I believe the necessary headers should be installed by "$ make headers_install"

In case this command does not satisfy your build process, you can
do things manually after looking in include/linux/can/Kbuild, I think.

Kurt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SocketCAN support in Android
  2012-03-19 16:10   ` Oliver Hartkopp
@ 2012-03-20  9:53     ` Yegor Yefremov
  0 siblings, 0 replies; 5+ messages in thread
From: Yegor Yefremov @ 2012-03-20  9:53 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can@vger.kernel.org, Wolfgang Grandegger

Hello Oliver,

>> Am 27.02.2012 10:26, schrieb Yegor Yefremov:
>>> I'm working with TI's am3517. The next generation 33xx is also on the way. Considering lot's of requests about SpcketCAN support in Android on various mailing lists and forums I wanted to summarize how I see this situation:
>>>
>>> 1. ip from iproute2. Android version prior 4.0 provided only tc utility from iproute2 and due to header issues in NDK there were no easy way to get ip compiled. Ice Cream Sandwich introduced ip support, but ip/iplink_can.c symbols are missing in final ip binary, so it is not usable now. I tried to figure out what's wrong, but failed, so any help would be appreciated.
>> This issue is theoretically fixed (https://android-review.googlesource.com/#/c/34240/)
>
> Good job!
>
>
>>> 2. NDK: can.h is still not a part of NDK's headers, so for now can.h must be supplied to compile can-utils and user software. As one can see from this post: https://groups.google.com/d/topic/android-ndk/K1w5IqGSKCA/discussion NDK dev's don't seem to accept CAN as standard kernel protocol. Lobby work needed ;-)
>> what headers are necessary/usable for userspace? linux/can.h, linux/can/raw.h - what else? 
>>
>> I've added all of then to NDK, patches some other headers and could cross-compile candump. Now it is working. As soon as I'm finished I would like Android.mk file to be included in can-utils. I hope it will be O.K.
>
> candump only needs linux/can.h and linux/can/raw.h
> cansniffer also needs linux/can/bcm.h
>
> So adding all includes (as it is also done by the iproute2 package too) is a
> good idea.
>
> Additionally to
>
> linux/can.h
>
> there is the userspace relevant stuff from
>
> http://lxr.linux.no/#linux+v3.3/include/linux/can/Kbuild
>
> needed:
>
> linux/can/raw.h
> linux/can/bcm.h
> linux/can/gw.h
> linux/can/error.h
> linux/can/netlink.h

Thanks for the info. I would like to submit those headers to bionic library and would like to send only the required files.

>>  
>>> 3. As soon as there is solution for both issues, Java wrapper will be needed to enable App development
>> Still open.
>>
>
> What kind of java wrapper do you think of?

Any ;-) I'm at the beginning and looking for existing solutions/ideas.

> Do you know Kayak? http://2codeornot2code.org/?p=1033
>
> Kayak is using a socketcand which offers a network transparent interface via
> IP to omit a JNI for SocketCAN which would also be an approach indeed.

Interesting project. I'll look into it. Do we want to integrate socketcand into can-utils?

Regards,
Yegor


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-20  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27  9:26 SocketCAN support in Android Yegor Yefremov
2012-03-19 14:33 ` Yegor Yefremov
2012-03-19 16:10   ` Oliver Hartkopp
2012-03-20  9:53     ` Yegor Yefremov
2012-03-19 16:12   ` SocketCAN support in Android: userspace headers Kurt Van Dijck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).