http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=Archos+Android+based+connected+home+solution
Archos has just launched a full connected home solution based on an Android tablet and relying on Bluetooth Low Energy accessories.
The purpose of the talk is to detail:
- how Android can play a major role in the connected home revolution
- the overall system architecture based on Android BLE, Google Cloud Messaging, Google Apps Engine, STUN/ICE remote connection
- the strategy to open up the Archos applications and accessories
Speaker : Marc de Courville, Archos CTO.
Archos is a French company and has been a player in the Android arena since Android 1.5: first to introduce Android tablets on the market and a Google certified Android TV (Archos TV Connect).
Archos is now a recognized brand for Android based tablets, phones and recently for Android based connected home solution.
2. Archos who are we? 3 strategic pillars
Tablets
Smart
phones
• 2000: first HDD based MP3
player
• 2003: first PMP MP4 player
• 2009: first Android tablet
• 2012: first certified Android
Connected
home
TV
• 201307: getting into
phones
• 201406: Android based
connected home solution
• Android since 1.5
• Google
certification since
2011
Since July 2013
Since June 2014
3. Archos connected home solution
Infrastructure-less solution: no wires and wirering, no tools
Tablet
Innovative
connected
objects
Cloud
Service
Client app
• Central control unit for the
home and bridge to the
cloud
• Autonomous interaction
between connected
objects through scenarios
and rule engine
• Simple and intuitive
Android interface
• Discrete, non intrusive ultra
minutarized objects
• Very low power and wireless
• Android, iOS compatible
Remote access
management
and
notifications
House
control at
your finger
tips
anywhere
anytime from
your
tablet/phone
on
Android/iOS
composed of 4 essential elements:
BLE+Wi-Fi+433MHz
4. Software architecture
• Tablet Android firmware
• 2 major Android applications:
– One Gateway service system (platform certificate)
running on the gateway
– One HACenter application running either on phone or
gateway taking care of the user interface
• Each connected objects firmware
7. Objects organized by rooms
User can freely organize objects in rooms with drag & drop
8. What does it do for me? Scenarios
• Know when your kids are back from school/who
enters your home: camera ball and door sensor
+
• Aziz light! Lights on when you enter living room
after sundown: smart plug and PIR: lights on at
night!
+
• At 9:30pm close rooms 433MHz roller shutters
and at sundown do the same in living room
9. Scenarios
• A set of rules to trigger
actions based sensor
inputs or time events
• How can we set rules:
program editor!
10. Example of scenario: roller shutters
• Rule editing:
– trigger at sunrise the opening of 433MHz roller shutters
11. Example of scenario: temperature
• Rule editing: monitoring
– Send notification when it is too hot
12. Example of scenario: door
• Rule editing:
– When door opens plays a ringtone on smart home tablet
13. More complex scenario: door
• Rule editing:
– When door opens take a picture of who enters and send
it via email from 8am to 8pm on some selected days of
the week
14. Archos connected home technology bricks
• Connected objects:
– Bluetooth smart with 10dBm TX power
– Support for 13 objects 24/7 always connected
– Power saving optimization
– Admissible Wi-Fi/BLE coexistence
– Proprietary GATT profiles
– Encrypted link with long terms keys
– Home tablet BLE heavily patched stack
• Remote connectivity:
– SDP exchange with GCM
– STUN/ICE to establish connection
– TCP over UDP with SSL for secure
communication
– Protobuf for data communication format
– UPnP port forwarding mechanism
• Cloud service:
– Google Apps Engine hosted Archos server
– Gateway registration
– GCM relay and notifications
– APNS support
• All can be updated over the air:
– Firmware though Archos OTA servers
– Gateway service and HACenter app through
GooglePlay
– Object firmwares included in Gateway service
apk (update speed has been optimized!)
• Wireless versatility
– Wi-Fi/BLE and a new one 433MHz with learn
and play feature
17. Preserve security
• IoT claimed not secure, our remedy:
– No user data stored in the cloud, all is on the gateway
– Communications: TCP over UDP for SSL secure links
– BLE communications using 128-bit AES with Counter Mode CBC-MAC in
connected mode
– Secure pairing of the objects requiring manual pairing mode via physical button
pressed
– Gateway knows server Certificate to prevent redirection to fake servers
– Secure pairing between gateway and remote phone/tablet using either local
connectivity or secure token with manual confirmation on gateway
18. Technical challenges solved
• Low power consumption and ultra miniaturized connected objects:
– Choice of Bluetooth Low Energy (BT4.0) technology which compared to Zigbee
offers a predictive transmission over the air (slotted TDD) allowing for the
accessories mastered and longer sleep periods and a more energy efficient
modulation
• Grant a maximum range comparable to Wi-Fi
– Maximum EIRP transmit power of 10mW (10dBm)
– Careful antenna design both on tablet and accessory sides
– GFSK modulation index of 0.5 granting longer transmission range
than Bluetooth
• Push BLE usage to its limits:
– Heavily modified Android Bluetooth stack on tablet side to:
• Increase number of simultaneous connected objects from 4 to 13
• Grant 24/7 operation without interruption
– Ensure peaceful BLE-Wi-Fi coexistence on the tablet while
sharing same antenna and frequency band (competition)
19. Bluetooth Low Energy enhancements
• Observation: BLE on 4.3/4.4
is still flaky at most
• Archos Home is running 4.2
with 4.4+/L BLE stack
backports and custom
modifications in order to:
ensure 24/7 operation in
connected mode
– BLE/Wi-Fi coexistence (chip fw
and traffic priority)/Power
saving/Stability
• Related changes shared
openly with Google/BCM/
bluetooth.org(soon)
20. BLE stack improvements (zoom)
Issue Archos solution Android AOSP
Limited number of simultaneous connected objects : 4 Stack limit increased to 32 but limited by chip implementation to 13 7 in Android L
Limited number of notification types for a given object (4) per app Stack limit increased to 10 7 in Android L
Pairing keys database not always up to date Remove and save keys when needed Solved in Android L
Default connection timings were too aggressive leading to
Set acceptable timings Solved in android L
disconnections
Cannot switch connection parameters at will (only once per
connection)
Be able to switch any time Solved in android L
Same connection parameters can be requested several times We prevent this as it can take long time to switch Not solved
Connection timing are switched back to default when discovering
services
Discard if new timings are faster Not solved
BLE commands are discarded without any feedback if one is already
in the pipe
We reply with a busy state Not solved
Random crash of the stack Pointer issue when crossing the stack layers Solved in android L
A connection could not be cancelled if it was not established Case fixed Solved in Android KitKat
Sometimes the connection data were not well cleaned Do more cleaning Solved in Android KitKat
Only the first peripheral in whitelist can connect Fix suspend/resume command Not solved
Disabling Bluetooth can fail if lots of peripherals are connected Increase timeout to let time for proper disconnections Not solved
Packets lost in stack when we are receiving lots of data and
application does not handle them quickly enough
Increase number of buffers used but can still be improved as buffer
size is 4K and BLE message uses less
Not solved
When enabling service changed indication, sometimes after a while
no notification can be received from app
Decrease timeout for indication response (important for fw
updates)
Not solved
Peripheral disconnections if several connected at same time Some fixes around round robin implementation Not solved
21. Range and coverage consideration
• Our BLE solution achieves similar or better range than Wi-Fi
IEEE802.11g OFDM lowest 6Mbps rate:
– BLE rate is 1Mbps
– Energy per bit boost factor for BLE is 6, i.e. 7.8dB, transmit power
of BLE for our solution is 10dBm and for Wi-Fi around 15-17dBm
for most routers
• All other BLE solutions are more for
body area networks and are
transmitting at 0dBm. What is the
impact in coverage?
– Path loss model for indoor ITU-R P.1238-7,
f=2400MHz
• Ltotal=20log10(f)+30log10(d)–28 in dB
– Range impact is thus 1010/30 around 0.46x
reduction in distance (more than halved)
BLE 10dBm
Wi-Fi 15dBm
BLE 0dBm
d
22. MiniCam: a strange animal
• First and only BLE VGA camera
– optimized for low power consumption
• Battery life:
– Able to take more than 1200 pictures transmitted consecutively every 5mn
before running out of battery at 3m with average size pictures (30kB)
– Mileage may vary depending on image size, battery chemistry (internal
resistance), range, foreign Wi-Fi traffic interference
• Ingredients:
– Take internally two pictures (one for auto-gain and white balance), optimized
JPG compression matrix for image size, clever buffer management for image
retransmission, manage camera IC/BLE module intercommunication buffers,
use of retention. Dynamic connection timing management for high data rate
and power saving. Battery monitory @120Hz. Non acknowledged notifications
to reach maximum throughput.
23. Expand compatibility: 433MHz
• Tablet embeds a 433MHz ASK transceiver (10dBm) and
support has been added to Android
• Primary use: extend compatibility of tablet to foreign
accessories through learn and play of remote signal
providing compatibility with most of the On-Off Keying
(OOK) based devices available on the market
– Chacon (DI-O), Blyss, Phenix, Auchan, IDK, Home Confort (SRST2-
E27)
– Support for some popular rolling codes is being added
24. Opening up
• Archos is considering opening up to
developers to provide
– Direct access to our own BLE accessories
(gattlib)
– Communication with our Gateway Service
through intents
– Links with external applications:
• Archos can call tasker through intent picker
• Compatibility with IFTTT under consideration
25. Evolve towards ubiquity and
universality
• Challenges and required
evolution:
– Convergence: unite a fragmented
world composed of pseudo-standards
and evolve towards a
perceived universal solution
Time/roadmap
– Accessibility: get away from the
professional programmatic
approach and gain in ubiquity
through self learning and auto-organization
• E.g.: automatic heating
adjustment based on presence
detection, thermal home
characteristics, weather
parameters to optimize cost or
comfort metric
Compatibility/brands
433MHz
Technologies/standard
• Two major players in standard convergence:
– Thread-group/homekit
26. What comes next
• Strengthen portfolio around 2 axis for Archos
connected home offering:
– Security/monitoring:
– Comfort/energy management