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

CBPeripheral - "didWriteValueFor" gets error "The prepare queue is full."

I am using ZPL printer to print the base64 decoded string. For small decoded string it is printing the receipt, for multiline base64 decoded string I am getting error. Delegate Method : func peripheral(_ peripheral: CBPeripheral, didWriteValueFor…
2
votes
1 answer

didDiscoverPeripheral: not working sometimes on background

Happens both on iOS 12 & iOS 13. I have Bluetooth-central correctly added on my Info.plist I'm specifying a list of service UUIDs What I am seeing: If I interact with our BLE device on the foreground, I can still scan for it on background, even…
2
votes
2 answers

CBPeripheral.ancsAuthorized info is unreliable

Our app works with a paired Bluetooth peripheral that uses ANCS, that is why I dug early into the brand new privacy setting "Share System Notifications" to make our app ready for iOS13... However there is an issue, the CBPeripheral property…
JBA
  • 2,889
  • 1
  • 21
  • 38
2
votes
1 answer

Identifying the type of CBPeripheral before connecting

I recently created an app that uses CoreBluetooth on iOS to connect to a thermal printer. Everything is going just fine except for one thing. I can see over 20 bluetooth devices but only one is a thermal printer. Is there a way for me to know if…
Ali Ysf
  • 148
  • 11
2
votes
2 answers

Change font size programmatically on thermal Bluetooth Printer

I have a 58mm 'MINI Thermal Printer', Model: ZJ-5805DD to use as POS printer with my POS App. I've successfully programmatically connected my App to the Printer via Bluetooth and can print text fine using KitchenPrinter.writeValue(myStringData,…
Chameleon
  • 1,608
  • 3
  • 21
  • 39
2
votes
0 answers

Continuous connectivity of bluetooth peripheral

After connecting with CBPeripheral, it displays services & characteristics of peripheral, after few minutes it disconnects the peripheral without any user interaction. I want the continuous connection with device until user disconnects it. I have…
Dimple
  • 788
  • 1
  • 11
  • 27
2
votes
1 answer

How to detect an Apple Watch as a bluetooth peripheral

I'm using CoreBluetooth to compile a list of connected devices offering the "heart rate" service with the CBCentralManager method retrieveConnectedPeripheralsWithServices. NSArray *services = @[[CBUUID UUIDWithString:BT_DEVICEINFO_SERVICE_UUID], …
TealShift
  • 842
  • 5
  • 19
2
votes
1 answer

iOS device as an iBeacon, why is it not working?

I'm trying to make an iOS app that uses PeripheralManager to broadcast an UUID to a Central. I think my permissions and Capabilities are in order, but i still cant find my beacon when i search for it with the central. Is there something i…
2
votes
1 answer

What does it mean for background processing of Bluetooth data to be 'session-based' in iOS?

In Apple's documentation for Background Execution it is explained that 'Any app that supports the background processing of Bluetooth data must be session-based. ... Apps must provide an interface that allows the user to start and stop the delivery…
2
votes
0 answers

Sending a PNG image with BLE in Swift

I've been stuck with this problem for the past 2 hours and I'm about to give up. I've Googled a lot and just can't find something that works. I am using the newest version of XCode. I want to send a PNG image through Bluetooth Low Energy, the…
2
votes
1 answer

In iOS 10+, is there ANY way to RELIABLY wake up an app

I have been at this over 3 months and pulling my hair out. So please don't respond with beginner answers. I am wondering if, in 2017 with iOS 10+, there is ANY way possible to wake up the app from terminated state... preferably by bluetooth…
GoreDefex
  • 1,461
  • 2
  • 17
  • 41
2
votes
1 answer

Not able to scan Through CBCentral Manager with service ID for iBecon Signal

Working on iBecon signal using Core Bluetooth i am able to search with CBCentralManager scan optionn nil :- Shared.sharedInstance.centralManager?.scanForPeripherals(withServices: nil, options:[CBCentralManagerScanOptionAllowDuplicatesKey:true]) But…
2
votes
0 answers

Setting up and sending a string with Peripheral Manager swift

I have gone and set up my CBCentralManager to search for devices and have the basic structure ready to receive and check on updated info. I just cant seem to grasp on how to make a CBPeripheralManager ViewController and how to send my CBCentral…
2
votes
0 answers

CoreBluetooth, Notifications and firmware updates

I am developing a client application in swift that reads some values from a ble peripheral. The thing is that after a firmware update on the peripheral, the app stops receiving notifications from characteristics that are marked as notification. In…
2
votes
0 answers

Why there's a requirement of reconnecting to a BLE device every time?

I have a CBPeripheral which accepting different commands for communications. For example: If I need to fetch current rate from the device, the command is "get-rate". If I need to fetch current battery level of the device, the command is…
Hemang
  • 26,840
  • 19
  • 119
  • 186