Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a simple iphone app that can connect another bluetooth device

I know some basic about iOS programming, now i want to connect my app to another non iphone device e.g. connecting to a bluetooth device that can control a light bulb on and off, or control any furnitures.

My question is, besides iOS xcode, what kind of program i need to learn in order to achieve my goal?

Is there any sources that i can learn from it?

like image 288
Clarence Avatar asked Jul 27 '12 18:07

Clarence


People also ask

Can you connect 2 Bluetooth devices to one iPhone?

Fortunately you can connect a keyboard and a pair of headphones to your iPhone at the same time, allowing you to use two Bluetooth devices at the same time. ... Both could be connected at the same time, But the iPhone would only output Bluetooth audio to one pair of headphones at one time.

Is there an app to connect Bluetooth?

Bluetooth Auto Connect is a new generation application that will allow any Android smartphone to connect Bluetooth audio headset, devices, or just pinch files. You can plug in multiple devices and headsets to your Android at once and they will work perfectly.

Is there a Bluetooth app for iPhone?

The Bluetooth Finder app for iPhone helps you find your missing Bluetooth devices. If you misplace your device, this app will let you use your iPad/iPhone that is paired to your device to help find it. Simply install this app, open it, and the app will guide you to your missing device.

Is there an app that allows you to connect multiple Bluetooth speakers?

SoundSeeder is an Android application that turns your device into a multi-speaker audio system using a wireless connection. If there's no Wi-Fi available, you can create one from your device using the Wi-Fi Direct feature or Hotspot to connect your smart speakers.


2 Answers

For Bluetooth Low Energy devices, you can use the CoreBluetooth framework to access them.

For Classic Bluetooth devices or accessories that make use of the Dock connector, the protocols are not open, and joining the Made for iPhone (MFi) program is required. I do not suggest this for beginning.

My suggestion is to buy for example a Polar Heart Rate Belt that supports Bluetooth Low Energy. These use standard protocols. Sample code is available from Apple that shows how to read out the heart rate from such a device.

As soon as you have mastered the heart rate monitor example, a next step would be to acquire a programmable Bluetooth Low Energy chip (however, often, the development tools for those are rather expensive!). Those chips can be programmed with custom profiles to listen for Bluetooth Low Energy connections and then performing defined operations (lighting a LED) when writes to characteristics occur. So, you are not limited to heart rate monitors and similar devices.

Keywords that you can search for: GATT protocol, Bluetooth Low Energy, CoreBluetooth.

I know that it's a steep learning curve for beginners, but the area is pretty new. However, I can assure you that it's a fun area.

like image 114
Etan Avatar answered Sep 21 '22 21:09

Etan


I also think that you should look in to embedded C programming for the slave device (Heart Rate Monitor)

like image 45
chwi Avatar answered Sep 23 '22 21:09

chwi