SlideShare a Scribd company logo
1 of 26
Download to read offline
Designing the IoT “Jukebox”
with Brillo
Constantin Musca
Software Engineer at Intel
Outline
• Problem statement
• Solution
• System Architecture
• Implementation
• Conclusions and future work
• Demo
Problem statement
• Random music in bars
• Music cannot be controlled
• Lack of customer engagement
Mission
Music is personal.
Let’s eliminate random music.
Solution: Brillo
What is Brillo ?
• Embedded OS
• Core services
• Developer kit
Image Source: Google
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
The Brillo Core Services and the Developer Console
• Weave
• Metrics
• Crash reporting
• OTAs
Image Source: Google
The Brillo Developer kit
• Based on the Android.mk architecture
• Standard testing
• Android debug bridge (adb)
Image Source: Google
Weave
Image Source: Google
• Protocol for device discovery, provisioning,
authentication, and interaction
• Schema Driven (JSON)
• OAuth 2.0 Authentication, Google as AS
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
Grove Starter Kit & USB Speakers
• Grove Base Shield
• Grove Light Sensor
• Grove LCD
• USB Speakers
Hardware System Connections
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
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
Implementation: Jukebox Weave Commands Schema
"commands": {
"play": {
"parameters": {
"songName": {
"type": "string",
"minLength": 5
}
}
},
"pause": {},
"resume": {},
"stop": {},
"download": {
"parameters": {
"trackUrl": {
"type": "string",
"minLength": 5
},
"filename": {
"type": "string",
"minLength": 5
}
}
}
} Image Source: developers.google.com/weave
Implementation: Jukebox Weave State Schema
"state": {
"status": {
"type": "string",
"enum": ["idle", "playing", "paused"]
},
"songs": {
"type": "array",
"items": {"type": "string"}
},
"downloadStatus": {
"type": "string",
"enum": ["idle", "downloading"]
}
}
Image Source: developers.google.com/weave
Implementation: Exposed Weave States
Weave states:
• Playing status - [idle, playing, paused]
• Downloading status - [idle, downloading]
• Playlist - list of strings
Playing
Idle
Paused Idle Downloading
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
Implementation: Jukebox Service details
play(song)
pause()
resume()
stop()
Jukebox Player
displayVolume(volume)
displaySong(song)
displayStatus(status)
LCDServiceProxy
downloadSong(url, filename)
getPlaylist()
PlaylistManager
play(song)
pause()
resume()
stop()
download(url, filename)
getPlaylist()
JBService
Implementation: AIDL Interface
interface IJBService {
boolean is_playing();
void play(String song_name);
void pause();
void resume();
void stop();
void download(String track_url,
String filename);
boolean is_downloading();
String get_playlist();
}
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
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
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
Demo
Legal Notices and Disclaimers
•Intel technologies’ features and benefits depend on system configuration and may require enabled
hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer.
•No computer system can be absolutely secure.
•Tests document performance of components on a particular test, in specific systems. Differences in
hardware, software, or configuration will affect actual performance. Consult other sources of information
to evaluate performance as you consider your purchase. For more complete information about
performance and benchmark results, visit http://www.intel.com/performance.
•Intel, the Intel logo and others are trademarks of Intel Corporation in the U.S. and/or other countries.
*Other names and brands may be claimed as the property of others.
•© 2016 Intel Corporation.

More Related Content

What's hot

What's hot (8)

GPU Virtualization in SUSE
GPU Virtualization in SUSEGPU Virtualization in SUSE
GPU Virtualization in SUSE
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
LenovoEMC(IOMEGA) Product Presentation
LenovoEMC(IOMEGA) Product PresentationLenovoEMC(IOMEGA) Product Presentation
LenovoEMC(IOMEGA) Product Presentation
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting Walkthrough
 
Windows 10 iot core dot net notts - 27-07-15
Windows 10 iot core   dot net notts - 27-07-15Windows 10 iot core   dot net notts - 27-07-15
Windows 10 iot core dot net notts - 27-07-15
 
Cookies for kernel developers
Cookies for kernel developersCookies for kernel developers
Cookies for kernel developers
 
Network Device Development - Part 5: Firewall 104 ~ Packet Splitter
Network Device Development - Part 5: Firewall 104 ~ Packet SplitterNetwork Device Development - Part 5: Firewall 104 ~ Packet Splitter
Network Device Development - Part 5: Firewall 104 ~ Packet Splitter
 
ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 

Similar to MOSS 2016, Bucharest, Romania - Designing the IoT Jukebox with Brillo

GamingAnywhere: An Open Cloud Gaming System
GamingAnywhere: An Open Cloud Gaming SystemGamingAnywhere: An Open Cloud Gaming System
GamingAnywhere: An Open Cloud Gaming System
Academia Sinica
 
Rloynd ig2 t1 ws
Rloynd ig2 t1 wsRloynd ig2 t1 ws
Rloynd ig2 t1 ws
rosstapher
 
