Clarence
Clarence

Reputation: 1943

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?

Upvotes: 15

Views: 35385

Answers (3)

Don
Don

Reputation: 11

You could get a tod Smart Beacon Development kit for ~$150 and then use BGScript to code the firmware to control the BLE device from your phone or pc. todhq.com for more info.

Upvotes: 1

chwi
chwi

Reputation: 2802

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

Upvotes: 1

Etan
Etan

Reputation: 17554

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.

Upvotes: 25

Related Questions