Search code examples
iosbluetooth-lowenergycore-bluetoothaudio-playerexternal-accessory

How to control Music Player in iOS Device using BLE


I am having an hardware which acts as a peripheral and sends and receives BLE signals to my iPhone. I have integrated ANCS and is able to transfer firmware to that hardware in order to update it.

Now I want to control the music from my Hardware. I want to be able to Play, pause, next and previous functionalities through the interface of my hardware.

Which profiles do I need to implement on my hardware and what coding is required to be done on the iOS side. I am thinking it will be quite similar to ANCS profile but I am not getting a specific profile to implement this functionality.

Any suggestions are appreciated and code is a bonus welcome.


Solution

  • You can't do this through BLE directly.

    You will either need to implement the legacy AVRCP profile in your peripheral or install a companion app on the iOS device that can receive control events from your peripheral and issue the appropriate play/pause/skip commands via the AV framework.