Dynamic Android Sensor HAL

Similar documents
AN4156 Application note

An Introduction to Android

Android Sensors This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. CC-BY Google

HP TouchPad Sensor Setup for Android

Android Concepts and Programming TUTORIAL 1

Designing An Android Sensor Subsystem Pitfalls and Considerations

Introduction to Android

Software for Android Platform VCNL4020 and VCNL3020

Architecture (SOSP 2011) 11/11/2011 Minsung Jang

Android Programming and Security

An Introduction to Android. Huang Xuguang Database Lab. Inha University

CELLS A Virtual Mobile Smartphone Architecture

Using R&S NRP-Z Power Sensors with Android TM Handheld Devices. Application Note. Products:

InvenSense MPU Axis Accelerometer Gyroscope MEMS Motion Sensor

Do Containers fully 'contain' security issues? A closer look at Docker and Warden. By Farshad Abasi,

Newton2 Developers Guide

Here to take you beyond Mobile Application development using Android Course details

Building Internet of Things Apps with Cloudant DBaaS. Andy Ellicott, Cloudant John David Chibuk, Kiwi Wearables

Android Application Development and Bluetooth Technology

Using Chroot to Bring Linux Applications to Android

file://d:\webs\touch-base.com\htdocs\documentation\androidplatformnotes52.htm

Qualcomm IR-I 2 C Bridge Demo

Hardware monitoring on Fujitsu mainboards. Hardware monitoring on Fujitsu mainboards

Nios II Software Developer s Handbook

Mobile App Management:

RCL: Design and Open Specification

Release Notes: Onsight Connect for Android Software Release Notes. Software Version Revision 1.0.0

Building a Continuous Integration Pipeline with Docker

Mellanox Academy Online Training (E-learning)

Mobile Phones Operating Systems

Camera Sensor Driver Development And Integration

How to Install Applications (APK Files) on Your Android Phone

Technical Note. TN_134 FTDI Android D2XX Driver

Do More With Less. On Driver-less Interfacing with Embedded Devices. Peter Korsgaard

Investigating sensors support in a tablet

Android: How To. Thanks. Aman Nijhawan

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

How to Convert 3-Axis Directions and Swap X-Y Axis of Accelerometer Data within Android Driver by: Gang Chen Field Applications Engineer

GPFS and Remote Shell

IceBreak FileShare. Quick Guide. File sharing with workflow management

Hardware Connections between Arduino and IMU Nori Wilkins Apr. 5, 2013

Sensor Fusion Mobile Platform Challenges and Future Directions Jim Steele VP of Engineering, Sensor Platforms, Inc.

vsphere Client Hardware Health Monitoring VMware vsphere 4.1

Application Note IMU Visualization Software

KVM: Kernel-based Virtualization Driver

ANDROID OPERATING SYSTEM

Social Media & Mobile Handheld Devices: The Platforms, Operating Systems, devices& Applications. The wireless last mile & User Interface choices

Android Environment Emulator

The Case for SE Android. Stephen Smalley Trust Mechanisms (R2X) National Security Agency

Trepn plug-in for Eclipse FAQ

Modern Market Sensors in Smartphones: State-of-the-art How to make smartphones even more smarter? Conclusions

BUSMASTER An Open Source Tool

AllJoyn Android Environment Setup Guide

Building Embedded Systems

Accelerometer and Gyroscope Design Guidelines

Decrease Your Circle of Trust: An Investigation of PKI CAs on Mobile Devices

Sunrise business sales - SIK activations

Analysis of Open Source Drivers for IEEE WLANs

Why is it a better NFS server for Enterprise NAS?

Multi-Operating Environment System

Can the smartphone sensors be used for wheelchair accessibility studies? Dr. Manik Gupta Dr. Behzad Heravi Dr. Catherine Holloway Prof.

Evading Android Emulator

USB 2.0 Flash Drive User Manual

Full version is >>> HERE <<<

Enterprise Integration using AssetWise

Mentor Embedded IVI Solutions

H MICRO CASE STUDY. Device API + IPC mechanism. Electrical and Functional characterization of HMicro s ECG patch

Board also Supports MicroBridge

New Technology Introduction: MIT App Inventor

Android Architecture. Alexandra Harrison & Jake Saxton

Virtual Hosting & Virtual Machines

Wayland Full-Screen Shell

Real-Time Android with RTDroid

Linux Powered Storage:

