Questions tagged [cbperipheral]

The CBPeripheral class represents remote peripheral devices that your app—by means of a central manager (an instance of CBCentralManager)—has discovered advertising or is currently connected to.

The CBPeripheral class represents remote peripheral devices that your app—by means of a central manager (an instance of CBCentralManager)—has discovered advertising or is currently connected to. On CBPeripheral, you can find the following methods:

Identifying a Peripheral

identifier property

name property

delegate property

UUID property Deprecated in iOS 7.0

Discovering Services

– discoverServices:

– discoverIncludedServices:forService:

services property

Discovering Characteristics and Characteristic Descriptors

– discoverCharacteristics:forService:

– discoverDescriptorsForCharacteristic:

Reading Characteristic and Characteristic Descriptor Values

– readValueForCharacteristic:

– readValueForDescriptor:

Writing Characteristic and Characteristic Descriptor Values

– writeValue:forCharacteristic:type:

– writeValue:forDescriptor:

Setting Notifications for a Characteristic’s Value

– setNotifyValue:forCharacteristic:

Monitoring a Peripheral’s Connection State

state property

isConnected property Deprecated in iOS 7.0

Accessing a Peripheral’s Received Signal Strength Indicator (RSSI) Data

– readRSSI

RSSI property

221 questions
2
votes
0 answers

swift 3 - ios : Bluetooth peripheral

I'm trying to see the peripherals via bluetooth using my iphone in fact i write this code till now class BlueT: ViewController, CBCentralManagerDelegate, CBPeripheralDelegate{ var centralManager: CBCentralManager! var peripheral: CBPeripheral! let…
Anthony Shahine
  • 2,477
  • 3
  • 18
  • 24
2
votes
2 answers

iOS peripheral service still empty after discovering

I am trying to use Bluetooth I have something like this : func centralManager(central: CBCentralManager, didConnectPeripheral peripheral: CBPeripheral) { Connected = true TableView.reloadData() Activityview.stopAnimating() …
Logan Gallois
  • 594
  • 5
  • 27
2
votes
1 answer

iOS Bluetooth Background Connected Peripheral

I'm implementing Core Bluetooth background mode and have gotten to the willRestoreState method successfully. The system properly handles scanning and waking up my app on service advertisement and incoming data. However, if the device is already…
NewEndian
  • 559
  • 2
  • 16
2
votes
1 answer

How to test equality on two CBPeripherals in CoreBluetooth?

So basically I am keeping a pool of peripherals during a scan for devices. When I discover a peripheral, I want to first check whether that peripheral is already in my pool. If it is already in the pool then I just want to update the handle I…
William Rosenbloom
  • 2,506
  • 1
  • 14
  • 37
2
votes
1 answer

Integrating iBeacon and coreBluetooth peripheral

I'd like to know if its possible to advertise services through coreBluetooth with a device acting as a peripheral and also range for iBeacons, also accomplish both in the background? Essentially the purpose being to range for beacons and then if a…
2
votes
1 answer

Beacon is not discovering iOS

I am trying to discover the ibeacon. i am running app on iPhone 4s. device bluetooth is turned on. beacon is also discovering in other iOS apps. When i am searching for services following delegate "centralManagerDidUpdateState" gets called and State…
Dattatray Deokar
  • 1,923
  • 2
  • 21
  • 31
2
votes
0 answers

CBCentralManager didFailToConnectPeripheral

I'm developing an app for OS X (10.10) and iOS 8 to exchange some messages with a BLE peripheral. I want my app to find and connect to the peripheral, to send the message to it, and lastly to disconnect, so that the peripheral is free to be accessed…
2
votes
0 answers

iOS CoreBluetooth losing local peripheral.name after connection

I'm building a bluetooth app using CoreBluetooth on iOS. Every time an app is launch user receives an ID, which is saved in Peripheral's LocalNameKey, begin to advertise with it and start to search for other users using CentralManager. Every user is…
2
votes
0 answers

Failed to Advertise and Discover BLE with Swift

I am trying to advertise BLE with the following var perMan: CBPeripheralManager! let myCustomServiceUUID: CBUUID = CBUUID(string: "109F17E4-EF68-43FC-957D-502BB0EFCF46") var myService: CBMutableService! override func viewDidLoad() { …
2
votes
1 answer

Change advertising iPhone local name

Using the CoreBluetooth framework is it possible to change the peripheral name of an iPhone that is advertising in peripheral mode? For example: I would like the peripheral iPhone to broadcast a custom name and have another iPhone be able to read…
2
votes
1 answer

Bluetooth 4.0 Low Energy and iOS: How do I detect if device is bondable or not?

Is it possible, using corebluetooth framework, to detect if peripheral is bondable? Should I implement the failed to connect to delegate?
stackOverFlew
  • 1,479
  • 2
  • 31
  • 58
2
votes
1 answer

How to get data from body scale as CBPeripheral using BLE (Bluetooth Low Energy) on iOS

I just started using Bluetooth and want to read the body composition measurement from a body scale (Model: adeVital Analysis BA 1401) via Bluetooth. When set up my iPhone as Central and connect it to the scale (which is CBPeripheral), I can read the…
stm
  • 121
  • 1
  • 6
2
votes
1 answer

How long is a CBPeripheral's stored UUID valid for reconnection?

I've been playing with Corebluetooth and I've learnt that besides going through the tedious process of scanning for a peripheral every time I want to connect, I can also store the peripheral's UUID and use it with retrievePeripheralsWithIdentifiers…
Lee Andrew
  • 798
  • 7
  • 28
2
votes
1 answer

Updating CentralManagers list of services for a peripheral

I'm Having an issue with Core Bluetooth under iOS. I'm programming an OTA updater, and running into a strange issue. When I switch the device into OTAU mode it disconnects and advertises different services under the same device UUID, problem is,…
2
votes
1 answer

Class does not conform to 'CBPeripheralManagerDelegate' in Swift

I'm trying to build iBeacon emitter in Swift and I cannot get my class to adopt the CBPeripheralManagerDelegate protocol. This protocol is required in Objective-C for initializing the PeripheralManager object, but in Swift, I will get the following…
Charles Lin
  • 55
  • 1
  • 5