IOS Bluetooth 4.0 Learning

Source: Internet
Author: User

Peripheral ( peripheral) is a device that has been or has stored data ,

Central is thedevice that uses this data .

All the availableIOS devices can also be used as a peripheral (Per ipheral) or as central , but cannot be both peripheral and central .

Peripheral Equipment: As a service side, to provide services to the outside world, send data to the central equipment.
Central equipment: As a client, scan peripheral devices, and then Connect, find the appropriate services and features provided by peripheral equipment , receive data.

One peripheral equipment (peripheral, service side)

Need to follow proxy methods

<CBPeripheralManagerDelegate>

The main classes are:

Peripheral Equipment Management

@property (strong,nonatomic) Cbperipheralmanager *peripheramanager;

Characteristics

@property (strong,nonatomic) cbmutablecharacteristic *customercharacteristic;

Service

@property (strong,nonatomic) Cbmutableservice *customerservice;

    1. Create a feature
    2. Create a service
    3. Loading features onto the service
    4. Start the broadcast service
    5. Waiting for connections and subscriptions
    6. Send data to a central device

Two Center devices (Central, client)

Proxy methods to follow

<CBCentralManagerDelegate,CBPeripheralDelegate>

The main classes are:

Central Device Management

@property (strong,nonatomic) Cbcentralmanager *centralmanager;

Variant data

@property (strong,nonatomic) Nsmutabledata *mutabledata;

Peripheral equipment

@property (strong,nonatomic) cbperipheral *peripheral;

    1. Create a central Device Manager
    2. Scan peripheral Devices
    3. Connecting peripheral devices
    4. Services for Scanning peripherals
    5. Matching features for scanning peripheral services
    6. Receive data
    7. Disconnect Connection

IOS Bluetooth 4.0 Learning

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.