Open Network Linux A Network Operating System (NOS) for OCP

EXPLORING LINUX KERNEL: THE EASY WAY!

InvenSense Motion Sensor Universal Evaluation Board (UEVB) User Guide

Praktikum Entwicklung von Mediensystemen (Android)

HP AppPulse Active. Software Version: 2.2. Real Device Monitoring For AppPulse Active

Using Agile to Develop Mobile Apps

A little code goes a long way Cross-platform game development with Lua. Ivan Beliy, Software Engineer

ANDROID INTRODUCTION TO ANDROID

APPLICATION NOTE. RTD Linux Support Overview. SWM Rev C

Additional details >>> HERE <<<

Intel DPDK Boosts Server Appliance Performance White Paper

Transcription:

Dynamic Android Sensor HAL D*A*S*H Oskar Anderö Senior Software Architect E-mail: oskar.andero@sonymobile.com

D*A*S*H 2 Just another sensor HAL implementation But... Easy to integrate Configurable Scalable

D*A*S*H DASH is open-source! 3 Github: https://github.com/sonyxperiadev/dash Allows openness For mod hackers to enjoy 3rd party vendors Sensor HAL example for anyone

What we had 4 Messy code Lots of #ifdefs Many branches Different types of Linux drivers

What we wanted 5 What lead to the current situation? Different sensors on different products Different mounting on different products Different 3rd party sensor libraries for different sets of sensors What to do...? Solution: abstract the abstraction!

What we wanted 6 Scalable Configurable Common code should be common Ease integration of sensor fusion Avoid multiple branches

7

Code example 8 BMA250 Accelerometer from Bosch Linux interface is input device Polls events in kernel Polling frequency is set by sysfs Implemented in sensors/bma250_input.c

bma250_input.c 9

10

bma250_input.c...and in sensors_list.h: 11

12

bma250_input.c 13

bma250_input.c 14

bma250_input.c 15 Sensors.conf example:

16

bma250_input.c 17

18

bma250_input.c 19

20

bma250_input.c 21

Case study: integrate on Xperia S 22

Case study: integrate on Xperia S 23

Case study: integrate on Galaxy Nexus 24

Case study: integrate on Galaxy Nexus 25 Step 1: What kernel drivers do we have? Step 2: Write user-space drivers Step 3: Build it Step 4: Push it to target

What kernel drivers do we have? 26 Step 1: What kernel drivers do we have? Use some application adb shell dmesg adb shell getevent -i We are lucky: look in AOSP code! Result: Sharp GP2A proximity and light sensor Bosch BMP180 pressure sensor Invensense MPU3050 Gyroscope BMA250 Accelerometer YAS530 Compass

Writing user-space drivers have 27 Step 2: Writing user-space driver Create a BMP180 user-space driver Already included in DASH!..but the driver is not the same. Fix 1: input name is different Fix 2: sysfs attributes are different Add enable attribute Rename poll rate attribute

Writing user-space drivers have Create a Sharp GP2A proximity user-space driver 28 Again - there is already one! Fix 1: input name is different Fix 2: add handler for sysfs attribute enable

Writing user-space drivers have Create a Sharp GP2A light user-space driver Very similar to Sharp proximity 29 Uses enable sysfs and input device Fix 1: Copy-paste proximity user-space driver Fix 2: Use ABS_MISC instead of ABS_DISTANCE

Writing user-space drivers have Create MPU3050 user-space driver There is a user-space driver. Drivers and lib are incompatible with Sony solution! Fix 1: Port Galaxy invensens lib to DASH Fix 2: Add compass and accelerometer 30 Update the way DASH interfaces with the new lib SOMC version uses AKM and BMA250 through wrapper layer Fix 3: Make it polling

Building DASH 31 Step 3: Build it Make sure to enable sensors in makefile mm

Install DASH Step 4: Push it to target adb root adb remount 32 adb push $OUT/system/lib/hw/sensors.default.so \ /system/lib/hw/sensors.tuna.so adb shell stop adb shell start

All done! 33

Conclusion DASH is a... Generic Configurable Scalable Open-source!...framework for sensors 34

Questions? https://github.com/sonyxperiadev/dash 35

SONY or make.believe is a registered trademark and/or trademark of Sony Corporation. Names of Sony products and services are the registered trademarks and/or trademarks of Sony Corporation or its Group companies. Other company names and product names are the registered trademarks and/or trademarks of the respective companies.