Posts

Post not yet marked as solved
0 Replies
147 Views
Hi,i am using the apple watch to connect with my external peripheral and with one it connects and with the other it doenst.I have a sniffer that got the connection between the one that dind work:Image->Watch-1The Problem here is that the Watch send ATT_readByTypeRequest with StartingHandle=EndingHandle=0x0008There isnt a characteristic at this addres and my peripheral responds with an error.The watch should write startingHandle = 0x0000 and endinghandle = 0xFFFF to get all characteristics from my peripheral.Image->Watch-2The weard thing is that in my iphone, i can connect to the same peripheral and it finds all characteristics and connects to it with no problem:Image->Iphone-1Here you see startingHandle = 0x0000 and endinghandle = 0xFFFF from my iphone:Image->Iphone-2Any idea? Is this a known bug?Images: https://drive.google.com/drive/folders/1dek9Dt7yokk2kvzeSC3Jq-RgpDSGjz22?usp=sharing
Posted Last updated
.
Post not yet marked as solved
0 Replies
400 Views
Hi,so i have an IOS and WatchOS Application runnning on my iphone and watch.I have two peripherals that are identical but one has BLE Stack 4.2 and the other one BLE Stack 5.0.Since the BLE Stack 4.2 is working on both, IOS App and Watch App, i want to test it on BLE Stack 5.0I know that my WatchOS series 2 only supports BLE Stack 4.2 and my Iphone 6s plus BLE Stack 4.2, but the BLE Stack 5.0 is still down compatible with Stack 4.2 and Stack 4.0.So on my test, the IOS Application connects with my peripheral with BLE Stack 5.0 and it all works fine.My Watch finds the peripheral but it never connect to it. The code on both IOS and Watch are the same and they use coreBluetooth.Why is my Watch not connecting to my peripheral with BLE STack 5.0?Is there a known issue?Best regards,Michael
Posted Last updated
.
Post not yet marked as solved
6 Replies
1.9k Views
Hi,so i am using my watch series 2 on the latest WatchOS 4 software and i am trying to connect with my perihperal.I am using swift on XCODE 9 and it never finds any peripheral:class InterfaceController: WKInterfaceController, CBCentralManagerDelegate, CBPeripheralDelegate{ @IBOutlet var StartImage: WKInterfaceImage! override func awake(withContext context: Any?) { super.awake(withContext: context) manager = CBCentralManager(delegate: self , queue: nil) } override func willActivate() { super.willActivate() } override func didDeactivate() { super.didDeactivate() } @IBAction func myConnectButton() { print("scanning for BLE device"); } func centralManagerDidUpdateState(_ central: CBCentralManager) { if central.state == CBManagerState.poweredOn { central.scanForPeripherals(withServices: arrayOfServices, options: [CBCentralManagerScanOptionAllowDuplicatesKey:false]) StartImage.setImage(image) print("Bluetooth is available.") . <------- It gets here } else { print("Bluetooth not available.") } } func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral,advertisementData: [String : Any], rssi RSSI: NSNumber) { let device = (advertisementData as NSDictionary).object(forKey: CBAdvertisementDataLocalNameKey)as? NSString / print("Peripheral found!") <--------- Never comes here if device?.contains(BLE_NAME) == true { manager.stopScan() / / print("Bluetooth name found!.") manager.connect(peripheral, options: nil) } else { print("device not found!") } }
Posted Last updated
.