The document describes designing an Internet of Things (IoT) jukebox system using the Brillo operating system that allows customers to control music playback in bars. The system uses an Intel Edison board running Brillo connected to speakers and a light sensor. It implements a Weave service that exposes music playback state and allows remote control via commands. Playback and downloading are handled by a jukebox service while volume is controlled based on ambient light levels using a separate volume service.
5. Solution: Brillo
What is Brillo ?
• Embedded OS
• Core services
• Developer kit
Image Source: Google
6. The Brillo Operating System
• Open Source
• Maintained
• Supports devices as small as 128MB
of storage and 32MB of RAM
• Customizable Hardware
Linux Kernel
Android HAL
Device
Admin
System
Services
OTA
updates
…Connectivity
7. The Brillo Core Services and the Developer Console
• Weave
• Metrics
• Crash reporting
• OTAs
Image Source: Google
8. The Brillo Developer kit
• Based on the Android.mk architecture
• Standard testing
• Android debug bridge (adb)
Image Source: Google
9. Weave
Image Source: Google
• Protocol for device discovery, provisioning,
authentication, and interaction
• Schema Driven (JSON)
• OAuth 2.0 Authentication, Google as AS
10. Intel Edison Arduino Board
• High performance dual core Intel CPU
• Wi-Fi antenna within the Edison Chip
• Support for USB, GPIOs, I2C, SPI
Image Source: intel.com
11. Grove Starter Kit & USB Speakers
• Grove Base Shield
• Grove Light Sensor
• Grove LCD
• USB Speakers
13. Software System Architecture
JBClient
USB Audio HAL
JBService
Grove LCD supportWeave support
Binder
Weave Enabled
Applications
Weave Developer Console
Android Application
Weave
Brillo OS JBVolumeService
14. Implementation: JBClient
• Connects to JBService through Binder
• Acts as middleman for all Weave - JBService
communication
• Maintains and updates the Weave device state
Image Source: developers.google.com/weave
17. Implementation: Exposed Weave States
Weave states:
• Playing status - [idle, playing, paused]
• Downloading status - [idle, downloading]
• Playlist - list of strings
Playing
Idle
Paused Idle Downloading
18. Implementation: Jukebox Service
JBService
• Ensures a healthy and stable music playing life cycle
• Uses Stagefright exposed AudioPlayer for handling music
• Uses CURL for downloading new songs
• Exposes a list of supported songs (playlist) to Jukebox Client
21. Implementation: Jukebox Volume Service
JB Volume Service
• Maps the range of supported values from Light Sensor to
volume
• Updates the system volume based on the ambient lighting
• Less light yields lower volume while more bright rooms yield
higher volume
22. Implementation: Jukebox Volume Service
Linux Kernel
libmraa
libupm
Brillo Sensors HAL
Jukebox Volume Service
Sensors HAL API
• get_sensors_list(list)
• activate(sensor, true/false)
• batch(sensor, flags, sampling period, maximum report latency)
• setDelay(sensor, sampling period)
• flush(sensor)
• poll()
libupm
• https://github.com/intel-iot-devkit/upm
libmraa
• https://github.com/intel-iot-devkit/mraa
23. Conclusions and future work
Conclusions
• It’s easy to build a Weave controllable
Jukebox using Brillo
Future work:
• Add support for multiple playlists
• Increase the context awareness