SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
In Touch with Smart Devices
The future is connected.


Masanori Fujita
Zühlke Engineering GmbH




                              Slide 1
                              March 2012




                              Masanori Fujita

                              © Zühlke 2012
What about Android@Home?


                                                •   Android@Home announced at
                                                    Google I/O in May 2011
                                                •   Vision: “think of your entire
                                                    home as an accessory”
                                                    – Control lighting
                                                    – Collect sensor data
                                                    – Play media

                                                •   new wireless protocol to
                                                    communicate with accessories
                                                •   so far, no updates on this




In Touch with Smart Devices | Masanori Fujita                               March 2012   Slide 2   © Zühlke 2012
•   Lighting
•   Heating system
•   Washing Machine
•   Dish washer
•   Weather sensors
•   Door bell
•   Audio & Video
Supported interfaces types




                                                      GSM/3G



                                   USB                                WiFi




                                                NFC            Bluetooth



In Touch with Smart Devices | Masanori Fujita                                March 2012   Slide 4   © Zühlke 2012
Traditional Roles



                                                          Accessory

                            Master Device

                                                          Accessory

            •       PCs                         •   Input Devices
                                                •   Mass Storage
                                                •   Printer
                                                •   Camera
                                                •   MP3 Players
                                                •   Smartphones

In Touch with Smart Devices | Masanori Fujita                 March 2012   Slide 6   © Zühlke 2012
New Roles



                                                          Accessory

                            Master Device

                                                          Accessory

            •       PCs                         •   Input Devices
            •       Smartphones                 •   Mass Storage
                                                •   Printer
                                                •   Camera
                                                •   MP3 Players
                                                •   Smartphones

In Touch with Smart Devices | Masanori Fujita                 March 2012   Slide 7   © Zühlke 2012
USB Host Mode


                                                  •   USB host is required to provide
                                                      500mA current
                                                  •   USB On-the-Go is used to act as
                                                      limited USB host
                                                  •   USB Host Mode is optional
                                   Accessory




                                      Accessory



In Touch with Smart Devices | Masanori Fujita                               March 2012   Slide 8   © Zühlke 2012
Open Accessory
Development Kit




     USB Host     USB Slave
Android
                Phone


Dev. Machine
ADK Initialization Process




                                                                            Wait for Android                               Request USB
                                                                            device to connect                            device descriptor



                                                Accessory
                                                                 Power On                        Android device
                                                                                                   connected
                                                                                                                                                                                        Request
                                                                                                                                                                                    accessory support
                                                Android Device




                                                                                                                                                              Send
                                                                                                                                     no                  OEM’s vendor
                                                                                                                                                         and product ID


                                                                            Wait for accessory
                                                                               to connect

                                                                 Power On                                         Device in accessory mode?
                                                                                                                                                                          Send
                                                                                                                                              yes                    Google’s vendor
                                                                                                                                                                     and product ID



In Touch with Smart Devices | Masanori Fujita                                                              March 2012                         Slide 11                    © Zühlke 2012
Android: Many form-factors



       Samsung Galaxy S II

                                                                             HTC Velocity 4G

                                                Motorola Pro+




In Touch with Smart Devices | Masanori Fujita                   March 2012      Slide 12   © Zühlke 2012
USB Support in Android



                                                                                                                             Oct-11
                                                                                                                              4.0

                                                                                                      Feb-11 May-11 Jul-11
                                                                                                        3.0   3.1    3.2
                                                             Oct 09   Jan 10   May 10       Dec-10
                                                              2.0       2.1     2.2          2.3
         Sep-08                  Feb-09         Apr 09   Sep-09
           1.0                     1.1           1.5       1.6




   Sep 2008                                                                                                                                       Mar 2012




                                                                                         ADK (since 3.1 + 2.3.4)
                                                                                        USB Host Mode (since 3.1)

In Touch with Smart Devices | Masanori Fujita                                            March 2012             Slide 13              © Zühlke 2012
•   Reliable and high speed
    connection
•   Easy handling for user and
    developer
•   Power supply and form-
    factors might be an issue for
    accessory designers
Which Bluetooth profiles does your phone
support?



                                                SPP                             HDP

                                                                  DUN

                      SIM



                                                                                       HID
                                                      FAX
                                                                    HFP




                               OPP
                                                            OPP
                                                                          HSP




