Using central & peripheral in ios - ios

I am new to ios. i have a requirement to use BLE in ios.I have gone through the apple official documentation of apple for core bluetooth framework Here
They have talked about central & peripheral i have an app in which user will search for near by BLE devices ,select device,make connection, enter some data through text box,switch,drop down menu and send all data to another connected BLE device.
So i am confused which role my app is going to play central as well as peripheral??
I think the both??
if both then do i need to set the services & characteristics of that devices or the vendor of that device has already have done for me?

Related

CTKD implementation issue on iOS

I am working on an audio device project with dual-mode Bluetooth. I want to create a seamless connection experience with iOS devices, so I use CTKD with iOS. This gives us the ability to connect both BR/EDR and BLE without leaving our app in the system settings.
It works perfectly if the initial pairing happened inside the app. I got both BR/EDR and BLE connected and working and only one device shows on the Bluetooth page.
But if I pair the Bluetooth(BR/EDR) first in the system settings and then go to the app to pair BLE. The app initiated a new CTKD process, which creates a new BLE connection beside the BR/EDR connection.
My question is if I pair BR/EDR first in the Bluetooth settings, is there a way that I can only pair BLE and didn't trigger the CTKD while keeping the one device displayed on the Bluetooth settings page? Or anything else that can get the same result?

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.

IOS Bluetooth not discover in iPhone settings page

We are working in Blood pressure monitor project . we have implemented GATT protocol in our device to communicate with iphone / iPad . so far we are using Core bluetooth framework to communicate with our device ,Its working fine in data transmitting.
But our device is not visible / listing in iPhone Bluetooth in the settings page.
please note that we are not using any MFI chip.
Please advice what we needs to be done to make our device visible in iphone's bluetooth settings page without using MFI chip.
In order for your BLE device to show up in iOS Bluetooth settings, it has to have gone through the pairing process, as stated by Larme.
To do so, the device must have one or more characteristics that are encrypted. When your app tries to read/write/indicate on that characteristic, the read will fail with an Insufficient Authentication error code, which will then should start the pairing process. See section 25.10 in Apple's Accessory Design Guidelines - https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf
Once the user has selected to Pair in the dialog, keys are exchanged to finish the pairing process. Your device will show up in Bluetooth settings at that point.
Is there a specific reason that you want the device to show up in Bluetooth settings?

Can an iOS app receive data from any bluetooth device?

So my question is can we create an iOS app that can receive data from any bluetooth devices? Even the devices we buy it form eBay?
Any encoding when the data sent from the devices make us can not decode them? Or another description : Can the bluetooth device limit the app that can connect to them ?
Thank you very much.
An iOS app can receive data from any bluetooth device which must confirm the protocol of Bluetooth(GATT, ATT, L2CAP).
Bluetooth device can limit the device to connect by the data format(such as CRC, XOR), the device even can limit the special MAC address of bluetooth to connect if your app not sale on App Store
Below is a simple description to Core Bluetooth, please check the detail Core Bluetooth Programming Guide
The bluetooth device is a Peripheral to produce data, iOS app is a Central that can receive data or send limited data to Central.
When the Peripheral begins advertise, the Central can search and connect to it, when the connection is build, Central can notify or read the Characters in Services of Peripheral
An iOS app can connect to any device that supports the GATT profile with Bluetooth Low Energy/Bluetooth Smart using the Core Bluetooth framework.
Generally, a peripheral cannot prevent your app from connecting to the device, but your ability to read/interpret the data offered by the device will be limited by:
The documentation provided by the device vendor
Your ability to "reverse engineer" the information if documentation is not provided
Any handshake/security methods that the vendor may have implemented; For example the device may require your app to respond with specific data in response to data from the device - see point 2.
Devices that use legacy Bluetooth (i.e. not BLE) are only supported if they offer generic services such as audio - these are supported by the AV framework, or if they are MFi certified - these are supported by the External Accessory framework.

iOS BLE Supported Connection Types

I'm working on a BLE device that part of its requirements is that it'll only use connect mode between the iPhone and the peripheral (no pairing nor bonding).
According to Apple documentation Bluetooth Accessory
Design Guidelines for
Apple Products
section 3.7 Apple is using Random device address. As much as I know, when using Random device address one need to pair (in order to get the IRK).
Is there a way to have a BLE device who works with iOS and only does connect with no pairing or bonding?

Resources