iOS - Connecting BLE device to app and iOS - ios

Is it possible for a BLE device to be connected to an iOS device using Bluetooth classic (via settings) and also be connected to the same device using BLE via an application?

Yes. You can for example use A2DP music streaming by connecting via the Settings menu and establish a concurrent BLE link from your app. Some versions of BT chips have restrictions, though, that prevent you from being a BT Classic Slave and a LE Peripheral at the same time. For these chips, BT Classic Slave + LE Central should work fine. From the iPhone side, it's no problem.

Related

swift how to develop an app performing an actual bluetooth pair

The actual bluetooth pair I am talking about is: let the app shows up in the searching list of Bluetooth of System Settings and other devices can pair to it (like we pair our device to Apple Air Pods).
But all articles I find online are talking about BLE/CoreBluetooth, I don't think these methods could make a device name shows up in the Bluetooth of System Settings.So how to develop an app performing an actual bluetooth pair? Any ideas?
The Bluetooth preferences screen only shows legacy Bluetooth peripherals. Devices advertising BLE services do not appear.
Apps on iOS do not have the ability to create and advertise legacy Bluetooth services.
If you create an app that acts as a BLE peripheral, using Core Bluetooth, and specify that encryption is required for a characteristic then you will trigger a pairing process when an app acting as a Bluetooth central on the other device connects and attempts to read/write that characteristic. Note that this requires cooperating apps on both devices.

I want to connect to iPhone's BLE through my BLE device

The purpose of this task is to connect to iPhone's BLE through BLE device to access ANCS of iphone. Please note that there is no app installed in iPhone to turn ON BLE of iPhone.
So, If we enable Bluetooth from iPhone setting, will it enable BLE along with BT classic?
Yes, if you enable BLE on an iPhone, you are enabling BT classic as well. The reason for this is that BLE is just a subset of the whole Bluetooth radio, along with BT classic. Since they use the same physical radio and chip, there is no way to enable BLE without turning on BT classic or vice versa. That being said, there is very limited functionality of BT classic on iPhones and most of that is restricted to developers unless you join the MFi program.
For more information on the different Bluetooth subsets, please see this answer:-
Can a Bluetooth LE powered device discover a classic Bluetooth device and vice-versa?
Please note that you will always have to enable Bluetooth manually on an iPhone and there is no way to enable this automatically.
I hope this helps.

On iOS SDK, Is there a way to programatically connect to a specific Bluetooth PAN?

As title stated, basically I am building a Raspberry Pi to use Bluetooth PAN to provide device to device communication, I don't want to use BLE as it is not designed for high volume traffic.
As far as I know, it is not possible to initiate bluetooth pairing or connection to a paired device programmatically on iOS.
There are few exceptions however:
1. Pairing and connection to bluetooth external accessories (MFi) is possible using Bluetooth Accessory Picker and the External Accessory Framework
2. Core Bluetooth api can be used to communicate with BLE devices
For Bluetooth PAN profile, the only choice is to connect the devices manually.
You can for example activate connection sharing (hotspot) on iPhone and let the raspberry connect to the hotspot.
You can follow this link to set up hotspot connection sharing on iPhone:
https://support.apple.com/en-us/HT204023
Cheers,
Hichem

iOS passing WIFI settings to Bluetooth (BLE) device?

based on this old question
does iOS10 SDK supports passing/sending Wifi setting/credential to a Bluetooth device? "over BLE maybe?"
I'm thinking about creating an app that will pass the current connected Wifi username/password to a Raspberry PI! is it possible?
Since every mobile devices from Apple supporting iOS10, also support Bluetooth Low Energy, yes, you can send credentials from the phone to a Bluetooth Smart peripheral device, such as a Raspberry Pi equipped with a Bluetooth 4.0 dongle for instance.
See the list of devices supporting iOS 10
See the list of Apple devices supporting Bluetooth 4.0
You simply require a custom service and characteristic on the peripheral, on which your iOS device will write the Wi-Fi credentials to store.
You can further add up security by encrypting the Wi-Fi credentials using a pre-shared key (a unique symetric key per users for instance) before sending it to the Raspberry Pi.

Ios BT Connectivity & Raspberry Pi

I have a idea that requires connecting an ios device to a Raspberry Pi without the end user having to do anything special. The device will not be connected to an existing wifi network so BT or wifi hotspot seem to be my only options, BT preferred.
I'm aware that Apple does require some sort of BT hardware approval which I wont have I'll be using generic BT hardware. Once a connection is established I then want to be able to request data or call API's running on the Raspberry PI.
Does any of this sound achievable and are there any links that may help.
There are two flavours of Bluetooth: the so-called Bluetooth Classic, and the newer Bluetooth Low Energy (also called Smart Bluetooth or Bluetooth 4.0, though this is actually incorrect as BT 4.0 includes both Classic and Low Energy).
On iOS, Bluetooth Classic devices do indeed need to go through specific processes (MFi), or use an existing BT protocol supported by iOS to be used.
However, you can connect to any Bluetooth Low Energy (BLE) device, without any need for MFi, approval, or support by iOS. This is done though the Core Bluetooth framework.
As long as Bluetooth is enable in the iDevice, you can connect to a BLE device without any user interaction (though UX usually dictates doing so, so a user can actually select a specific device if there are many "matching" devices in range).

Resources