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

iOS Core Bluetooth: Advertised service is not discovered on peripheral

Following connection to a BLE device which is advertising a specific service I'm interested in, in order to discover this service, I'm calling: [self.peripheral discoverServices:@[[self.class serviceUUID]]]; The - (void)peripheral:(CBPeripheral…
Gina
  • 89
  • 6
5
votes
1 answer

Crash in CBPeripheral writeValue: forDescriptor:

After establishing a connection with a TI BLE Keyfob and retrieving the descriptors for a characteristic, I attempt the call [peripheral writeValue: nsData forDescriptor: descriptor]; The various objects look reasonable in the debugger. nsData…
Mike
  • 3,084
  • 1
  • 25
  • 44
5
votes
2 answers

Reconnect a CBPeripheral faster

I'm developing an app which connects and disconnects several times to different bluetooth low energy peripherals. After a lot of research on the internet, I didn't have found a way to store already discovered services and characteristics, so that I…
4
votes
1 answer

How to write a value to characteristc for BLE Device in ios swift

I'm working on iOS BLE app to charge a mobile phone. I did everything correct up to discover characteristics. First Scanning peripheral and connected to it. Discover the services(FFB0) and characteristics(FFB1, FFB2) which having notify and write…
Bhasker
  • 73
  • 2
  • 8
4
votes
0 answers

iOS Bluetooth Connection Stays Up if app Crashes with the Connection Active

I am facing a pretty odd issue with my users: for some reason I cannot identify so far, my app is crashing at some point when the Bluetooth connection is still active (my app is a Central Manager that connects to external Peripherals). The crash…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
4
votes
1 answer

How do I read a peripheral's characteristic without pairing with the other device in Swift?

My app functions as both a central and a peripheral. I have the one device searching for another broadcasting my service UUID. This works fine until I connect to the peripheral. Then a "Bluetooth Pairing Request" appears on both devices asking to…
Jake
  • 319
  • 1
  • 7
  • 21
4
votes
1 answer

CBPeripheral, Get Local Peripheral Identifier

I faced a problem about CoreBluetooth Framework. As Example, I have two devices and each device performs both advertising and scanning. So, I use CBCentralManager and CBPeripheralManager on each. So, to simplify problem, let's assume that Device1 is…
Roman F
  • 135
  • 2
  • 7
4
votes
1 answer

CoreBluetooth device name change

I am currently creating a simple iOS bluetooth app. I currently have a device with the ability to modify the name. What I am finding is that when I connect to a CBPeripheral device, it seems to be caching the old device name. Connect to the device…
user1927638
  • 1,133
  • 20
  • 42
4
votes
2 answers

DidReceiveWriteRequest not getting called in IOS BLE

I am trying to send a response from central to peripheral. The code was worked fine twice. Suddenly didReceiveWriteRequest is not getting called. I didn't make any changes even.The properties given at peripheral are CBCharacteristicsPropertyNotify |…
4
votes
2 answers

CoreBluetooth Central --> Peripheral

I'm quite new to bluetooth communication. My first project intends to transfer data from an iOS device to a BLEshield (small chip). To test my central code, I decided to setup an iPhone as peripheral (the role the chip will have, once I got it) and…
4
votes
1 answer

How to pass device UUID in CoreBluetooth framework for Client to reconnect later

I just wrote a simple app where I scan and connect to peripheral (which is also an IOS device). However the CBPeripheral object I get back from ConnectPeripheral function does not have the device UUID and it's always null. Now I am trying to…
3
votes
0 answers

How to write value to existing characteristics in BLE Device in Ios swift

Im working on ios Ble app to charge mobile phone.Im done everything correct upto discover characteristics.First Scannig peripheral and connected to it. Discover the services(FFB0) and characteristics(FFB1,FFB2) which having notify and write with out…
Bhasker
  • 73
  • 2
  • 8
3
votes
1 answer

How to differentiate to which BLE device's peripheral should I connect If I know mac address of that BLE device in iOS?

In iOS not possible to get mac address of CBPeripheral object. Now I have no. of BLE devices with different UUIDs but with same peripheral name. User has to first register to that BLE device by registration command to that BLE device whose MAC…
BSB
  • 277
  • 1
  • 10
3
votes
0 answers

What is the expected behavior of CBCentralManager after it has received a an event of type .resetting

In the app that I am working on we have a mechanism in place to handle CBCentralManager's state change when func centralManagerDidUpdateState(_ central: CBCentralManager) fires and the incoming state is CBManagerState.poweredOff. We will keep track…
3
votes
2 answers

didDisconnectPeripheral called by itself

I've an application which should use CoreBluetooth to connect to varies devices at once. My issue here is that unexpected disconnections occur. Once I got connected to any peripheral the method func centralManager(_ central: CBCentralManager,…
1
2
3
14 15