https://wejn.org/2021/04/multi-weekend-project-reversing-yamaha-yas-207-remote-control/ [favicon-32] Wejn.org * Posts * Tags * About Written on 2021-04-11 Multi-weekend project intro: Putting the fear of AirPlay into Yamaha YAS-207 soundbar bluetooth raspi reversing unix yas_207 Introduction Recently I bought a "Yamaha YAS-207" soundbar to replace our old and clunky 2.1 PC-speaker based sound solution for TV and AirPlay. yas 207 soundbar I'm happy with the sound itself. However -- From the beginning I was hoping to use the Yamaha soundbar both for our TV (that we use for Switch and movies) but also for the AirPlay speaker solution I cobbled together a while ago^1. And before someone asks why didn't I buy the more expensive YAS-209 (or the even more expensive YSP-2700) that sports the AirPlay natively: well, I like my devices fairly dumb. No Alexa/Google Home/... for me, thank you. Also, where's the fun in spending 150 CHF more when you can buy the cheaper version, and then spend multiples of the price difference (and a lot of time) to get a similar feature set? Anyway. The purpose of this project is to get AirPlay and TV to work seamlessly with YAS-207. And for that, I need to completely reverse engineer the YAS-207 remote control interfaces first - in order to be able to control the soundbar programmatically. Hardware overview The Yamaha YAS-207 has four inputs: HDMI, TOSLINK, Analog (Jack 3.5mm), and Bluetooth. It sports infrared remote control, and a Bluetooth interface. The Bluetooth remote control doesn't have a published protocol, so normally one would be left at the mercy of an Android/iOS app. They call the app "Home Theater controller". Plan The plan is simple: First, reverse engineer the infrared remote because it might be beneficial to have a single remote for both the TV and the soundbar. This part should be a piece of cake. Next up, reverse the Bluetooth communication protocol. Finally, make a Raspberry Pi based AirPlay speaker that uses the remote control to automatically adjust the device's parameters (on/ off, input selection, volume, surround settings, etc) This will follow in a sequence of posts, all tagged with yas 207^2. Execution: * Part I: Reversing the Yamaha YAS-207 infrared remote protocol * Part II: Yamaha YAS-207's Bluetooth protocol: basic recon * Part III: Streaming Bluetooth Capture Data to Wireshark without Btsnoop Net Support Enabled * Part IV: Yamaha YAS-207's Bluetooth protocol: first real progress * Part V: Yamaha YAS-207's Bluetooth protocol reversed * Part VI: Yamaha YAS-207's Minimal Client (and a Soundbar Fake) * Part VII: Yamaha YAS-207 vs. Shairport Sync over TOSLINK All done (for) now. 1. From PC speakers, a raspberry pi, a usb sound card, and a sonoff switch. Because just like one does not simply walk into Mordor, one also doesn't want the speaker powered on all the time. - 2. And should put the Comparison of USB Bluetooth adapters in Linux in its proper context. :-) But I'm getting way ahead of myself. - - - | (c) 2021 Michal Jirku. I speak only for myself.