For new age touch-based embedded devices, Android is becoming a popular OS going beyond mobile phones. With its roots from Embedded Linux, Android framework offers benefits in terms of rich libraries, open-source and multi-device support. Emertxe’s hands-on Embedded Android Training Course is designed to customize, build and deploy custom Embedded OS on ARM target. Rich set of projects will make your learning complete.
Android Things is the latest attempt from Google to connect the dots between the cloud and devices by introducing an OS that is exclusively built for IoT devices. Initially announced as project Brillo, Android Things helps developers to build devices faster and enable them integrate with cloud services. This presentation traces the architectural aspects of Android Things by connecting it back with Embedded Linux, Embedded Android and Brillo.
Embedded Android system development workshop is focused on integrating new device with Android framework. Our hands-on approach makes Emertxe as the best institute to learn android system development training. This workshop deep dives into Android porting, Android Hardware Abstraction Layer (HAL), Android Services and Linux device driver ecosystem. This workshop based training program will enable you to efficiently integrate new hardware with Android HAL / Framework.
There is a surge in number of sensors / devices that are getting connected under the umbrella of Internet-Of-Things (IoT). These devices need to be integrated into the Android system and accessed via applications, which is covered in the course. Our Android system development course curriculum over weekends with practicals ensures you learn all critical components to get started.
Embedded Android System Development - Part II talks about Hardware Abstraction Layer (HAL). HAL is an interfacing layer through which Android service can place a request to device. Uses functions provided by Linux system to service the request from android framework. A C/C++ layer with purely vendor specific implementation. Packaged into modules (.so) file & loaded by Android system at appropriate time
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Android Things is the latest attempt from Google to connect the dots between the cloud and devices by introducing an OS that is exclusively built for IoT devices. Initially announced as project Brillo, Android Things helps developers to build devices faster and enable them integrate with cloud services. This presentation traces the architectural aspects of Android Things by connecting it back with Embedded Linux, Embedded Android and Brillo.
Embedded Android system development workshop is focused on integrating new device with Android framework. Our hands-on approach makes Emertxe as the best institute to learn android system development training. This workshop deep dives into Android porting, Android Hardware Abstraction Layer (HAL), Android Services and Linux device driver ecosystem. This workshop based training program will enable you to efficiently integrate new hardware with Android HAL / Framework.
There is a surge in number of sensors / devices that are getting connected under the umbrella of Internet-Of-Things (IoT). These devices need to be integrated into the Android system and accessed via applications, which is covered in the course. Our Android system development course curriculum over weekends with practicals ensures you learn all critical components to get started.
Embedded Android System Development - Part II talks about Hardware Abstraction Layer (HAL). HAL is an interfacing layer through which Android service can place a request to device. Uses functions provided by Linux system to service the request from android framework. A C/C++ layer with purely vendor specific implementation. Packaged into modules (.so) file & loaded by Android system at appropriate time
In order to understand HAL layers of Android Framework, having Linux device driver knowledge is important. Hence Day-2 of the workshop focuses on the same.
Android Audio HAL – Audio Architecture – Audio HAL interface – Audio Policy – Audio HAL compilation & verification – Overview of Tinyalsa
Android Video HAL – Camera Architecture – Overview of camera HAL interface – Overview of V4L2 – Enabling V4l2 in kernel – Camera HAL compilation and verification
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
Communication protocols (like UART, SPI, I2C) play an very important role in Micro-controlled based embedded systems development. These protocols helps the main board to communicate with different peripherals by interfacing mechanism. Here is a presentation that talks about how these protocols actually work.
An unique module combining various previous modules you have learnt by combing Linux administration, Hardware knowledge, Linux as OS, C/Computer programming areas. This is a complete module on Embedded OS, as of now no books are written on this with such practical aspects. Here is a consolidated material to get real hands-on perspective about building custom Embedded Linux distribution in ARM.
Android Audio HAL – Audio Architecture – Audio HAL interface – Audio Policy – Audio HAL compilation & verification – Overview of Tinyalsa
Android Video HAL – Camera Architecture – Overview of camera HAL interface – Overview of V4L2 – Enabling V4l2 in kernel – Camera HAL compilation and verification
Binder is what differentiates Android from Linux, it is most important internal building block of Android, it is a subject every Android programmer should be familiar with
I have tried to present maximum detail on android booting sequence in a very abstract way. I hope it would be useful. If you find any correction needed please mention it on comments. Happy Coding :)
There are many books, articles and paper publications about Android and related applications but only a few are related to how Android operating system works internally.In this talk we will see how android boots up , an overview of zygote , how system server and package manager works. This talk will be extremely helpful to foster understanding among android developers about Android Internals as well as everybody else who desires a general understanding of the internal working of Android powered devices.
Communication protocols (like UART, SPI, I2C) play an very important role in Micro-controlled based embedded systems development. These protocols helps the main board to communicate with different peripherals by interfacing mechanism. Here is a presentation that talks about how these protocols actually work.
An unique module combining various previous modules you have learnt by combing Linux administration, Hardware knowledge, Linux as OS, C/Computer programming areas. This is a complete module on Embedded OS, as of now no books are written on this with such practical aspects. Here is a consolidated material to get real hands-on perspective about building custom Embedded Linux distribution in ARM.
This course gets you started with writing device drivers in Linux by providing real time hardware exposure. Equip you with real-time tools, debugging techniques and industry usage in a hands-on manner. Dedicated hardware by Emertxe's device driver learning kit. Special focus on character and USB device drivers.
Facing interviews is both science and an art. Typically for freshers, it becomes very challenging to face interviews. Here is a presentation that gives you practical tips and inputs to crack interviews.
Often called as the Swiss Army Knife of Embedded Linux, BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. It is written with size-optimization
and limited resources in mind. Here is a presentation that details about BusyBox.
Emertxe Information Technologies (http://www.emertxe.com) is a pioneer IT finishing school based out of Bangalore India. We offer best-in-class trainings (instructor lead, workshops, online) for making individuals business ready. Our portfolio consist of Embedded systems, Cloud computing, Mobile Application, Software Engineering.
In the Embedded side, Linux is been our center of everything we do. Our Linux portfolio consist of four major areas: Linux Systems, Embedded Linux, Linux Internals & Networking, Device drivers. Each area has multiple topics that can be targeted for students, corporate and universities. For any queries please feel free to write to us at training@emertxe.com
File system is an approach on how the data can be
organized in order to have a meaningful read or write in a
system. File systems provides a very easy way of identifying data like where it begins and ends. The group of such data can be called as “Files”. The method used to manage these groups of data can be called as “File systems”
Lot of book tells about what is programming. Many also tell how to write a program, but very few cover the critical aspect of translating logic into a program. Specifically, in this fast paced industry, when you don't have time to think to program, this course comes really handy. It builds on the basics of programming, smooth sailing through the advanced nitty-gritty’s of the Advanced C language by translating logic to code
In Embedded system a set of applications used to perform a complex task or to create a product, which is typically another computer program or a system of programs. Tools are linked (or chained) together by specific stages. Output or resulting environment state of the tool becomes input or starting environment for the next one. By default the host contains some development tools which are called native tool-chain. Here is the presentation that shares mode details on components of tool-chain and how to build them for your own embedded distribution.
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. Starting with basics of Linux this presentation talks about basic commands, vi editor, shell scripting and advanced commands
Embedded systems is a special purpose device that does a particular functionality in a most optimized way. Designed as a combination of custom HW & SW, programming Embedded systems require some special considerations to be taken care. Here is a presentation that gives introduction to embedded systems.
Coming up with optimized C program for Embedded Systems consist of multiple challenges. This presentation talks about various methods about optimizing C programs in Embedded environment. It also has some interesting tips, Do's and Dont's that will offer practical help for an Embedded programmer.
Emertxe Information Technologies (http://www.emertxe.com) is a pioneer IT finishing school based out of Bangalore India. We offer best-in-class trainings (instructor lead, workshops, online) for making individuals business ready. Our portfolio consist of Embedded systems, Cloud computing, Mobile Application, Software Engineering. These training programs are targeted for students, corporate and universities with heavy stress on applied & practical learning. In case of any queries please free to get in touch with us at training@emertxe.com
Preparing impressive resume is key in getting jobs. As entry level engineer is really important to build it by taking a step-by-step approach. Here are the set of slides that will help you to build resume in a practical way.
Data Structures, which is also called as Abstract Data Types (ADT) provide powerful options for programmer. Here is a tutorial which talks about various ADTs - Linked Lists, Stacks, Queues and Sorting Algorithms
Buildroot is a set of Makefiles and patches that makes it
easy to generate a complete embedded Linux system. It generates root file system images ready to be used. Complete build system based on the Linux Kernel configuration system and supports a wide range of target architectures. Here is a presentation that gives a practical quick start to build-root.
The U-Boot is an "Universal Bootloader" ("Das U-Boot") is a monitor program that is under GPL. This production quality boot-loader is used as default boot loader by several board vendors. It is easily portable and easy to port and to debug by supporting PPC, ARM, MIPS, x86,m68k, NIOS, Microblaze architectures. Here is a presentation that introduces U-Boot.
BeagleBone Black is one of the most popular open hardware that is available to learn Embedded Linux. This versatile platform helps you to explore different set of peripherals and helps you to load a custom Embedded distribution. This presentation briefly introduces you with BeagleBone Black.
This slide deck contains the requirement for Android Penetration testing using some open source tools and techniques. And it also cover OWASP TOP 10 Mobile, MSTG and MASVS guidelines for Mobile Application Penetration testing
The smart home automated control system is an integrated system to facilitate elderly and disabled people with an easy-to-use home automation system that can be fully operated based on android application. The system is portable and constructed in a way that is easy to install, configure, run, and maintain. A typical wireless smart home automation system allows one to control house hold appliances centralize control unit which is wireless.
Did you know that Android vendors (Samsung, Huawei, etc.) have a very long and challenging way from the open-source Android OS to a commercial-grade product?
We analyzed three commercial versions of the Android OS with fault injection, and found reliability and security issues such as device freezes, stuck UIs, reboot loops, and data leaks, etc.
India missed the PC revolution, we were very late for with the internet revolution but with mobile revolution India is bang on. We use the same phones as in people of any other country and so is our young developers which create apps that earn millions apps that change the way the world interacts. At itvedant the focus is not only to teach the basics of app development but to make you understand the process of app development. With expert faculties you learn the best tips and tricks right under their hands. Learning mobile app development is fun filled and challenging. From the refreshment of java to most advance application development training we take you till the zenith of app development.
Core Android : By learning core android you would be able to develop your own android application which you can upload on google playstore. To start with this module you should have knowledge of Core Java. In this module you will learn to create different layouts, linking layouts using activities, intents and developing fragments (all basics which require to develop android app) using Android studio. You will be able to develop apps like recipe app, Todo List app, Wallpaper image gallery app. Develop advanced apps by learning advanced android.
Advance Android : Simply learning core android would not help you develop all kind of apps. Get the knowledge of advanced concepts by learning advanced android. This module will help you to learn.
Accessing web services and their data which helps developing apps like amazon, ola, quicker. Managing SQLite database helps developing apps like expense manager, Personal diary, reminders. Accessing geo-location api which helps to create apps like ola, uber
Social media integration helps adding functionality of Facebook login into your app. Create aesthetic designs using Material design
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
2.
Android HAL – Overview
✔
Sensor HAL
✔
Understanding data structures and APIs
✔
Adding support for a new sensor
✔
Writing test application for Sensor
Table of Content
4. Why Android HAL?
●
Linux is designed to handle only systems calls from application
●
Android frameworks communicates with the underlying hardware
through Java APIs not by system calls
●
Android HAL bridges the gap between Android app framework and Linux
device driver interface
●
The HAL allows you to implement functionality without affecting or
modifying higher level system
Java Apps Linux Device Driver
HAL
5. What is Android HAL?
●
Provides API’s through which Android service can place a request to
device
●
Uses functions provided by Linux system to service the request from
android framework
●
A C/C++ layer with purely vendor specific implementation
●
Packaged into modules (.so) file & loaded by Android system at
appropriate time
“The hardware abstraction layer (HAL) defines a
standard interface for hardware vendors to implement
and allows Android to be agnostic about lower-level
driver implementations”
“The hardware abstraction layer (HAL) defines a
standard interface for hardware vendors to implement
and allows Android to be agnostic about lower-level
driver implementations”
8. Android HAL
(Architecture)
●
Each hardware-specific HAL interface has properties that are
defined in hardware/libhardware/include/hardware/hardware.h
●
It guarantees that HALs have a predictable structure
●
Above interface allows Android system to load correct versions of
your HAL modules consistently
9. Android HAL
(Architecture)
●
HAL interface consists of two general components
✔
Module - Android HAL - automatically loaded by the dynamic linker
(sensor.rpi3.so)
✔
Device – Device Specific HAL (provides complete abstraction and
control over device vendor) – appropriately loaded at run time
Module 1
Device 0
Device 1
10. Android HAL
(Module)
●
A module, stored as a shared library (.so file), represents packaged HAL
implementation
●
Contains metadata such as version, name, and author of the module,
which helps Android find and load it correctly
●
The “hardware.h” header file defines struct hw_module_t
●
This strtucture represents a module & contains information such as
module version, author and name
●
API are in <aosp>/hardware/libhardware/include/hardware
11. Android HAL
(Module...)
●
In addition, hw_module_t struct contains a pointer to another struct,
hw_module_methods_t, that contains a pointer to an "open" function
for the module
●
“open” function is used to initiate communication with the hardware
●
Each “hardware-specific HAL” usually extends generic hw_module_t
struct with additional information for that specific piece of hardware
12. Android HAL
(Module hw_module_t)
# Member Type Description
1 tag Integer HARDWARE_MODULE_TAG
2 module_api_version Interger Module interface version (Minor +
Major)
3 hal_api_version Integer Meant to version module, module
methods and device
4 id String Ex - “DHT11”
5 name String Ex - “Temperature Sensor”
6 author String Ex - “Emertxe”
7 methods Pointer Open method
8 dso Pointer Pointer to DSOs
9 Reserved Bytes Reserved 128 bytes for future use
13. Android HAL
(Module...)
●
For example in the camera HAL, the camera_module_t struct contains a
hw_module_t struct along with other camera-specific function pointers
typedef struct camera_module {
hw_module_t common;
int (*get_number_of_cameras)(void);
int (*get_camera_info)(int camera_id, struct camera_info *info);
} camera_module_t;
14. Android HAL
(Naming a module)
●
Use HAL_MODULE_INFO_SYM name while creating module in your
HAL
●
Example : Audio module
struct audio_module HAL_MODULE_INFO_SYM = {
.common = {
.tag = HARDWARE_MODULE_TAG,
.module_api_version = AUDIO_MODULE_API_VERSION_0_1,
.hal_api_version = HARDWARE_HAL_API_VERSION,
.id = AUDIO_HARDWARE_MODULE_ID,
.name = "NVIDIA Tegra Audio HAL",
.author = "The Android Open Source Project",
.methods = &hal_module_methods,
},
};
15. Android HAL
(Device)
●
A device abstracts the actual hardware of your product
●
Example: an audio module can contain a primary audio device (ear-jack),
a USB audio device, or a Bluetooth A2DP audio device
●
A device is represented by the hw_device_t structure
●
APIs are in <aosp>/hardware/libhardware_legacy/include/hardware_legacy
16. HAL
(Module hw_device_t)
# Member Type Description
1 tag Integer HARDWARE_DEVICE_TAG
2 version Interger Device API version
3 module Pointer Reference to module hw_module_t
4 Padding Interger Reserved 48 bytes for future use
5 close Pointer To close function
17. Android HAL
(Device...)
●
Like a module, each type of device defines a more-detailed version of the
generic hw_device_t that contains function pointers for specific features
of the hardware
●
Example : the audio_hw_device_t struct type contains function pointers
to audio device operations
struct audio_hw_device {
struct hw_device_t common;
...
uint32_t (*get_supported_devices)(const struct audio_hw_device *dev);
...
};
typedef struct audio_hw_device audio_hw_device_t;
18. Android HAL
(Structure)
●
LDD is a HAL for Linux, therefore, Android HAL looks similar to a Linux
device driver
●
Most of the Vendor specific implementations can be done in Android
HAL (rather than the driver)
●
Therefore, the license difference between driver (Open source license
GPL) and HAL (Apache License) will give more level of abstraction to
vendor
●
The driver triggers hardware (say sensor) and deliver the data back to
HAL which is passed back to Android application
20. Sensors Overview
(What?)
●
A device that responds to a physical stimulus (as heat, light, sound,
pressure, magnetism, or a particular motion) and transmits a
resulting impulse (as for measurement or operating a control)
– MerriamWebster Dictionary
21. Sensors Overview
(What?)
●
A sensor is a device that detects and responds to some type of input
from the physical environment.The specific input could be light,
heat, motion, moisture, pressure, or any one of a great number of
other environmental phenomena.The output is generally a signal
that is converted to human-readable display at the sensor location or
transmitted electronically over a network for reading or further
processing
●
Examples – temperature, motion, light, gravity etc..
Temperature
sensor
Light sensor
22. Sensors Overview
(Why?)
●
Sensors are widely used in medical, automation, mining,
automobiles, airospace, robotics, smartphones, houses, farming and
more...
●
The data is collected, processed and results are used in important
decision making and actions
Sensors
● Smartphones
● Robotics
● Medical
● Automation
● Mining
● Airospace
● Automobiles
23. Sensors overview
(Android Sensor Stack)
Android HAL
Framework
Sensor
HAL
sensors.h
sensors.cpp
H/W manufacturer
AOSP
Sensors
Sensor Hub
Drivers
24. Sensors Overview
(Application)
●
App access sensors through APIs
●
App shall rgister to a sensor
●
App specifies its preferred sampling frequency and its latency
requirements
●
Example :
✔
Register with accelerometer
✔
Request events at 100Hz
✔
Events to be reported with a 1-second latency
●
The application will receive events from the accelerometer at a rate
of at least 100Hz, and possibly delayed up to 1 second
25. Sensors Overview
(Framework)
●
Framework links several applications to HAL
●
HAL itself is single-client
●
Requests are multiplexed by framework to enable access to sensors
by many apps
●
When first app registers to a sensor, the framework sends a request
to the HAL to activate the sensor
●
Framework sends updated requested parameters to HAL for
additional registeration requests from other apps to same sensor
●
Frameworks deactivates the sensor on exit of last app to avoid
unwanted power consumption
26. Sensors Overview
(Framework)
●
Final Sampling frequency - max of all requested sampling frequencies
●
Meaning, some applications will receive events at a frequency higher
than the one they requested
●
Final maximum reporting latency – min of all requested ones
●
If one application requests one sensor with a maximum reporting
latency of 0, all applications will receive the events from this sensor in
continuous mode even if some requested the sensor with a non-zero
maximum reporting latency
27. Sensors Overview
(Implications of multiplexing)
●
No guarantee that events won’t arrive at a faster rate
●
No mechanism to send data down from the apps to sensors or their
drivers
●
This ensures one app cannot modify the behavior of sensors and
breaking other apps
28. Sensors Overview
(The communication)
B
i
n
d
e
r
I
P
C C/C++ processJava process
J
N
I
N
a
t
i
v
e
* JNI is located in frameworks/base/core/jni/ directory
* Native framework is located in frameworks/native/
N
a
t
i
v
e
29. Sensors Overview
(Types)
Motion sensors
●
These sensors measure acceleration forces and rotational forces
along three axes
●
This category includes accelerometers, gravity sensors, gyroscopes,
and rotational vector sensors
Environmental sensors
●
These sensors measure various environmental parameters, such as
ambient air temperature and pressure, illumination, and humidity
●
This category includes barometers, photometers, and thermometers
Position sensors
●
These sensors measure the physical position of a device
●
This category includes orientation sensors and magnetometers
30. Sensors Overview
(Implementation)
Hardware-based
●
Physical components built into a handset or tablet
●
Derive their data by directly measuring specific environmental
properties such as acceleration, geomagnetic field strength, or
angular change
Software-based
●
Are not physical devices, although they mimic hardware-based
sensors
●
Derive their data from one or more of the hardware-based sensors
and are sometimes called virtual sensors or synthetic sensors
●
The linear acceleration sensor and the gravity sensor are examples of
software-based sensors
31. Sensors Overview
(Types)
Sensor Type Description Common Uses
Accelerometer Hardware Measures the acceleration force in m/s2
that is
applied to a device on all three physical axes (x, y,
and z), including the force of gravity
Motion detection
(shake, tilt, etc.)
Ambient
Temprature
Hardware Measures the ambient room temperature in
degrees Celsius (°C). See note below
Monitoring air
temperatures
Gravity Software or
Hardware
Measures the force of gravity in m/s2
that is applied
to a device on all three physical axes (x, y, z)
Motion detection
(shake, tilt, etc.)
Gyroscope Hardware Measures a device's rate of rotation in rad/s around
each of the three physical axes (x, y, and z)
Rotation detection
(spin, turn, etc.)
32. Sensors Overview
(Types)
Sensor Type Description Common Uses
Light Hardware Measures the ambient light level (illumination) in lx Controlling screen
brightness
Linear
Acceleration
Software or
Hardware
Measures the acceleration force in m/s2
that is
applied to a device on all three physical axes (x, y,
and z), excluding the force of gravity
Monitoring acceleration
along a single axis
Magnetic Hardware Measures the ambient geomagnetic field for all
three physical axes (x, y, z) in μT
Creating a compass
Orientation Software Measures degrees of rotation that a device makes
around all three physical axes (x, y, z). As of API
level 3 you can obtain the inclination matrix and
rotation matrix for a device by using the gravity
sensor and the geomagnetic field sensor in
conjunction with the getRotationMatrix() method
Determining device
position
33. Sensors Overview
(Types)
Sensor Type Description Common Uses
Pressure Hardware Measures the ambient air pressure in hPa or
mbar
Monitoring air
pressure changes
Proximity Hardware Measures the proximity of an object in cm
relative to the view screen of a device.This
sensor is typically used to determine whether
a handset is being held up to a person's ear
Phone position during
a call
Humidirt Hardware Measures the relative ambient humidity in
percent (%)
Monitoring dewpoint,
absolute, and relative
humidity
Rotation
Vector
Software or
Hardware
Measures the orientation of a device by
providing the three elements of the device's
rotation vector
Motion detection
and rotation
detection
37. Sensor Framework
●
The sensor framework is part of the android.hardware package and
includes the following classes and interfaces
✔
SensorManager
✔
Sensor
✔
SensorEvent
✔
SensorEventListener
38. Sensor Framework
Android Sensor Framework can be used for -
●
Determine which sensors are available on a device
●
Determine an individual sensor's capabilities, such as its maximum
range, manufacturer, power requirements and resolution
●
Acquire raw sensor data and define the minimum rate at which you
acquire sensor data
●
Register and unregister sensor event listeners that monitor sensor
changes
39. Sensor HAL
(Integration)
●
Step 1 – Make sure sensor is enabled in kernel
●
Step 2 – Ensure it is functioning in user space
●
Step 3 – Create source files, write Android.mk
●
Step 4 – Compile code & copy shared library to target
●
Step 5 -Test your library with Java app
46. Sensor HAL
(Testing stand alone DHT11)
●
Use testiio utility program
●
Use test-nusensors utility program
(hardware/libhardware/tests/nusensors/nusensors.cpp)
●
Use strace to debug (su mode)
47. Sensor HAL
(Sensor HAL integration)
●
Integrating Intel open source sensor HAL
✔
Copy files in hardware/rpi/
✔
Write Android.mk
✔
Compile files and copy output in /system/lib/hw
✔
Use test-nusensors to test native library
✔
Use Android Studio to test at app level
48. Sensor HAL
(Sensor Event Mapping)
# Type Name Description
1 Integer version Set to sizeof sensors_event_t
2 Integer sensor Sensor handle (identifier)
3 Integer type Sensor Type
4 Integer reserved Reserved for future use
5 Integer timestamp Time is nano-seconds
6 Union Sensor members Used based on type of sensor
7 Integer flags Reserved flags (set to zero)
8 Integer reserved1[3] For future use
●
Data received from h/w sensor shall be mapped to Android sensor
event (sensors_event_t)
●
Members of sensors_event_t are as follows
49. Sensor HAL
(Sequence of calls)
●
Device boot up : get_sensors_list is called
●
Sensor activation : batch function will be called with the requested parameters,
followed by activate(..., enable=1)
✔
In HAL version 1_0, the order was the opposite: activate was called first, followed
by set_delay
●
Activated : batch function is called when requested to change characteristics of a
sensor
●
flush can be called at any time, even on non-activated sensors (in which case it must
return -EINVAL)
●
When a sensor gets deactivated, activate(..., enable=0) will be called.
●
In parallel to those calls, the poll function will be called repeatedly to request data. poll
can be called even when no sensors are activated
50. Sensor HAL
(Sensor Interface functions)
# function Description
1 get_sensor_list (list) Called at boot up to return implemented
sensors by HAL
2 activate (sensor, enable) To activate/deactivate sensor
3 batch (sensor, flags,
sampling period, max
report latency)
Sets a sensor’s parameters, including
sampling frequency and maximum
report latency.
4 setDelay (sensor, sampling
delay)
Deprecated, used by HAL v1.0
5 flush (sensor) Flush hardware FIFO and send flush
complete event
6 poll ( ) Returns number of events or error. The
function shall never return 0.