Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

issue with can_id length of 8 #17

Open
Bilb opened this issue Aug 18, 2016 · 7 comments
Open

issue with can_id length of 8 #17

Bilb opened this issue Aug 18, 2016 · 7 comments

Comments

@Bilb
Copy link

Bilb commented Aug 18, 2016

Firstly, thanks a lot for the port.

I am using your library to read CAN data on Android, and everything works fine when I send data with something like

cansend can0 123#01

No issue, when using a can_id with a length of 3.

But when I do the same with

cansend can0 12345678#01

just after, the recv from I get this frame :

CanSocket: frame: 0x92345678

And if I send 02345678 I get :
0x82345678
So I have a bit set to true which makes the +8 on the first bytes, but I don't know why.
Any idea where this come from ?
If I do the same with candump, everything works fine.

And weird too, if I send 22345678, I get 0x00000678

Thanks for your help,
Audric

@MrDadaGuy
Copy link

Hi, I'm trying to get this working on Android with Can Bus- can you share any details on your hardware setup? I'm using MCP2515 with IOIO OTG -- thanks!

@karu2003
Copy link

Hi MrDadaGuy ,
Do you know how to build the linux kernel?

@MrDadaGuy
Copy link

Well, I haven't done so since the turn of the century -- used to build kernels for Red Hat and Gentoo long ago, but I'm sure I could learn this again - my concern would be how to load this to a locked down device like a Samsung tablet. I haven't rooted a phone in a couple of years either but my impression is that the vendors are doing everything they can to make this more difficult.

@karu2003
Copy link

To begin, you need an ROOT on your phone. Then find the source of the kernel. build the kernel with the support of CAN BUS and MCP2515. Then change the rules in the SE to load CAN BUS modules. I did this for all my tablets and phones. But, you will not be able to use the MPC2515. The phones do not have access to the SPI. After the new year, I plan to publish the CAN BUS controller for mobile devices. And all the documentation how to use the CAN BUS in Android.

@MrDadaGuy
Copy link

I was planning to use IOIO OTG which does avail SPI -- however at this point I'm going to explore Arduino ADK connected by USB Host Adapter. If this does not work you have given me enough to go on, as a backup I could root / build kernel / etc. Thanks for the info!!

@karu2003
Copy link

karu2003 commented Oct 22, 2017

Will you be writing a kernel module? :) MCP2515 - up to 10 MHz SPI.

@soulaimenk
Copy link

Hi All !

Any solution for this issue ?
@karu2003 : Please could you send me documentation on how to use the CAN BUS in Android ? If it's published. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants