ios-bluetooth

Bluetooth 5.1 Angle of Arrival backward compatibility

流过昼夜 提交于 2021-02-10 12:46:50
问题 I am currently designing a simple indoor location project to evaluate possibilities of Bluetooth 5.1 standard. The feature I would like to use is AoA (Angle of Arrival) introduced in Bluetooth 5.1. According to the standard, AoA allows to measure position of a transmitting device (tx) by approximating the angle and measuring RSSI on a locator/receiver (rx). Since AoA is a feature newly implemented in 5.1, I understand that rx needs to support 5.1 Bluetooth standard. How about the transmitting

Sending bluetooth LE data in advertisement on iOS

孤街浪徒 提交于 2021-01-27 07:33:23
问题 My app is running as a Bluetooth LE peripheral, and I'm trying to send just a few bytes of custom data in the Advertisement. func btStartBroadcasting(peripheral: CBPeripheralManager!) { // create an array of bytes to send var byteArray = [UInt8]() byteArray.append(0b11011110); // 'DE' byteArray.append(0b10101101); // 'AD' // convert that array into an NSData object var manufacturerData = NSData(bytes: byteArray,length: byteArray.count) // define a UIUD for the service let theUUid = CBUUID

Sending bluetooth LE data in advertisement on iOS

淺唱寂寞╮ 提交于 2021-01-27 07:32:42
问题 My app is running as a Bluetooth LE peripheral, and I'm trying to send just a few bytes of custom data in the Advertisement. func btStartBroadcasting(peripheral: CBPeripheralManager!) { // create an array of bytes to send var byteArray = [UInt8]() byteArray.append(0b11011110); // 'DE' byteArray.append(0b10101101); // 'AD' // convert that array into an NSData object var manufacturerData = NSData(bytes: byteArray,length: byteArray.count) // define a UIUD for the service let theUUid = CBUUID

WARNING: The advertisement key 'Service Data' is not allowed

我是研究僧i 提交于 2020-07-05 10:26:55
问题 I am developing a BLE peripheral app. By requirement, the advertising packet must contain Service Data field. I have done this in Android, the packet should be like this: 0x16 is Service Data field listed here https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/ Same thing, I do it in iOS. I use BluetoothCore framework to implement the bluetooth peripheral. Below is the attribute I should use to set value for Service Data field: advertisementData

iOS Background BLE advertising not detectable by Android

北城余情 提交于 2020-05-10 18:36:37
问题 When an iOS BLE peripheral enters the background state, the advertising packets are not emitted in the regular manner and they are placed in a special “overflow” area which is only detectable by another iOS device explicitly looking for this device. The bluetooth-peripheral Background Execution Mode That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while

iOS Background BLE advertising not detectable by Android

孤人 提交于 2020-05-10 18:35:45
问题 When an iOS BLE peripheral enters the background state, the advertising packets are not emitted in the regular manner and they are placed in a special “overflow” area which is only detectable by another iOS device explicitly looking for this device. The bluetooth-peripheral Background Execution Mode That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while

BLE: Read Long Characteristics Value using Android / iOS

人盡茶涼 提交于 2020-01-02 19:21:16
问题 With a normal Characteristics Read only the MTU Size (20bytes) of data will be read. My customer will offer a characteristics with a larger size (about 100bytes). I saw that BLE offers a "Long Read" feature which reads until the size of the characteristics is reached. (https://bluegiga.zendesk.com/entries/25053373--REFERENCE-BLE-master-slave-GATT-client-server-and-data-RX-TX-basics) attclient_read_long command - Starts a procedure where the client first sends normal read request to the server

How to fix this error “ Could not find module 'CzsBleSdk' for architecture 'x86_64'; found: arm64, arm ”

僤鯓⒐⒋嵵緔 提交于 2019-12-24 12:42:13
问题 I'm working with bluetooth in an old project which was written in swift3 and i'm working on converting it in swift4 and I had this error "Could not find module 'CzsBleSdk' for architecture 'x86_64'; found: arm64, arm" 回答1: You are now using 64 bit architecture in your Swift 4 project. You'll need the latest CzsBleSdk SDK which supports 64-bit architecture. You can integrate that manually or using Pod. I personally recommend Pod. 回答2: I seems that your framework was built and published the

How do I remove paired Bluetooth devices on iOS?

别来无恙 提交于 2019-12-24 07:22:17
问题 I want my app could remove paired bluetooth devices. Becaues if device paried with iPhone, the device couldn't used for another device. I tried CBCentralManager cancelPeripheralConnection, but it doesn't work. they're still paired. Or there's some other app still connected this server? iPhone5,iOS7 回答1: You cannot unpair a device programmatically in iOS. The cancelPeripheralConnection is only to disconnect your apps connection to the device. Discussion This method is nonblocking, and any

How do I remove paired Bluetooth devices on iOS?

邮差的信 提交于 2019-12-24 07:21:17
问题 I want my app could remove paired bluetooth devices. Becaues if device paried with iPhone, the device couldn't used for another device. I tried CBCentralManager cancelPeripheralConnection, but it doesn't work. they're still paired. Or there's some other app still connected this server? iPhone5,iOS7 回答1: You cannot unpair a device programmatically in iOS. The cancelPeripheralConnection is only to disconnect your apps connection to the device. Discussion This method is nonblocking, and any