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
- Establishment of central equipment
- Scanning Peripherals (Discover peripheral)
- Connecting Peripherals (Connect peripheral)
- Scanning services and features in peripherals (Discover services and characteristics)
- Data interaction using features and peripherals (Explore and Interact)
- 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?
- Buy a CSR bluetooth 4.0 USB adapter, plugged in on Mac
- In terminal input sudo nvram bluetoothhostcontrollerswitchbehavior= "never"
- Restart your Mac
- 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