iOS development Bluetooth (ii) Corebluetooth

Source: Internet
Author: User

Core Bluetooth usage Scenarios

Operation Ring, smart home, embedded equipment and so on (financial card reader, ECG measuring device)

Core bluetooth test is troublesome, under normal circumstances, must have at least 2 real bluetooth 4.0 devices

core Bluetooth cores structure diagram

basic knowledge of Core Bluetooth

Basic knowledge of Core Bluetooth
  • each Bluetooth 4.0 devicepresents its own Services (service) and features (characteristic) A device must contain one or more services, each of which contains several features
  • feature is the smallest unit of interaction with the outside world For example, a Bluetooth 4.0 device, with feature A to describe its factory information, with feature B to send and receive data
  • Services and features are uniquely identified with UUID, which distinguishes different services and features with UUID
  • The functions of each service and feature (characteristic) in the device are provided by the hardware manufacturers of Bluetooth devices, such as which are used for interactive ( read/write ) andwhich can get the module information. ( Read only ) etc.
Development Steps for Core Bluetooth
    1. Establishment of central equipment
    2. Scanning Peripherals (Discover peripheral)
    3. Connecting Peripherals (Connect peripheral)
    4. Scanning services and features in peripherals (Discover services and characteristics)
    5. Data interaction using features and peripherals (Explore and Interact)
    6. Disconnecting (Disconnect)
current status of Bluetooth

Most smartphones support Bluetooth 4.0(BLE)

Bluetooth chips are developing quickly and are improving in both performance and efficiency, and are becoming smaller and cheaper.

IBeacon + Bluetooth, bright future

One application: Indoor navigation

Estimote Company provides base station for IBeacon

The pre-order price for 3 IBeacon base stations is USD (RMB 610 yuan)

Estimote Company launched the IBeacon Base station of the farthest transmission distance of 50m, but they recommend the use of the 10m range of the best results

A coin cell battery can provide up to 2 years of service life for a IBeacon base station , and it is the case that the device continuously emits signals

How can I get the iOS emulator to test the Bluetooth 4.0 program?
    1. Buy a CSR bluetooth 4.0 USB adapter, plugged in on Mac
    2. In terminal input sudo nvram bluetoothhostcontrollerswitchbehavior= "never"
    3. Restart your Mac
    4. Debug your code with Xcode 4.6 and run the program on an iOS 6.1 emulator (Apple removed the support for BLE from the IOS 7.0 simulator)

Example code: Https://github.com/dongbobo1992/iOSExamples

iOS development Bluetooth (ii) Corebluetooth

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.