In Touch with Smart Devices | Masanori Fujita                             March 2012         Slide 16   © Zühlke 2012
The built-in Bluetooth Stack




                                                Android API                                                Socket
                                                (android.bluetooth.*)



                                     Serial Port Profile (SPP)
                                                                                                     Virtual serial port
                                                                    Service Discovery
                  RFCOMM                                                 Protocol


                                                    L2CAP

                                                   Link Manager Layer
     Bluetooth
                                                   Baseband
     Controller
                                                   Radio Layer

In Touch with Smart Devices | Masanori Fujita                                           March 2012       Slide 17     © Zühlke 2012
What the API offers…


•      Scan for devices
•      Listen for incoming RFCOMM connections
•      Establish RFCOMM connections
•      Communicate with HFP, HSP, HDP, A2DP devices
•      Implement new Bluetooth profiles




In Touch with Smart Devices | Masanori Fujita   March 2012   Slide 18   © Zühlke 2012
Not all profiles use RFCOMM
Example: HID




                         Human Interface Device Profile

                                                           Service Discovery
                                                                Protocol


                                                L2CAP

                                                Link Manager Layer
     Bluetooth
                                                Baseband
     Controller
                                                Radio Layer

In Touch with Smart Devices | Masanori Fujita                                  March 2012   Slide 19   © Zühlke 2012
You should only rely on serial
communication, unless…

•      you can implement a profile in Java that solely builds
       upon RFCOMM and SDP.
•      you have a defined set of target devices
       –       accessing the native BT driver
       –       create native extensions
       –       add profiles to API
       –       compile custom ROM

•      Google defines other profiles to be mandatory for
       Android devices and offer them as API




In Touch with Smart Devices | Masanori Fujita       March 2012   Slide 20   © Zühlke 2012
•   Supported by most devices
•   Handling might be tricky for
    user
•   Only serial communication is
    guaranteed
Borrowed from nfc-forum.org
Reading and writing tags


•      Support for different
       types of tags
       – NFC Forum Type 1-4
       – Mifare *

•      API features
       – Reacting on tag
         discovery
       – Reading and writing
                                                                   passive tag with serial
         NDEF messages                          passive            number, deployment
       – Sector level I/O access
                                                                   date, date of last
                                                                   inspection etc.
                                                active

                                                                   Card emulation
                                                                   providing live status
                                                                   information, allow
                                                                   device settings



In Touch with Smart Devices | Masanori Fujita   March 2012   Slide 24           © Zühlke 2012
Beaming to and from your smart device


•      Android Beam™ is technically an NDEF push
       in peer-to-peer mode
       – Google’s own NDEF Push Protocol (NPP)
       – NFC Forum’s new Simple NDEF Exchange Protocol (SNEP)

•      No bi-directional data exchange using lower layers




                                                      active

                                                                        Realtime status
                                                                        information, allow
                                                                        device settings


In Touch with Smart Devices | Masanori Fujita        March 2012   Slide 25           © Zühlke 2012
Android as a Card


•      Card emulation is not exposed in Android API
•      Would add many valuable scenarios
•      Also consider discussion around secure elements
       – in a SIM card
       – embedded in a chip
       – on stickers




In Touch with Smart Devices | Masanori Fujita    March 2012   Slide 26   © Zühlke 2012
•   Future Android devices will
    probably have support for
    NFC
•   Easy handling for user and
    developer
•   Need to find workaround for
    missing card emulation
    mode
What is the best way to connect to your
devices and accessories?



                                                Which UX do you desire?




                                                ?
    What about security?
                                                              How does the
                                                              device’s environment
                                                              look like?


          Can you define the
                                                      How much data will
          deployment targets?
                                                      you produce?


In Touch with Smart Devices | Masanori Fujita                 March 2012   Slide 29   © Zühlke 2012
TCP / UDP
over WiFi and Mobile Network
Home Automation made easy
powered by ELV



ELV pluggable sensors and actors




In Touch with Smart Devices | Masanori Fujita   March 2012   Slide 31   © Zühlke 2012
Home Automation made easy
powered by ELV



ELV pluggable sensors and actors




                                                UART




In Touch with Smart Devices | Masanori Fujita          March 2012   Slide 32   © Zühlke 2012
Introducing Arduino


•      Open Source prototyping board
•      ATmega328 @ 16 MHz
•      14 digital and 6 analog I/O pins
•      USB
•      UART
•      I2C
•      SPI
•      Many many shields




In Touch with Smart Devices | Masanori Fujita   March 2012   Slide 33   © Zühlke 2012
Home Automation made easy
powered by ELV + Arduino + Android



