{"id":1243,"date":"2015-12-21T16:39:41","date_gmt":"2015-12-21T15:39:41","guid":{"rendered":"https:\/\/www.inovex.de\/\/?p=1243"},"modified":"2022-12-06T16:08:49","modified_gmt":"2022-12-06T15:08:49","slug":"android-sensor-integration-part-3-hal","status":"publish","type":"post","link":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/","title":{"rendered":"Android Sensor Integration Part 3: HAL"},"content":{"rendered":"<p><span style=\"font-weight: 300;\">In the <a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-1-sensor-stack-and-kernel-module\/\" target=\"_blank\" rel=\"noopener\">previous<\/a>\u00a0<a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-2-sensor-readings\/\" target=\"_blank\" rel=\"noopener\">parts<\/a> of this series\u00a0we had a\u00a0look at how a kernel driver works. This time we continue\u00a0to better documented areas. While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a <a href=\"https:\/\/source.android.com\/devices\/sensors\/hal-interface.html\" target=\"_blank\" rel=\"noopener\">clear interface for the Hardware Abstraction Layer<\/a> (HAL). This is\u00a0<a href=\"https:\/\/developer.android.com\/guide\/topics\/sensors\/sensors_overview.html\" target=\"_blank\" rel=\"noopener\">well documented<\/a>\u00a0with explanations of the most important functions, so in this article I will only delve into the lesser known parts.<\/span><\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\"><\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#Implementing-a-new-Sensor-Class\" >Implementing a new Sensor Class<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#Turning-on-the-hardware\" >Turning on the hardware<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#Catching-the-events\" >Catching the events<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#Stay-tuned\" >Stay tuned<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#The-Whole-Story\" >The Whole Story<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Implementing-a-new-Sensor-Class\"><\/span>Implementing a new Sensor Class<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 300;\">For HAL, the implementation is straight forward. Google provides an interface that needs to be implemented to access the existing infrastructure for sensors, called\u00a0the SensorBase class. To use the interface, we need to write an abstract proximity sensor class that inherits from this base class. It supports all official sensor types Google defines; The proximity sensor class then manages the access to our kernel driver.<\/span><\/p>\n<p><span style=\"font-weight: 300;\">The first interesting part in this class is the constructor. On instance creation, the constructor of the base class is called. To do so\u00a0we give\u00a0the SensorBase class <\/span><span style=\"font-weight: 300;\">&#8222;SRF02 input event module&#8220; as a second argument. This<\/span><span style=\"font-weight: 300;\">\u00a0is the name <a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-2-sensor-readings\/\" target=\"_blank\" rel=\"noopener\">we chose for our input events<\/a>. SensorBase calls a private function which is looking for an entry in <span class=\"lang:sh decode:true crayon-inline \">\/dev\/input<\/span>\u00a0that matches the given name and if it\u00a0exists it returns a file descriptor. And just like that\u00a0we have the first part of the connection to our kernel module.<\/span><\/p>\n<p><span style=\"font-weight: 300;\">We just set a few private variables such as <span class=\"lang:c decode:true crayon-inline\">mPendingEvent.<\/span>\u00a0That&#8217;s a\u00a0structure of\u00a0the type <span class=\"lang:c decode:true crayon-inline \">sensors_event_t<\/span>\u00a0for storing the various sensor data.<\/span><\/p>\n<pre class=\"lang:c decode:true\">ProximitySensor::ProximitySensor ()\r\n\r\n        : SensorBase (NULL, \"SRF02 input event module\"),\r\n\r\n                mEnabled (0),\r\n\r\n                mInputReader((size_t)(4)),\r\n\r\n                mHasPendingEvent(true)\r\n\r\n{\r\n\r\n        mPendingEvent.sensor = ID_PX;\r\n\r\n        mPendingEvent.type = SENSOR_TYPE_PROXIMITY;\r\n\r\n        mPendingEvent.distance = 5;\r\n\r\n        memset(mPendingEvent.data, 0, sizeof(mPendingEvent.data));\r\n\r\n        enable(0, 1);\r\n\r\n}<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Turning-on-the-hardware\"><\/span>Turning on the hardware<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 300;\">Let&#8217;s continue\u00a0to the last function called by the\u00a0constructor. Basically\u00a0<span class=\"lang:c decode:true crayon-inline \">enable()<\/span>\u00a0works the same way we enabled our sensor in the <a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-2-sensor-readings\/\" target=\"_blank\" rel=\"noopener\">last part of this series<\/a>: Writing 1 or 0 to the sysfs file activates the implemented methods. The character array \u201csysfs\u201c contains the path to this file in the sysfs. We open this file and write the command to it as a string.<\/span><\/p>\n<pre class=\"lang:c decode:true \">int ProximitySensor::enable (int32_t handle, int en) {\r\n\r\n        \/\/ ...\r\n\r\n         if (newState != mEnabled) {\r\n\r\n                 if (!mEnabled &amp;&amp; dev_name != NULL) {\r\n\r\n                         open_device();\r\n\r\n                 }\r\n\r\n                 char sysfs [PATH_MAX];\r\n\r\n\t\t  strcpy (sysfs, I2C);\r\n\r\n                 strcat (sysfs, \"value_now\");\r\n\r\n                 int fd = open (sysfs, O_RDWR);\r\n\r\n                 \/\/ ...\r\n\r\n                 else {\r\n\r\n                         char buf [2];\r\n\r\n                         buf [0] = newState ? '1' : '0';\r\n\r\n                         buf [1] = '';\r\n\r\n                         write (fd, buf, sizeof(buf));\r\n\r\n                         close (fd);\r\n\r\n                         setInitialState();\r\n\r\n                 }\r\n\r\n         }\r\n\r\n         mEnabled = newState;\r\n\r\n         mHasPendingEvent = true;\r\n\r\n         \/\/ ...\r\n\r\n}<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Catching-the-events\"><\/span>Catching the events<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 300;\">Let&#8217;s look at the most interesting part in this class: reading out the events generated in the kernel. To do so\u00a0we use a class <span class=\"lang:c decode:true crayon-inline\">InputEventCircularReader<\/span>. In the constructor we created an instance of this class called <span class=\"lang:c decode:true crayon-inline\">mInputReader<\/span>. From\u00a0this class we call the function <span class=\"lang:c decode:true crayon-inline\">fill()<\/span>\u00a0with the file descriptor we got for our entry in <span class=\"lang:sh decode:true crayon-inline\">\/dev\/input<\/span>. As long as input events are generated, we can fetch them with<\/span><span style=\"font-weight: 300;\"> <span class=\"lang:c decode:true crayon-inline\">mInputReader.readEvent(&amp;event)<\/span>. <\/span><span style=\"font-weight: 300;\">Now the events get evaluated by their types: EV_ABS stands for absolute values. If we get such an event it should have the event code ABS_DISTANCE that describes\u00a0distances between the sensor and an interaction surface. In this case, the event should be one of those\u00a0we generated in the kernel. The reading event contains the value of the last ranging, so\u00a0in <span class=\"lang:c decode:true crayon-inline\">mPendingEvent<\/span>\u00a0we set the structure to store sensor data, some information about our sensor and the\u00a0distance mentioned above. Event of the type\u00a0EV_SYN are\u00a0markers to separate events. With<\/span><span style=\"font-weight: 300;\">\u00a0<span class=\"lang:c decode:true crayon-inline \">mInputReader.next();<\/span>\u00a0<\/span><span style=\"font-weight: 300;\">we continue\u00a0to the next event.<\/span><\/p>\n<pre class=\"lang:c decode:true \">int ProximitySensor::readEvents (sensors_event_t* data, int count) {\r\n\r\n       \/\/ ...\r\n\r\n        ssize_t n = mInputReader.fill(data_fd);\r\n\r\n\t\/\/ ...\r\n\r\n        while (count &amp;&amp; mInputReader.readEvent(&amp;event)) {\r\n\r\n                int type = event-&gt;type;\r\n\r\n                if (type == EV_ABS) {\r\n\r\n                        if (event-&gt;code == ABS_DISTANCE) {\r\n\r\n                                mPendingEvent.sensor = ID_PX;\r\n\r\n                                mPendingEvent.type = SENSOR_TYPE_PROXIMITY;\r\n\r\n                                mPendingEvent.distance = (float) event-&gt;value;\r\n\r\n                                \/\/ ALOGD(\"sensor srf02 - value is : %d  \\n \", event-&gt;value);\r\n\r\n                        }\r\n\r\n                }\r\n\r\n                else if (type == EV_SYN) {\r\n\r\n\t\t\t\/\/ ...\r\n\r\n                }\r\n\r\n\t\t \/\/ ...\r\n\r\n                mInputReader.next();\r\n\r\n                mHasPendingEvent=true;\r\n\r\n        }\r\n\r\n        return numEventRecieved;\r\n\r\n}\r\n\r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Stay-tuned\"><\/span>Stay tuned<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Almost there!\u00a0In the final part\u00a0we will learn how to connect our sensor to the Android Sensor Framework. Until then head over to our website to learn more about <a href=\"https:\/\/www.inovex.de\/en\/our-services\/mobile\/internet-of-things-smart-devices\/\" target=\"_blank\" rel=\"noopener\">embedded development and the IoT<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"The-Whole-Story\"><\/span>The Whole Story<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-1-sensor-stack-and-kernel-module\/\" target=\"_blank\" rel=\"noopener\">Part 1:\u00a0Sensor Stack and Kernel Module<\/a><\/li>\n<li><a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-2-sensor-readings\/\">Part 2: Sensor Readings<\/a><\/li>\n<li><a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-3-hal\/\">Part 3: HAL<\/a><\/li>\n<li><a href=\"https:\/\/www.inovex.de\/\/android-sensor-integration-part-4-the-android-sensor-framework\/\">Part 4: The Android Sensor Framework<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In the previous\u00a0parts of this series\u00a0we had a\u00a0look at how a kernel driver works. This time we continue\u00a0to better documented areas. While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the Hardware Abstraction Layer (HAL). This is\u00a0well documented\u00a0with explanations of the most important functions, [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":13054,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"ep_exclude_from_search":false,"footnotes":""},"tags":[74],"service":[420],"coauthors":[{"id":35,"display_name":"Anna-Lena Marx","user_nicename":"amarx"}],"class_list":["post-1243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-iot","service-apps"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android Sensor Integration Part 3: HAL - inovex GmbH<\/title>\n<meta name=\"description\" content=\"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Sensor Integration Part 3: HAL - inovex GmbH\" \/>\n<meta property=\"og:description\" content=\"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\" \/>\n<meta property=\"og:site_name\" content=\"inovex GmbH\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inovexde\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-21T15:39:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-06T15:08:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2300\" \/>\n\t<meta property=\"og:image:height\" content=\"876\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Anna-Lena Marx\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting-1024x390.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:site\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna-Lena Marx\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"4\u00a0Minuten\" \/>\n\t<meta name=\"twitter:label3\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data3\" content=\"Anna-Lena Marx\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\"},\"author\":{\"name\":\"Anna-Lena Marx\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/b7d6fd8c3ec8972f3b14f0205e25d022\"},\"headline\":\"Android Sensor Integration Part 3: HAL\",\"datePublished\":\"2015-12-21T15:39:41+00:00\",\"dateModified\":\"2022-12-06T15:08:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\"},\"wordCount\":575,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg\",\"keywords\":[\"IoT\"],\"articleSection\":[\"Applications\",\"English Content\",\"General\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\",\"url\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\",\"name\":\"Android Sensor Integration Part 3: HAL - inovex GmbH\",\"isPartOf\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg\",\"datePublished\":\"2015-12-21T15:39:41+00:00\",\"dateModified\":\"2022-12-06T15:08:49+00:00\",\"description\":\"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage\",\"url\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg\",\"contentUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg\",\"width\":2300,\"height\":876,\"caption\":\"Porting an Android Embedded Setup\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inovex.de\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android Sensor Integration Part 3: HAL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inovex.de\/de\/#website\",\"url\":\"https:\/\/www.inovex.de\/de\/\",\"name\":\"inovex GmbH\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inovex.de\/de\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inovex.de\/de\/#organization\",\"name\":\"inovex GmbH\",\"url\":\"https:\/\/www.inovex.de\/de\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png\",\"contentUrl\":\"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png\",\"width\":1921,\"height\":1081,\"caption\":\"inovex GmbH\"},\"image\":{\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inovexde\",\"https:\/\/x.com\/inovexgmbh\",\"https:\/\/www.instagram.com\/inovexlife\/\",\"https:\/\/www.linkedin.com\/company\/inovex\",\"https:\/\/www.youtube.com\/channel\/UC7r66GT14hROB_RQsQBAQUQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/b7d6fd8c3ec8972f3b14f0205e25d022\",\"name\":\"Anna-Lena Marx\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.inovex.de\/de\/#\/schema\/person\/image\/a8cfb531252ec2ef604ef3033c45111b\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/44ab0d3916e62a17054b8e4cea92702db304b9dcb6dd28fb9915484c1830409b?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/44ab0d3916e62a17054b8e4cea92702db304b9dcb6dd28fb9915484c1830409b?s=96&d=retro&r=g\",\"caption\":\"Anna-Lena Marx\"},\"url\":\"https:\/\/www.inovex.de\/de\/blog\/author\/amarx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Sensor Integration Part 3: HAL - inovex GmbH","description":"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/","og_locale":"de_DE","og_type":"article","og_title":"Android Sensor Integration Part 3: HAL - inovex GmbH","og_description":"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.","og_url":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/","og_site_name":"inovex GmbH","article_publisher":"https:\/\/www.facebook.com\/inovexde","article_published_time":"2015-12-21T15:39:41+00:00","article_modified_time":"2022-12-06T15:08:49+00:00","og_image":[{"width":2300,"height":876,"url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg","type":"image\/jpeg"}],"author":"Anna-Lena Marx","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting-1024x390.jpg","twitter_creator":"@inovexgmbh","twitter_site":"@inovexgmbh","twitter_misc":{"Verfasst von":"Anna-Lena Marx","Gesch\u00e4tzte Lesezeit":"4\u00a0Minuten","Written by":"Anna-Lena Marx"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#article","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/"},"author":{"name":"Anna-Lena Marx","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/b7d6fd8c3ec8972f3b14f0205e25d022"},"headline":"Android Sensor Integration Part 3: HAL","datePublished":"2015-12-21T15:39:41+00:00","dateModified":"2022-12-06T15:08:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/"},"wordCount":575,"commentCount":5,"publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg","keywords":["IoT"],"articleSection":["Applications","English Content","General"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/","url":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/","name":"Android Sensor Integration Part 3: HAL - inovex GmbH","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg","datePublished":"2015-12-21T15:39:41+00:00","dateModified":"2022-12-06T15:08:49+00:00","description":"While Google gave\u00a0the design of the kernel module into the hands of the hardware manufacturers\u00a0they define a clear interface for the HAL.","breadcrumb":{"@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#primaryimage","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2017\/06\/android-embedded-porting.jpg","width":2300,"height":876,"caption":"Porting an Android Embedded Setup"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inovex.de\/de\/blog\/android-sensor-integration-part-3-hal\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inovex.de\/de\/"},{"@type":"ListItem","position":2,"name":"Android Sensor Integration Part 3: HAL"}]},{"@type":"WebSite","@id":"https:\/\/www.inovex.de\/de\/#website","url":"https:\/\/www.inovex.de\/de\/","name":"inovex GmbH","description":"","publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inovex.de\/de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.inovex.de\/de\/#organization","name":"inovex GmbH","url":"https:\/\/www.inovex.de\/de\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","width":1921,"height":1081,"caption":"inovex GmbH"},"image":{"@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inovexde","https:\/\/x.com\/inovexgmbh","https:\/\/www.instagram.com\/inovexlife\/","https:\/\/www.linkedin.com\/company\/inovex","https:\/\/www.youtube.com\/channel\/UC7r66GT14hROB_RQsQBAQUQ"]},{"@type":"Person","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/b7d6fd8c3ec8972f3b14f0205e25d022","name":"Anna-Lena Marx","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/image\/a8cfb531252ec2ef604ef3033c45111b","url":"https:\/\/secure.gravatar.com\/avatar\/44ab0d3916e62a17054b8e4cea92702db304b9dcb6dd28fb9915484c1830409b?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/44ab0d3916e62a17054b8e4cea92702db304b9dcb6dd28fb9915484c1830409b?s=96&d=retro&r=g","caption":"Anna-Lena Marx"},"url":"https:\/\/www.inovex.de\/de\/blog\/author\/amarx\/"}]}},"_links":{"self":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/1243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/comments?post=1243"}],"version-history":[{"count":1,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/1243\/revisions"}],"predecessor-version":[{"id":39894,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/1243\/revisions\/39894"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media\/13054"}],"wp:attachment":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media?parent=1243"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/tags?post=1243"},{"taxonomy":"service","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/service?post=1243"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/coauthors?post=1243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}