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

listening for an event prom bluetooth peripheral in swift

I have a Dash button that works with Bluetooth low energy. I can scan and find it, connect to it and discover its services. Now I want to listen for it to see if its button is pressed or not.but It seems that I have some serious problems with the…
3
votes
3 answers

didDisconnectPeripheral not called iOS Swift 3

I'm trying to disconnect from a BLE device. I'm doing cancelPeripheralConnection() and its never calling didDisconnectPeripheral(). I'm setting notify value to one characteristic, so while disconnecting i'm setting it…
Hemanth
  • 133
  • 2
  • 12
3
votes
0 answers

peripheralManagerIsReadyToUpdateSubscribers not called after failed update

Whenever I Disconnect and try to connect. I am not receiving peripheralManagerIsReadyToUpdateSubscribers and first update only fails. I am following the below steps Start Advertisement and establish connection with central. Now try to update value…
3
votes
2 answers

CBCharacteristic value in swift3

I am beginner in swift development. I was working on BLE based application. Today I updated Xcode 8, iOS 10 and convert my code to swift3. Then some of my syntax are need to convert. After fixing this , I found one issue on…
NyoSeint Lay
  • 156
  • 1
  • 11
3
votes
1 answer

CoreBluetooth State Preservation and Restoration

I have the following scenario: iOS app (peripheral) X OSX app (central) I instantiate my peripheral manager with CBPeripheralManagerOptionRestoreIdentifierKey. In my peripheral's didFinishLaunchingWithOptions I send a local notification after…
Lee Andrew
  • 798
  • 7
  • 28
3
votes
0 answers

iOS 8.2 [peripheral discoverServices:] not calling to diddiscoverservices

I have update my iphone to iOS 8.2 and now one of my projects is not working because when I call to discover services, cbperipheral is not calling to diddiscoverservices function. I am connected to the bluetooth but when i do: [peripheral…
Mikel Diaz
  • 43
  • 7
3
votes
1 answer

iOS Core Bluetooth Pin Code

I have a BLE peripheral that requires a PIN code. I am connecting to this peripheral using Core Bluetooth CBCentralManager on iOS 7. When I connect to this peripheral, 'didConnectPeripheral' (central delegate) gets called before the PIN code…
3
votes
1 answer

Improve file transfer speed using CoreBluetooth

I currently have my OSX app (central) sending a 4Kb image to my iOS app (peripheral) trough a writeable characteristic using writeValue. Because the image size exceeds the limit, I'm using writeValue multiple times with the following function: func…
Lee Andrew
  • 798
  • 7
  • 28
3
votes
1 answer

Are CBCentral and CBPeripheral identifiers the same for one device

The title explains it all. All I want to know is that if a device is being used as a peripheral and a central and gets near another device being used as a peripheral and a central, would the peripheral manager and central manager on each device see…
3
votes
1 answer

I want to trigger iOS7 to ask users permission to use Bluetooth and Twitter account

This is somewhat backward to what most people ask. I want to purposely trigger the dialog asking for the users permission to: Connect to bluetooth devices, even when offline. Access there iOS-based Twitter account. I already have a similar dialog…
Cocoadelica
  • 3,006
  • 27
  • 30
3
votes
0 answers

Peripheral transmit queue issue

I’m working on a simple wrapper around CoreBluetooth to send any data to any device. During developing I encountered a lot of bugs in framework, they were very annoying and to make my wrapper stable I had to shorten some of functionality for…
3
votes
6 answers

Peripheral name doesn't comply to NameKey

I have an app that simulates heart rate monitor peripheral (The peripheral app). I also have an app that receives the data and present it (The central app). The central app decided to connect to the discovered peripheral based on its name. The…
U_D
  • 711
  • 1
  • 10
  • 18
3
votes
1 answer

Is an iPhone being peripheral and central with connecting to several peripheral iPhones one after another doable?

My app needs to detect other iPhones and connect to all of them one at a time quickly (Those iPhones also have the same functionality). So I implemented both peripheral and central. I only try connecting to another phone if: if…
3
votes
1 answer

iOS Core Bluetooth no disconnect notification

I'm developing an app using CoreBluetooth and I need to be notified if the bluetooth connection is lost. I establish connection with many BLE devices, put the app into background mode and wait for disconnect notification. The problem is I get…
2
votes
1 answer

Core Bluetooth - Communicate with LED Light

I am working on Core Bluetooth communicate with LED Light. When peripheral write the value to communication, take some time to get response from hardware(LED).As we are using UISLider to write values we are facing delay in hardware. I think a queue…
1 2
3
14 15