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

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.

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.

HM-10 bluetooth pairing with iPhone

I am using a HM-10 bluetooth to pair with my iPhone but I noticed that HM-10 can't be paired with iPhone using the "settings". It just won't show up in my bluetooth list. I will need a special app like "Lightblue" or "Bluecap" to pair it.
My question is, if I need a certain app to pair the bluetooth module with my iPhone, why is that many devices such as bluetooth speakers could be paired using the "settings" even without having an app?
Are there any bluetooth modules that could be paired without having an app like "Lightblue" or "Bluecap"?
Pairing through settings is only available for devices that use legacy profiles such as handsfree or A2DP.
Bluetooth Low Energy devices, such as the HM-10 are discoverable by any app using Core Bluetooth. Apps, like LightBlue, are just general purpose BLE apps that let you explore available BLE devices.
BLE devices only require pairing if they are using encryption on their characteristics. In this case, iOS will show the pairing dialog and complete the pairing process when the app attempts to read the encrypted characteristic.
To use the HM-10 you will need to write your own app to perform whatever communication task you are trying to achieve.
You can use nrf52832 as Bluetooth module.
If you are not making hobby project hm10 is very bad choice
I shifted from hm10 to nrf52832 before 6 months

can I have a BLE device (maybe an app on mac) pair with iphone bluetooth without an app on the phone

I want to write an OSX app (about bluetooth keyboard) use bluetooth to control my iphone. so my mac act as a bluetooth keyboard. I do know there are several softwares to do this, but I still want to know how to make it. I can't discover my macbook bluetooth in the iphone system bluetooth menu.
As I understand it, pairing is a feature of Bluetooth 1.0, not BLE. Bluetooth keyboards and such use Bluetooth 1.0, which requires pairing.
BLE is a simpler, low power API that does not require pairing. It involves advertising and subscribing to "services".
Apple requires you to sign up for a separate SDK in order to develop "old school" Bluetooth devices like keyboards and headsets that pair with their hardware.

iOS device communication with bluetooth enabled device

I have a specific requirement to communicate an iOS device with a wifi/bluetooth enabled device. At this moment, I'm confused with some points and requires an expert advice.
Can I use adhoc wifi method for communicating? but in this case, can I connect to another network? On my research, I found no so I'm opting for Bluetooth.
If I go in bluetooth communication,
Do the device need MFI licensing or can we use classic bluetooth?
From few blogs I found out that Bluetooth low enrgy devices with 4.0 can be used to communicate with ios without licensing. Will this work?
PS: My requirement is to send strings of data to and fro from the ios and other wifi/bluettoth enabled devices.
An iOS device can only be connected to a single Wi Fi network at a time, so an Ad-hoc network connection probably won't work for you.
If you join the MFi program you can use the Wireless Accessory Configuration (WAC) feature to simply the process of connecting your device to the user's existing network.
If you use Bluetooth Low Energy/Bluetooth Smart/Bluetooth 4.0 then you don't need to go through the MFi program, but you are limited to iPhone 4S and later and iPad 3 and later. If you use "classic Bluetooth" (Say Bluetooth 2.1 Serial Port Protocol) then it will work with all devices but you need to go through MFi.
Bluetooth Low Energy isn't great for high data volumes (say video streaming) but is fine for smaller amounts of data (you talk about "strings" so it will probably be suitable for you).
The other advantage of BLE is that it is independent of the iOS device's Internet connection so the user can cary the BLE device around and maintain communication regardless of their WiFi connection.

iOS - Connecting BLE device to app and 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.

Resources