10 Replies
      Latest reply on Feb 12, 2019 1:29 AM by Max25
      AndreMuis Level 1 Level 1 (0 points)

        Hi,


             My client and I would like to experiment connecting to our accessory over Bluetooth using the PAN profile:

                 

                  https://support.apple.com/en-us/HT204387

         

        which apparently iOS supports be default. Even if I could pair and connect to the device using the Settings app, say, how could an app I create communicate with the accessory? As far as I understand it the ExternalAccessory framework is for MFi devices only. Thanks!

        • Re: Programmatically Connecting to Bluetooth
          KMT Level 9 Level 9 (13,555 points)

               >the ExternalAccessory framework is for MFi devices only

           

          Which BT are you expecting to work with?

           

          QA 1657 says this about that:

          Note: Bluetooth low energy accessories do not interface with the External Accessory framework and are not required to be MFi compliant. Instead, apps use the CoreBluetooth framework to communicate with Bluetooth low energy accessories from iOS or OS X.

          • Re: Programmatically Connecting to Bluetooth
            eskimo Apple Staff Apple Staff (10,595 points)

            The article you referenced has this text:

            With iOS, this is common with multiplayer games and Personal Hotspot on iPhone.

            Let me explain each point in turn:

            • “multiplayer games” — This is a reference to Bonjour’s peer-to-peer Bluetooth networking.  Under the covers this used a Bluetooth PAN but the signalling required to set it up is documented for third-party use.

              Note This support was removed in iOS 11, where Bonjour’s peer-to-peer networking support is restricted to peer-to-peer Wi-Fi (and that on-the-wire protocol is also undocumented for third-party use).

            • “Personal Hotspot” — This is a user-facing feature that allows standard Bluetooth PAN devices to access the Internet via the iPhone’s WWAN.

            Neither of these is appropriate for accessory integration.  Peer-to-peer Bluetooth networking is a complete non-starter:

            • It’s not documented for third-party use

            • It’s not supported on the latest round of OS releases

            Personal Hotspot is more subtle.  I have serious concerns about using this for accessory integration.  You can read this thread to learn more.

            Share and Enjoy

            Quinn “The Eskimo!”
            Apple Developer Relations, Developer Technical Support, Core OS/Hardware
            let myEmail = "eskimo" + "1" + "@apple.com"

              • Re: Programmatically Connecting to Bluetooth
                AndreMuis Level 1 Level 1 (0 points)

                Really what we'd like to know is can we use the External Accessory framework to communicxate over classic Bluetooth to our non-MFi device, or is the External Accessory framework for MFi devices only?

                 

                Also, if we can't use the External Accessory framework is there any other way we can communicate with our device over classic Bluetooth?

                 

                Thanks!

                  • Re: Programmatically Connecting to Bluetooth
                    eskimo Apple Staff Apple Staff (10,595 points)

                    is the External Accessory framework for MFi devices only?

                    Correct.

                    Also, if we can't use the External Accessory framework is there any other way we can communicate with our device over classic Bluetooth?

                    Not really.  If the accessory supports one of the standard protocols that are directly supported by iOS (like those in the AppleCare article you reference), you could try to abuse that to implement your communication (morse code to HFP perhaps? ;-) but that doesn’t strike me as a good idea.

                    Share and Enjoy

                    Quinn “The Eskimo!”
                    Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                    let myEmail = "eskimo" + "1" + "@apple.com"

                      • Re: Programmatically Connecting to Bluetooth
                        GiaBiaZol Level 1 Level 1 (0 points)

                        For transferring ~200kB of data between an external device & iPhone App:

                        1. Do you have a table that shows which iPhone models support which BLE version, or at least support DLE?

                         

                        2. For BT classic, would it require to use the External Accessory framework? Or is this only on the app development side?

                         

                        3. Since iOS does not support BT SPP profile, how would you accomplish this communication via BT on the HW development side? Is there additional tools/software for developing BT for iOS devices with the MFi license?

                         

                        4. To manufacture a product that communicates with an iPhone via BT classic, is it required that the HW developer has to obtain an MFi manufacturers license?

                         

                        5. If you are transferring an image via BLE into the photo library on your device and no application is required, is a MFi license required?

                         

                        6. If you want to develop an application for the device to accept and transfer the image, do you still have to get an MFi license if you are transferring the image data via BLE?

                        • Re: Programmatically Connecting to Bluetooth
                          arbind.yadav@gmail.com Level 1 Level 1 (0 points)

                          Hi eskimo,

                           

                          May I know is it possible to connect , pair and transfer data with external devices via bluetooth without joining MFI program?

                           

                          Regards,

                          Arbind

                    • Re: Programmatically Connecting to Bluetooth
                      arbind.yadav@gmail.com Level 1 Level 1 (0 points)

                      Hi,

                       

                      May I know if it's possible to transfer data from iphone to non-apple bluetooth devices using PAN?

                      • Re: Programmatically Connecting to Bluetooth
                        Max25 Level 1 Level 1 (0 points)

                        No