ELV pluggable sensors and actors

                                  3G
                                                Internet


                                                      DSL




                                     WiFi
                                                                 UART




                                                      Ethernet




In Touch with Smart Devices | Masanori Fujita                           March 2012   Slide 34   © Zühlke 2012
Udp.begin(localPort);
    server.begin();

    Serial.begin(9600);
    while(timeStatus() == timeNotSet) {
      unsigned long t = getNtpTime();
      if (t > 0) {
        setTime(t);
      }
    }
    setSyncProvider(getNtpTime);
    setSyncInterval(60);

}


bool event_1_triggered = false;
bool event_2_triggered = false;

void loop()
{
  time_t t = now();

  for(int i = 0; i < EVENT_COUNT; i = i + 1) {
    // check whether On-Event was not fired and On-Time has been
reached
    if (!triggered_events[i*2] && hour(t) == time_table[i*FIELDS] &&
minute(t) == time_table[i*FIELDS+1]) {
      fs20.send_cmd(time_table[i*FIELDS+4], CMD_ON, 0xFF);
      triggered_events[i*2] = true;
      triggered_events[i*2+1] = false;
    }
    // check whether Off-Event was not fired and Off-Time has been
reached
    if (!triggered_events[i*2+1] && hour(t) == time_table[i*FIELDS+2]
&& minute(t) == time_table[i*FIELDS+3]) {
      fs20.send_cmd(time_table[i*FIELDS+4], CMD_OFF, 0xFF);
      triggered_events[i*2] = false;
      triggered_events[i*2+1] = true;
    }
  }

    // wait for a new client:
    Client client = server.available();

    // when the client sends the first byte, say hello:
    if (client) {
      if (client.connected() && client.available()) {
        // read the bytes incoming from the client:
        char c1 = client.read();
        char c2 = client.read();
        char c3 = client.read();
        fs20.send_cmd(c1, c2, c3);
      }
    }
SMA Solar Inverter




                     Bluetooth
Stiebel-Eltron Heating System




                                RS232
Internet of
Things
Build upon small and open
       components
   Thermometer
   Accelerometer
   External Sensors
   WiFi
      Twitter
      Email
      Text Messaging
We can make it happen.
       Today.
Masanori Fujita

mfu@zuehlke.com
@matterlobby

Weitere ähnliche Inhalte

Andere mochten auch

Peuker, Neu: Enterprise Android for the Win
Peuker, Neu: Enterprise Android for the WinPeuker, Neu: Enterprise Android for the Win
Peuker, Neu: Enterprise Android for the WinDroidcon Berlin
 
Jeff Gardner; Smarter Apps for Smarter Phones
Jeff Gardner; Smarter Apps for Smarter PhonesJeff Gardner; Smarter Apps for Smarter Phones
Jeff Gardner; Smarter Apps for Smarter PhonesDroidcon Berlin
 
Wireless Light Sensor(WL ID-01)
Wireless Light Sensor(WL ID-01)Wireless Light Sensor(WL ID-01)
Wireless Light Sensor(WL ID-01)Daniel Chen
 
Google sunum
Google sunumGoogle sunum
Google sunumsarenesse
 
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Samarth Shah
 

Andere mochten auch (7)

Pen SDK, Samsung
Pen SDK, SamsungPen SDK, Samsung
Pen SDK, Samsung
 
Peuker, Neu: Enterprise Android for the Win
Peuker, Neu: Enterprise Android for the WinPeuker, Neu: Enterprise Android for the Win
Peuker, Neu: Enterprise Android for the Win
 
Jeff Gardner; Smarter Apps for Smarter Phones
Jeff Gardner; Smarter Apps for Smarter PhonesJeff Gardner; Smarter Apps for Smarter Phones
Jeff Gardner; Smarter Apps for Smarter Phones
 
Wireless Light Sensor(WL ID-01)
Wireless Light Sensor(WL ID-01)Wireless Light Sensor(WL ID-01)
Wireless Light Sensor(WL ID-01)
 
Lg real3 d-sdk
Lg real3 d-sdkLg real3 d-sdk
Lg real3 d-sdk
 
Google sunum
Google sunumGoogle sunum
Google sunum
 
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
 

Ähnlich wie In touch with smart devices (droidcon)

Mobile monday istanbul_mark curtis
Mobile monday istanbul_mark curtisMobile monday istanbul_mark curtis
Mobile monday istanbul_mark curtisNatali Yesilbahar
 
Device market strategy lessons from the iPhone, Blackberry, Pre and Zune
Device market strategy lessons from the iPhone, Blackberry, Pre and ZuneDevice market strategy lessons from the iPhone, Blackberry, Pre and Zune
Device market strategy lessons from the iPhone, Blackberry, Pre and ZuneNathalie Magniez
 
5pen pc Technology
5pen pc Technology5pen pc Technology
5pen pc TechnologyRaga Deepthi
 
Publicis Mojito
Publicis MojitoPublicis Mojito
Publicis Mojitoisaoyagi
 
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...AIP Foundation
 
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...itnewsafrica
 
Content Creation on the iPad
Content Creation on the iPadContent Creation on the iPad
Content Creation on the iPadManesh Lad
 
Low cost smart board
Low cost smart boardLow cost smart board
Low cost smart boardTulasi Ram
 
5 pen-pc-technology-powerpoint-presentation.ppt (1)
5 pen-pc-technology-powerpoint-presentation.ppt (1)5 pen-pc-technology-powerpoint-presentation.ppt (1)
5 pen-pc-technology-powerpoint-presentation.ppt (1)Sreenath Bolgam
 
I pad configure settings
I pad   configure settingsI pad   configure settings
I pad configure settingsMichele Berner
 
Hp mini tb_e-brochure_with_hp_quick_web
Hp mini tb_e-brochure_with_hp_quick_webHp mini tb_e-brochure_with_hp_quick_web
Hp mini tb_e-brochure_with_hp_quick_webprasence21
 
5penpc 130917022422-phpapp01
5penpc 130917022422-phpapp015penpc 130917022422-phpapp01
5penpc 130917022422-phpapp01Divya Baghel
 

Ähnlich wie In touch with smart devices (droidcon) (20)

Mobile monday istanbul_mark curtis
Mobile monday istanbul_mark curtisMobile monday istanbul_mark curtis
Mobile monday istanbul_mark curtis
 
Beyond BYOD
Beyond BYODBeyond BYOD
Beyond BYOD
 
Device market strategy lessons from the iPhone, Blackberry, Pre and Zune
Device market strategy lessons from the iPhone, Blackberry, Pre and ZuneDevice market strategy lessons from the iPhone, Blackberry, Pre and Zune
Device market strategy lessons from the iPhone, Blackberry, Pre and Zune
 
5-pen pc ppt by SSS
5-pen pc ppt by SSS5-pen pc ppt by SSS
5-pen pc ppt by SSS
 
5pen pc Technology
5pen pc Technology5pen pc Technology
5pen pc Technology
 
Deck 13122011
Deck 13122011Deck 13122011
Deck 13122011
 
Publicis Mojito
Publicis MojitoPublicis Mojito
Publicis Mojito
 
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...
IBM Mobile Foundation POT - Overview of ibm endpoint manager for mobile devic...
 
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...
BYOD: Built for business, designed for end users (Feb 27, 2013 Innovation Din...
 
Sikuli
SikuliSikuli
Sikuli
 
5pen pc
5pen pc5pen pc
5pen pc
 
Content Creation on the iPad
Content Creation on the iPadContent Creation on the iPad
Content Creation on the iPad
 
Low cost smart board
Low cost smart boardLow cost smart board
Low cost smart board
 
Win 8 webinar
Win 8 webinarWin 8 webinar
Win 8 webinar
 
pen-pc
 pen-pc pen-pc
pen-pc
 
5 pen-pc-technology-powerpoint-presentation.ppt (1)
5 pen-pc-technology-powerpoint-presentation.ppt (1)5 pen-pc-technology-powerpoint-presentation.ppt (1)
5 pen-pc-technology-powerpoint-presentation.ppt (1)
 
I pad configure settings
I pad   configure settingsI pad   configure settings
I pad configure settings
 
Hp mini tb_e-brochure_with_hp_quick_web
Hp mini tb_e-brochure_with_hp_quick_webHp mini tb_e-brochure_with_hp_quick_web
Hp mini tb_e-brochure_with_hp_quick_web
 
5 pen pc technology
5 pen pc technology5 pen pc technology
5 pen pc technology
 
5penpc 130917022422-phpapp01
5penpc 130917022422-phpapp015penpc 130917022422-phpapp01
5penpc 130917022422-phpapp01
 

Mehr von Droidcon Berlin

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google castDroidcon Berlin
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_backDroidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentationDroidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkraussDroidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidconDroidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon Berlin
 

Mehr von Droidcon Berlin (20)

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google cast
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
crashing in style
crashing in stylecrashing in style
crashing in style
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 

Kürzlich hochgeladen

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

In touch with smart devices (droidcon)

  • 1. In Touch with Smart Devices The future is connected. Masanori Fujita Zühlke Engineering GmbH Slide 1 March 2012 Masanori Fujita © Zühlke 2012
  • 2. What about Android@Home? • Android@Home announced at Google I/O in May 2011 • Vision: “think of your entire home as an accessory” – Control lighting – Collect sensor data – Play media • new wireless protocol to communicate with accessories • so far, no updates on this In Touch with Smart Devices | Masanori Fujita March 2012 Slide 2 © Zühlke 2012
  • 3. Lighting • Heating system • Washing Machine • Dish washer • Weather sensors • Door bell • Audio & Video
  • 4. Supported interfaces types GSM/3G USB WiFi NFC Bluetooth In Touch with Smart Devices | Masanori Fujita March 2012 Slide 4 © Zühlke 2012
  • 5.
  • 6. Traditional Roles Accessory Master Device Accessory • PCs • Input Devices • Mass Storage • Printer • Camera • MP3 Players • Smartphones In Touch with Smart Devices | Masanori Fujita March 2012 Slide 6 © Zühlke 2012
  • 7. New Roles Accessory Master Device Accessory • PCs • Input Devices • Smartphones • Mass Storage • Printer • Camera • MP3 Players • Smartphones In Touch with Smart Devices | Masanori Fujita March 2012 Slide 7 © Zühlke 2012
  • 8. USB Host Mode • USB host is required to provide 500mA current • USB On-the-Go is used to act as limited USB host • USB Host Mode is optional Accessory Accessory In Touch with Smart Devices | Masanori Fujita March 2012 Slide 8 © Zühlke 2012
  • 9. Open Accessory Development Kit USB Host USB Slave
  • 10. Android Phone Dev. Machine
  • 11. ADK Initialization Process Wait for Android Request USB device to connect device descriptor Accessory Power On Android device connected Request accessory support Android Device Send no OEM’s vendor and product ID Wait for accessory to connect Power On Device in accessory mode? Send yes Google’s vendor and product ID In Touch with Smart Devices | Masanori Fujita March 2012 Slide 11 © Zühlke 2012
  • 12. Android: Many form-factors Samsung Galaxy S II HTC Velocity 4G Motorola Pro+ In Touch with Smart Devices | Masanori Fujita March 2012 Slide 12 © Zühlke 2012
  • 13. USB Support in Android Oct-11 4.0 Feb-11 May-11 Jul-11 3.0 3.1 3.2 Oct 09 Jan 10 May 10 Dec-10 2.0 2.1 2.2 2.3 Sep-08 Feb-09 Apr 09 Sep-09 1.0 1.1 1.5 1.6 Sep 2008 Mar 2012 ADK (since 3.1 + 2.3.4) USB Host Mode (since 3.1) In Touch with Smart Devices | Masanori Fujita March 2012 Slide 13 © Zühlke 2012
  • 14. Reliable and high speed connection • Easy handling for user and developer • Power supply and form- factors might be an issue for accessory designers
  • 15.
  • 16. Which Bluetooth profiles does your phone support? SPP HDP DUN SIM HID FAX HFP OPP OPP HSP In Touch with Smart Devices | Masanori Fujita March 2012 Slide 16 © Zühlke 2012
  • 17. The built-in Bluetooth Stack Android API Socket (android.bluetooth.*) Serial Port Profile (SPP) Virtual serial port Service Discovery RFCOMM Protocol L2CAP Link Manager Layer Bluetooth Baseband Controller Radio Layer In Touch with Smart Devices | Masanori Fujita March 2012 Slide 17 © Zühlke 2012
  • 18. What the API offers… • Scan for devices • Listen for incoming RFCOMM connections • Establish RFCOMM connections • Communicate with HFP, HSP, HDP, A2DP devices • Implement new Bluetooth profiles In Touch with Smart Devices | Masanori Fujita March 2012 Slide 18 © Zühlke 2012
  • 19. Not all profiles use RFCOMM Example: HID Human Interface Device Profile Service Discovery Protocol L2CAP Link Manager Layer Bluetooth Baseband Controller Radio Layer In Touch with Smart Devices | Masanori Fujita March 2012 Slide 19 © Zühlke 2012
  • 20. You should only rely on serial communication, unless… • you can implement a profile in Java that solely builds upon RFCOMM and SDP. • you have a defined set of target devices – accessing the native BT driver – create native extensions – add profiles to API – compile custom ROM • Google defines other profiles to be mandatory for Android devices and offer them as API In Touch with Smart Devices | Masanori Fujita March 2012 Slide 20 © Zühlke 2012
  • 21. Supported by most devices • Handling might be tricky for user • Only serial communication is guaranteed
  • 22.
  • 24. Reading and writing tags • Support for different types of tags – NFC Forum Type 1-4 – Mifare * • API features – Reacting on tag discovery – Reading and writing passive tag with serial NDEF messages passive number, deployment – Sector level I/O access date, date of last inspection etc. active Card emulation providing live status information, allow device settings In Touch with Smart Devices | Masanori Fujita March 2012 Slide 24 © Zühlke 2012
  • 25. Beaming to and from your smart device • Android Beam™ is technically an NDEF push in peer-to-peer mode – Google’s own NDEF Push Protocol (NPP) – NFC Forum’s new Simple NDEF Exchange Protocol (SNEP) • No bi-directional data exchange using lower layers active Realtime status information, allow device settings In Touch with Smart Devices | Masanori Fujita March 2012 Slide 25 © Zühlke 2012
  • 26. Android as a Card • Card emulation is not exposed in Android API • Would add many valuable scenarios • Also consider discussion around secure elements – in a SIM card – embedded in a chip – on stickers In Touch with Smart Devices | Masanori Fujita March 2012 Slide 26 © Zühlke 2012
  • 27.
  • 28. Future Android devices will probably have support for NFC • Easy handling for user and developer • Need to find workaround for missing card emulation mode
  • 29. What is the best way to connect to your devices and accessories? Which UX do you desire? ? What about security? How does the device’s environment look like? Can you define the How much data will deployment targets? you produce? In Touch with Smart Devices | Masanori Fujita March 2012 Slide 29 © Zühlke 2012
  • 30. TCP / UDP over WiFi and Mobile Network
  • 31. Home Automation made easy powered by ELV ELV pluggable sensors and actors In Touch with Smart Devices | Masanori Fujita March 2012 Slide 31 © Zühlke 2012
  • 32. Home Automation made easy powered by ELV ELV pluggable sensors and actors UART In Touch with Smart Devices | Masanori Fujita March 2012 Slide 32 © Zühlke 2012
  • 33. Introducing Arduino • Open Source prototyping board • ATmega328 @ 16 MHz • 14 digital and 6 analog I/O pins • USB • UART • I2C • SPI • Many many shields In Touch with Smart Devices | Masanori Fujita March 2012 Slide 33 © Zühlke 2012
  • 34. Home Automation made easy powered by ELV + Arduino + Android ELV pluggable sensors and actors 3G Internet DSL WiFi UART Ethernet In Touch with Smart Devices | Masanori Fujita March 2012 Slide 34 © Zühlke 2012
  • 35. Udp.begin(localPort); server.begin(); Serial.begin(9600); while(timeStatus() == timeNotSet) { unsigned long t = getNtpTime(); if (t > 0) { setTime(t); } } setSyncProvider(getNtpTime); setSyncInterval(60); } bool event_1_triggered = false; bool event_2_triggered = false; void loop() { time_t t = now(); for(int i = 0; i < EVENT_COUNT; i = i + 1) { // check whether On-Event was not fired and On-Time has been reached if (!triggered_events[i*2] && hour(t) == time_table[i*FIELDS] && minute(t) == time_table[i*FIELDS+1]) { fs20.send_cmd(time_table[i*FIELDS+4], CMD_ON, 0xFF); triggered_events[i*2] = true; triggered_events[i*2+1] = false; } // check whether Off-Event was not fired and Off-Time has been reached if (!triggered_events[i*2+1] && hour(t) == time_table[i*FIELDS+2] && minute(t) == time_table[i*FIELDS+3]) { fs20.send_cmd(time_table[i*FIELDS+4], CMD_OFF, 0xFF); triggered_events[i*2] = false; triggered_events[i*2+1] = true; } } // wait for a new client: Client client = server.available(); // when the client sends the first byte, say hello: if (client) { if (client.connected() && client.available()) { // read the bytes incoming from the client: char c1 = client.read(); char c2 = client.read(); char c3 = client.read(); fs20.send_cmd(c1, c2, c3); } }
  • 36. SMA Solar Inverter Bluetooth
  • 39. Build upon small and open components
  • 40. Thermometer  Accelerometer  External Sensors  WiFi  Twitter  Email  Text Messaging
  • 41. We can make it happen. Today.