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
0
votes
0 answers

Retrieve previously paired bluetooth device lists

Is there any way to retrieve paired bluetooth device list on iOS without given UDID? Ex: I'have connected sound-stick, car sound system etc.. I would like to retrieve these device names... Regards.
Onder OZCAN
  • 1,556
  • 1
  • 16
  • 36
0
votes
0 answers

Get advertisement data from peripheral object?

If I already have a peripheral object, it doesn't seem there is any way to get the advertising data from it. I can only get the advising data from: func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral,…
TruMan1
  • 33,665
  • 59
  • 184
  • 335
0
votes
1 answer

Android Peripheral identifier never same

I have two BLE peripherals (iOS and Android) and an Macbook which is the central. I already succeed to connect, write, read and notify but I have a problem with the Android's peripheral UUID. On central didDiscoverPeripheral method (central) the…
0
votes
0 answers

Transform Int to NSData

Hi guys I need to write a value from my iPhone to an BLE peripheral. The service and characteristic is discovered and the connection is also there. PROBLEM: I need to write the value 2 to the characteristic. For that I call…
0
votes
1 answer

store BLE peripheral in a tableview Objective C

I am new in IOS programming and I try to store BLE peripheral in a tableView. The only thing that I did is to store it in an NSArray: there is my code : -(void) centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral…
0
votes
1 answer

centralManagerDidUpdateState not getting called

I am not new to iOS coding but very new to BLE in iOS. I have successfully written code in my Main View Controller to access and write to a BLE device. So all the peripheral and manager stuff is tested. My app will get a list of BLE devices,…
0
votes
1 answer

Advertise, scan and monitor iBeacon and CBPeripheral at the same time

I'm simultaneously advertising a BLE peripheral and a beacon combined in one NSDictionary and advertised by the same CBPeripheralManager. In the same app I'm scanning for BLE peripherals and monitoring the beacon. It doesn't work - Simultaneously…
TinoK
  • 301
  • 1
  • 9
0
votes
0 answers

How to keep CoreBluetooth connection alive between views

I have implemented CoreBluetooth for an app based on Apples CoreBluetooth TemperatureSensor example (https://developer.apple.com/library/ios/samplecode/TemperatureSensor/Introduction/Intro.html). It works great searching for devices, populating the…
0
votes
1 answer

CBPeripheral track written record

From database, I am retrieving data records and then writing each record to CBCharacteristic of BLE device. Write implementation, for service in self.connectedPeripheral!.services! { for characteristic in service.characteristics! { if…
Dhaval Panchal
  • 2,529
  • 1
  • 25
  • 36
0
votes
1 answer

iOS CBPeripheral connect Questions

I call method (void)connectPeripheral:(CBPeripheral *)peripheral options:(nullable NSDictionary *)options; to connect my device ,my device is in range , but my app still can't connect my device success, when I turn off system BT and…
0
votes
1 answer

How do I write <1100> or <2200> to the value of a characteristic on my CBPeripheral?

When I NSLog characteristic.value it shows as either <1100> or <2200>. I know this is a hexadecimal. I'm confused as what to write when I'm changing the value. Any help would be much appreciated. At the moment I'm doing the following, but getting…
NBAfan
  • 62
  • 10
0
votes
1 answer

CBCentralManager: how to determine which peripheral is the manager scanning for

I am wondering how to determine which peripherals a CBCentralManager is scanning for without using additional variables, in other words only from the CBCentralManager object.
mm24
  • 9,280
  • 12
  • 75
  • 170
0
votes
1 answer

Use Peripheral object as argument of another function

I'm very new to Swift so maybe the answer to my question will seem easy to you. I want to create an interface to scan BLE devices, list them in a TableView, and connect to the selected device in this list. So far, i achieved to scan and list, but i…
0
votes
0 answers

LGBluetooth Scan in background or CBCentralManager scan in background

I am working on BLE Apps where i need to scan the device in Background mode. While debugging i found that it scan for the device but the discovery of devices is not called and returned. Everything works fine in Foreground Mode. Why can't my app scan…
0
votes
1 answer

CoreBluetooth: unable to discover characteristics for discovered peripheral

I have written some CoreBluetooth code, I can discover the devices but I seem to be unable to discover the characteristics for peripherals that I discover. Does anyone have a good sample code that I can use to verify my code? This is what I…
mm24
  • 9,280
  • 12
  • 75
  • 170