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
20
votes
1 answer

CoreBluetooth pairing feedback / callback

It feels like I'm missing something here, but how can I get feedback on whether pairing a passcode protected peripheral failed or succeeded? When I to connect a peripheral which is password protected the password UIAlertView pops up and the…
Mathijs
  • 1,258
  • 1
  • 10
  • 27
14
votes
3 answers

Bluetooth Peripheral ADVERTISE_FAILED_DATA_TOO_LARGE

I am trying to advertise in NEXUS 9 and getting the error of ADVERTISE_FAILED_DATA_TOO_LARGE. It was working perfectly fine when I was adding the service after successfully advertising but if I add the service through Advertise Data builder so that…
Shubham
  • 2,627
  • 3
  • 20
  • 36
13
votes
1 answer

iOS6: CBPeripheral is being dealloc'ed while connecting

I'm trying to connect to a bluetooth BTLE device. I have no problem discovering the peripheral. However, when I attempt to connect to the peripheral, I received the following warning. 2013-04-05 22:10:36.110 CoreBluetooth[WARNING] …
mikeholp
  • 965
  • 3
  • 11
  • 14
10
votes
1 answer

CoreBluetooth: How to design code for many characteristics (30 - 40)?

I searched around a bit and just found this as a possible duplicate question: Multiple CBPeripheral's for same device My problem is: I have multiple services which all together have about 30-40 characteristics (Yes, I need all of them...). As…
orschaef
  • 1,287
  • 10
  • 27
10
votes
1 answer

How To Store a CBPeripheral For Use in Other Views

I setup a few BLE connections in my view controller, SViewController, and I need to store the peripherals for use in other view controllers. I've tried creating an NSUserDefault object and storing the peripherals in there, but I got the error…
Henry F
  • 4,960
  • 11
  • 55
  • 98
10
votes
2 answers

Can I make my Mac as a Bluetooth Peripheral?

I'm working on an idea which requires my Mac to send some data to my iOS device. I know CoreBluetooth framework is not there for Mac OS and only for iOS, so is there any way that I can get my Mac to pose a peripheral ? I've done some Googling around…
Mohit Athwani
  • 883
  • 9
  • 17
10
votes
2 answers

CoreBluetooth: Refreshing local name of an already discovered Peripheral

I successfully discover a Peripheral and retrieve its local name: [advertisementData objectForKey:CBAdvertisementDataLocalNameKey] But if the Peripheral stops and restarts advertising with a different local name, the Client doesn't recognise the…
saeppi
  • 259
  • 4
  • 16
9
votes
3 answers

Monitor CBPeripheral state changes

So there's a way to monitor state changes of CBCentralManager via centralManagerDidUpdateState(). But is there a similar method call to monitor state changes for CBPeripheral? I couldn't find anything exposed in CoreBluetooth library, and I want to…
Alfred Ly
  • 123
  • 1
  • 8
7
votes
1 answer

Peripheral not connecting - Swift

Within my Swift app, I have a view that is supposed to find a bluetooth device and connect to it. The bluetooth device is powered on. I am able to scan and find the device, after which I call on the function to connect to it, but I get no feedback.…
6
votes
2 answers

Can a single BLE central connect with multiple BLE peripherals via bluetooth low energy?

I am using core bluetooth framework in my iOS application project. I have following questions regarding bluetooth low energy- Is it possible for a single central to connect multiple peripherals in iOS? Can multiple central device connect with a…
6
votes
0 answers

iOS CBPeripheral Services not Being Updated

I am having some trouble with a CBPeripheral that has it's services updated: my physical device has a button that updates the advertising services but my app still reads the old services in the delegate method didDiscoverServices. Although when I…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
6
votes
0 answers

What are the conditions for ios to cache BLE Services and Characteristics?

I have read that ios is caching Services and Characteristics of a BLE peripheral when I disconnect and then reconnect to the same device (After those Services and Characteristics have been discovered of course). So the lenghty process of…
6
votes
2 answers

BLE Notification when the application is not running

Is there a possibility to receive BLE notification in your application for a specific UUID or whenever any UUID gets in range while the application is not running? E.g. the same way Push Notifications work? I tried to google around but so far no…
Syed Absar
  • 2,274
  • 1
  • 26
  • 45
5
votes
1 answer

How to improve performance of CBCentralManager while CBPeripheralManager is active

We've created an iOS app that implements a CBCentralManager to connect to a device that we've created, that transmits data at 10Hz. It's vitally important that this data comes through and displays quickly, so we have built tight latency checks…
5
votes
2 answers

CBPeripheral advertisementData is different when discovering peripherals on OSX vs iOS (GAP/GATT)

I am hoping to port some of my CoreBluetooth code from iOS to OS X. I've set up a shared set of CoreBluetooth wrappers which are consumed by both an iOS app and an OS X app in exactly the same manner with the same BLE devices. Scanning for…
1
2 3
14 15