Which point to start with BLE technology on iOS

2019-03-10 06:57发布

问题:

I need to develop with BLE technology. I found some introductions and source code:

http://processors.wiki.ti.com/index.php/Category:IPhone4SBLEDemo

but I didn't find any tutorial to start from scratch with this technology (CoreBluetooth framework) from choose the sensor for testing, also WWDC 2011

Is there any tutorial to start with BLE technology on iOS?

Many Thanks!

回答1:

Unfortunately there isn't much out there for the core bluetooth framework as it is relatively new. I would suggest acquiring a very solid understand of how bluetooth low energy works before writing any code.

A couple of decent resources:

Research around this site to start seeing where services and characteristics are located, and what they do.

http://developer.bluetooth.org/gatt/Pages/GATT-Specification-Documents.aspx

This site has the actual firmware implementation code of the services you will see on the bluetooth sites along with a more thorough explanation of how these things work with the supplied documentation.

http://www.ti.com/tool/cc2540dk

If all of that makes sense to you then I would obtain a device and start hacking away. The core bluetooth framework has sparse documentation but relies heavily on delegation. You will find that once you start discovering services in the delegate methods, that discovering and using characteristic values is a piece of cake.



回答2:

You should look at the following:

CBCentralManager

Here is the Sample Code you can start with:

Temperature Sensor Example from Apple.

Also Make sure: You signed into Apple for Developer Provisiong profile in order to test your application into your iPhone.

Hope this helps.