iobluetooth

what GKSession doesn't connect on every attempt?

丶灬走出姿态 提交于 2019-12-08 11:50:10
问题 In application, invitationDidFail is being called, some time it connects properly, but sometime it doesn't... what can be possible reasons of denying the connection? // Display an alert sheet indicating a failure to connect to the peer. - (void) invitationDidFail:(SessionManager *)session fromPeer:(NSString *)participantID { NSString *str; if (alertView.visible) { // Peer cancelled invitation before it could be accepted/rejected // Close the invitation dialog before opening an error dialog

How to use service soliciting with IOBluetooth/CoreBluetooth?

僤鯓⒐⒋嵵緔 提交于 2019-12-04 15:57:51
问题 What I'm trying to do is use the Apple Notification Center Service (ANCS) from my iPhone on my Mac. To make my Mac show up on in my iPhone's Bluetooth settings, I apparently need to use service soliciting. What I've tried so far is initiate a CBPeripheralManager on my Mac, add the ANCS service to it and start advertising. That doesn't seem to do it, as my Mac doesn't show up in my iPhone's Bluetooth settings. What I've also tried is initiate a CBCentralManager and start scanning, with the

Is it possible to “unpair” a Bluetooth device in Cocoa/ObjC?

本小妞迷上赌 提交于 2019-12-04 04:39:46
I've paired an IOBluetoothDevice in my Mac/Cocoa app and would like to "unpair" it programmatically. That is, I would like to remove the device from the left pane of the Bluetooth section of System Preferences. I've seen [IOBluetoothDevice removeFromFavorites] , but that just removes the heart icon next to the "Favorite" attribute of the device -- the device is still listed in the left pane. Is this possible through Cocoa? In the above picture, I would like to programmatically remove "Apple Mighty Mouse" from the left pane. Paired devices are a part of System Preferences. You can find the file

How to use service soliciting with IOBluetooth/CoreBluetooth?

房东的猫 提交于 2019-12-03 09:09:07
What I'm trying to do is use the Apple Notification Center Service (ANCS) from my iPhone on my Mac. To make my Mac show up on in my iPhone's Bluetooth settings, I apparently need to use service soliciting. What I've tried so far is initiate a CBPeripheralManager on my Mac, add the ANCS service to it and start advertising. That doesn't seem to do it, as my Mac doesn't show up in my iPhone's Bluetooth settings. What I've also tried is initiate a CBCentralManager and start scanning, with the ANCS UUID in the CBCentralManagerScanOptionSolicitedServiceUUIDsKey key, which doesn't work either. Does

IOException on accept thread

半城伤御伤魂 提交于 2019-11-30 07:21:57
One part of my application connects to a device through Bluetooth and normally works fine but occasionally it won't connect and I get the following error 03-11 10:29:20.328: E/BluetoothComService(8059): accept() failed 03-11 10:29:20.328: E/BluetoothComService(8059): java.io.IOException: Operation Canceled 03-11 10:29:20.328: E/BluetoothComService(8059): at android.bluetooth.BluetoothSocket.acceptNative(Native Method) 03-11 10:29:20.328: E/BluetoothComService(8059): at android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:316) 03-11 10:29:20.328: E/BluetoothComService(8059): at android

IOException on accept thread

扶醉桌前 提交于 2019-11-29 09:38:07
问题 One part of my application connects to a device through Bluetooth and normally works fine but occasionally it won't connect and I get the following error 03-11 10:29:20.328: E/BluetoothComService(8059): accept() failed 03-11 10:29:20.328: E/BluetoothComService(8059): java.io.IOException: Operation Canceled 03-11 10:29:20.328: E/BluetoothComService(8059): at android.bluetooth.BluetoothSocket.acceptNative(Native Method) 03-11 10:29:20.328: E/BluetoothComService(8059): at android.bluetooth

Does blued cache ATT values, and how to clear the cache?

我是研究僧i 提交于 2019-11-28 11:44:29
I am trying to find any workarounds for a Bluetooth LE bug on OSX . In particular, I want to know where OSX goes wrong in reading the Bluetooth LE GATT table. Thus, I am viewing the L2CAP packets in PacketLogger from Hardware IO Tools for XCode . When I use Bluetooth Explorer to connect to the Bluetooth LE device, I am expecting to see 3.4.4.9 Read By Group Type Request (uuid=0x2800 «Primary Service», startingHandle=0x0001, endingHandle=0xffff) to discover primary services (or Find By Type Value Request (uuid=0x2800, value:uuid of service)), followed by 3.4.4.1 Read By Type Request (uuid

Nearby Bluetooth devices using Swift 3.0

懵懂的女人 提交于 2019-11-28 07:46:24
I'm looking for a way to programmatically list any nearby Bluetooth devices (discoverable) that my device finds. I have not been able to find any information or tutorials regarding performing this call in Swift 3.0. This Q-A post discusses finding these devices using Swift 1.0 and building in Xcode 6, rather than the latest version 8. I did my best to try to make my code into the 3.0 Syntax from the 1.0, but while running the following code, nothing is returned in the Playground: import Cocoa import IOBluetooth import PlaygroundSupport class BlueDelegate : IOBluetoothDeviceInquiryDelegate {

Nearby Bluetooth devices using Swift 3.0

…衆ロ難τιáo~ 提交于 2019-11-26 20:27:23
问题 I'm looking for a way to programmatically list any nearby Bluetooth devices (discoverable) that my device finds. I have not been able to find any information or tutorials regarding performing this call in Swift 3.0. This Q-A post discusses finding these devices using Swift 1.0 and building in Xcode 6, rather than the latest version 8. I did my best to try to make my code into the 3.0 Syntax from the 1.0, but while running the following code, nothing is returned in the Playground: import Cocoa

Xcode build failure “Undefined symbols for architecture x86_64”

若如初见. 提交于 2019-11-26 12:55:27
An Xcode beginner's question: It is my first experience with Xcode 4.6.3. I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog. It builds with the following error: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_IOBluetoothDevice", referenced from: objc-class-ref in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I searched like crazy. The common problem should be a reference to a file, of which only the header files are imported and no