Can an iOS app receive data from any bluetooth device? - ios

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.

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.

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?

Use bluetooth in iOS application

I'm currently digging my through the nest of using Bluetooth in my iOS application and I find it quite hard to find the information I'm looking for.
Can I turn on Bluetooth from within my app or does the user have to do it manually?
Can I use the basic Bluetooth fetaures (such as Discovery, connecting and Sending Data) with other devices running Bluetooth < 4.0 (classic)
AFAIK CoreBluetooth Framework can only be used to communicate with devices running Bluetooth 4.0+. Which framework is used to communicate with Bluetooth < 4.0 devices?
Is it possible to use Bluetooth in such a way that Apple will reject my App on App Store? And which ways would that be?
Is there a difference between paired and unparied communication? Can one communicate with another device without being paried? Can pairing be initated from an app?
To give some Context to my question: I'm currently developing a part of a Home Automation Application where the App needs to communicate with an embedded device which does not yet have Wifi. It has not been decided which Bluetooth version will run on the embedded device. The same functionality will be implemented in an Android application.
Thankful for some input from some with Bluetooth experience for iOS.
you cannot turn on Bluetooth from your app. The user must do it using settings or the control center.
unless you device is MFi certified you can only communicate with Bluetooth Low Energy devices
the external accessory framework is used to communicate with MFi devices that use "classic" Bluetooth
I am not aware of any use of Core Bluetooth that will lead to app rejection. If your app supports an MFi accessory that isn't associated with your company then your app will be rejected.
you can initiate bonding (commonly known as pairing but it is actually different) by requiring encryption for an attribute. Once the bonding is complete there is no difference in how you transfer data, but the data will be encrypted over the air.

Using central & peripheral in 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?

iPhone App - Communicate with Bluetooth Device

I'm tasked with developing an iPhone app whose first bit of functionality is to connect to a bluetooth transmitting device, receive data from that device, and use that data to do other important things. The issue I'm having is that there doesn't seem to be any good sort of SDK to work with, so I'm thinking of using the GameKit framework to search for bluetooth transmitting devices, connect to the (correct) device, and to receive data from this device.
Bullet points:
- search for bluetooth device
- connect to bluetooth device
- receive data only from the device
Tips/advice?
Apple doesn't let just any Bluetooth device to connect to an iOS device. The device must be MFi compliant.
Assuming you've been tasked with writing the app to work with your company's product, start with signing up with the MFi developer program from Apple.
Assuming the opposite, that you've been tasked with writing the app to work with a third party device make sure the product is MFi compliant. Finding a "Made for iPhone" or "Made for iPad" logo on the device or packaging is likely to indicate it is MFi compliant.
From there you should investigate the External Accessory Framework. Try reading External Accessory Programming Topics

Resources