This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Add support for accelerometer in omap4460 panda board

Hi all,

I am going to integrate a accelerometer with panda board in android kitkat.I have some doubts about this, if any one have any idea about that plz reply.

Doubts:

1) I'll make a accelerometer as a input device in kernel and create a kernel interface(sys/) how and where to add entry in android for accelerometer.

2) I read that any sensor needs two files

i. configuration.h --> determine sensor and path to kernel interface to os.

ii. sensor.h --> That convert a value and give to upper layer in android(sensor framework).

In android kitkat with pandaboard, Is thease files are present? and if not where to create thease files and thease files needs their own sensor library. For ex accelerometer it needs accelorometer library.How to know that thease libraryies are present or not.

Thanks

vikram

  • Hi vikram,

    What kernel do you intend to use?

    Before start development take a look at the supported accelerators at the wiki.

    http://omappedia.org/wiki/Sensors_for_OMAP

    Regards,

    Boyko

  • HI Boyko,

    Thanks for link. and ur response but my problem is in android side,i dont have any idea about configuration in android kitkat. Default there is no configuration files for sensor in android kitkat for panda board.

    N one more thing do u have any idea when stable release from ti for android kitkat on panda board will come.Coz in assembled android for  panda board has so many bugs.Still solving and understanding android kitakat.

    Regards

    Vikram

  • Hi Vikram,

    As far as I am aware sensor support is included in the AOSP kernel. For the time being i dont have official information when KitKat will be released from TI or not.

    Regards,

    Boyko

  • Hi Boyko,

    I am working on a similar problem. Am trying to add MPU-9150(Accelerometer) support to pandaboard running android 4.4. Since I don't have any prior experience with this , I am looking for starting point from where I can start understanding and implementing this support. Like if there is any reference driver?

  • Hi,

    Take a look at this source code, MPU 9150 works in a similar matter. And you  need to put the appropriate registers for the sensor.

    https://code.google.com/p/android-source-browsing/source/browse/drivers/staging/iio/?repo=kernel--tegra&name=android-tegra3-grouper-3.1-jb-mr1-fr&r=74ae38d84cf2502ca3235d04ffe76cbe386908b5#iio%2Fimu%2Fmpu%253Fstate%253Dclosed

    Regards,

    Boyko

  • Hi,

    I did add the source code and made the changes specified in README file.

    But when I compile I getting several errors 

    Got rid of some errors after including the mpu.h file but this mpu.h does not have definations for somethings and

    mpu_platform_data is different it does not have members (secondary_slave_type) .

    After some more digging on the internet I found a different mpu.h which had all this element so included the definations of the same and tried compiling but am still getting error.