spidev access via Android image

Started by luke_emb_sw_dev, December 15, 2012, 01:30:28 AM

Previous topic - Next topic

luke_emb_sw_dev

Hi,

I aim to get the SPI of the UEXT connector on the A13-Olinuxino board to be usable by a Java Android application. So far I have created a native driver exposing /dev/spidev driver of the linux kernel to the Java layer. I have a test activity that opend the driver and sends a few bytes out before closing.

So my problem....

it seems that spidev driver is not available in the kernel of the Android image. i used the adb shell, started with the following command :

adb -d shell

then attempted to list all spi interfaces:

ls -al /dev/spi*

what i expected to see was something like /dev/spidev-0.0, but instead nothing. There is however three I2C devices i2c-0, i2c-1, and i2c-2.

There is also nothing in /sys/bus/devices and /sys/bus/drivers

Does anyone know how I should proceed? i am assuming I need to produce a custom Android build where the kernel includes the SPI drivers, but how I do this i am not too sure.

thanks,

Luke

saand

Hi Luke,
I do not know the answer to your specific question.

however to do what you want i believe would be fairly straight forward if you were running debian.

The method of creating your customized kernel and including and exluding drivers is here
https://www.olimex.com/wiki/Build_Bootable_SD_Card_with_Debian
you would need to boot with an SD card though

I have not seen much talk at all on the forums about customizing the android kernel, olimex may be the only one that can answer that one for you.

good luck

pieter

Hi Luke,

I am also looking for spi support in Android.

If you have a solution, please, let it know.
When I have found it, I will report back.

Currently, I am trying to (A13-OLinuXino User's Manual, Chapter 2.6):
- change the config file (A13_config_600x800.fex_ok)
   * Change in [spi2_para] spi_used in 1
- compile it to a .fexbin
- mount nanda in android
- push it to /sdcard/nanda/config.bin
- reboot android

Unfortunatly, this did not succeed.

Best regards,

Pieter

MastaChau

pieter and luke: have either of you gotten this to work?
pieter: did you recompile the kernel to enable SPI?  Luke may have done this.
I'm still trying to figure out how to do this...