Music Computing - StudioBLADE Gen 3 Manual Full
Music Computing - StudioBLADE Gen 3 Manual FullMusic Computing - StudioBLADE Gen 3 Manual Full
Music Computing - StudioBLADE Gen 3 Manual Full
James Edwin Rhone Jr
 
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
Alpen-Adria-Universität
 

Similar to MOSS 2016, Bucharest, Romania - Designing the IoT Jukebox with Brillo (20)

Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problem
 
Android Multimedia Player Project Presentation
Android Multimedia Player Project PresentationAndroid Multimedia Player Project Presentation
Android Multimedia Player Project Presentation
 
Windows Azure Media Services June 2013 update
Windows Azure Media Services June 2013 updateWindows Azure Media Services June 2013 update
Windows Azure Media Services June 2013 update
 
Core audio
Core audioCore audio
Core audio
 
Voice Detection and Reverse Playback
Voice Detection and Reverse PlaybackVoice Detection and Reverse Playback
Voice Detection and Reverse Playback
 
Android Anatomy google io 2008
Android Anatomy google io 2008Android Anatomy google io 2008
Android Anatomy google io 2008
 
GamingAnywhere: An Open Cloud Gaming System
GamingAnywhere: An Open Cloud Gaming SystemGamingAnywhere: An Open Cloud Gaming System
GamingAnywhere: An Open Cloud Gaming System
 
Rloynd ig2 t1 ws
Rloynd ig2 t1 wsRloynd ig2 t1 ws
Rloynd ig2 t1 ws
 
Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)
 
ECS: Graph Driven Audio in an ECS World
ECS: Graph Driven Audio in an ECS WorldECS: Graph Driven Audio in an ECS World
ECS: Graph Driven Audio in an ECS World
 
Writing a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media playerWriting a Fullstack Application with Javascript - Remote media player
Writing a Fullstack Application with Javascript - Remote media player
 
Music Computing - StudioBLADE Gen 3 Manual Full
Music Computing - StudioBLADE Gen 3 Manual FullMusic Computing - StudioBLADE Gen 3 Manual Full
Music Computing - StudioBLADE Gen 3 Manual Full
 
Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)
 
Gaucho MP3 Player 9000
Gaucho MP3 Player 9000Gaucho MP3 Player 9000
Gaucho MP3 Player 9000
 
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
LLL-CAdViSE: Live Low-Latency Cloud-based Adaptive Video Streaming Evaluation...
 
제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs
제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs
제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs
 
IG2 Task 1
IG2 Task 1 IG2 Task 1
IG2 Task 1
 
Building Modern Audio Apps with AVAudioEngine
Building Modern Audio Apps with AVAudioEngineBuilding Modern Audio Apps with AVAudioEngine
Building Modern Audio Apps with AVAudioEngine
 
Jancke kinect programming
Jancke kinect programmingJancke kinect programming
Jancke kinect programming
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSL
 

MOSS 2016, Bucharest, Romania - Designing the IoT Jukebox with Brillo

  • 1. Designing the IoT “Jukebox” with Brillo Constantin Musca Software Engineer at Intel
  • 2. Outline • Problem statement • Solution • System Architecture • Implementation • Conclusions and future work • Demo
  • 3. Problem statement • Random music in bars • Music cannot be controlled • Lack of customer engagement
  • 4. Mission Music is personal. Let’s eliminate random music.
  • 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
  • 15. Implementation: Jukebox Weave Commands Schema "commands": { "play": { "parameters": { "songName": { "type": "string", "minLength": 5 } } }, "pause": {}, "resume": {}, "stop": {}, "download": { "parameters": { "trackUrl": { "type": "string", "minLength": 5 }, "filename": { "type": "string", "minLength": 5 } } } } Image Source: developers.google.com/weave
  • 16. Implementation: Jukebox Weave State Schema "state": { "status": { "type": "string", "enum": ["idle", "playing", "paused"] }, "songs": { "type": "array", "items": {"type": "string"} }, "downloadStatus": { "type": "string", "enum": ["idle", "downloading"] } } 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
  • 19. Implementation: Jukebox Service details play(song) pause() resume() stop() Jukebox Player displayVolume(volume) displaySong(song) displayStatus(status) LCDServiceProxy downloadSong(url, filename) getPlaylist() PlaylistManager play(song) pause() resume() stop() download(url, filename) getPlaylist() JBService
  • 20. Implementation: AIDL Interface interface IJBService { boolean is_playing(); void play(String song_name); void pause(); void resume(); void stop(); void download(String track_url, String filename); boolean is_downloading(); String get_playlist(); }
  • 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
  • 24. Demo
  • 25.
  • 26. Legal Notices and Disclaimers •Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer. •No computer system can be absolutely secure. •Tests document performance of components on a particular test, in specific systems. Differences in hardware, software, or configuration will affect actual performance. Consult other sources of information to evaluate performance as you consider your purchase. For more complete information about performance and benchmark results, visit http://www.intel.com/performance. •Intel, the Intel logo and others are trademarks of Intel Corporation in the U.S. and/or other countries. *Other names and brands may be claimed as the property of others. •© 2016 Intel Corporation.