Control Bluetooth audio device with iPhone

前端 未结 2 860
-上瘾入骨i
-上瘾入骨i 2021-02-10 05:03

I am looking to write application for iPhone which will be able to control radio and CD player in car. Radio and player have Bluetooth connection available.

I started th

相关标签:
2条回答
  • 2021-02-10 05:31

    Most likely you shall not be able to do it even if your car CD player has BLE 4.0.

    With Core Bluetooth devices act as "Central" (client) or "Peripheral" (server), the peripheral "has data" and expose services with characteristics (variables). The central (client) reads data from the peripheral or subscribe for notifications.

    Your only chance is to connect to the CD player as peripheral (server) and your iPhone being the central (client). In this case the CD player must expose services that allow you to control it. To be honest I do not know how this can be done, since the central (the iPhone) will read data and receive notifications from the peripheral, not vice versa.

    Reversing roles, implementing iPhone as peripheral makes sense, but there is no predefined Bluetooth LE service for remote control, so your car CD player does not know what service to expect from you. It might work using HID service (Human Interface Device), used in general for keyboards and mouse, but according to this post the HID is forbidden by Apple on iOS.

    0 讨论(0)
  • 2021-02-10 05:46

    You can do it using CoreBluetooth if your device (CD Player) is Bluetooth 4.0 LE compliant

    0 讨论(0)
提交回复
热议问题