Jacob Thomas
Jacob Thomas

Reputation: 81

Bluetooth protocol names for UISupportedExternalAccessoryProtocols

I'm using iOS9 and Swift 2 to build an app that gets notification when the iPhone is connected/disconnected to the car's bluetooth. I'm using EAAccessoryManager.sharedAccessoryManager().connectedAccessories to get a list of connected accessories.

I've added UISupportedExternalAccessoryProtocols in Info.plist, but I don't know what protocols to add. Can someone nudge me in the direction where I can get these protocol names. I hope the protocol names are generic that they work with the bluetooth device in any car.

When I run the app I get 0 connected device even though my phone is connected to my car's bluetooth.

Thank You!

Upvotes: 6

Views: 5755

Answers (3)

Sandu
Sandu

Reputation: 490

You have to request the provider to get the protocol-name of the given hardware.

But as far as I understood these accessory-thing, the requirements to detect hardware via Bluetooth (with the special iPod Accessory Protocol” > iAP-Protcol) are:

  1. the hardware contains this mfi-chip
  2. you added the "Made for iOS Product Plan ID (MFi PPID)" into your info.plist (in Supported external accessory protocols)

ps.: your phone is connected via Bluetooth Low Energy

Upvotes: 1

andreaciri
andreaciri

Reputation: 452

The protocol name specified in the info.plist file of the iOS project is defined by the hardware product constructor. It must have a unique name, typically using a reverse-DNS form: com.yourcompany.product_name.

Upvotes: 0

aukana17
aukana17

Reputation: 1

You can use the sample app for EA.Framework, when you will run it will detect your classic bluetooth accessories around your iOS device. If your device is in the table of sample app check its info you will have its corresponding protocol. Write it in your .plist to communicate. That happened in my case.

Upvotes: 0

Related Questions