bluetooth-lowenergy

FromBluetoothAddressAsync never returns on Windows 10 Creators Update in WPF Application

自古美人都是妖i 提交于 2019-12-18 08:31:19
问题 I upgraded to Windows 10, version 1703 build 15063 (Creators Update) official release. When I run the following code in a WPF desktop application, BluetoothLEDevice.FromBluetoothAddressAsync never returns. This code worked on fine before my Windows 10 update (i.e. the previous 1607 build 14393). This code also works fine if it is running as a UWP in the new Win 10 1703. BluetoothLEAdvertisementWatcher BleWatcher = null; private void Button_Click(object sender, RoutedEventArgs e) { BleWatcher

onServicesDiscovered not be called on BluetoothGattCallback

荒凉一梦 提交于 2019-12-18 07:22:33
问题 I start working with ibeacon and android. But there are some problem need for your helps. On blutoothGatCallback I implement onConnectionStateChange and call discoverServices(). Althougth, discoverServices() return true but there is not any callback execute, I hope onServicesDiscovered being called, but not. @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { Log.i(TAG, "onConnectionStateChange : " + status + " newState : " + newState); if (newState =

CoreBluetooth and BluetoothManager, device is not BLE

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 06:59:47
问题 Connect and receive data via bluetooth. We are developing an app for a client. It is a toy for babies that connects via bluetooth and we're having trouble connecting and transferring data. After all the research we did, we found two alternatives: CoreBluetooth and BluetoothManager . As far as I know CoreBluetooth only connects with Bluetooth Low Energy (I think it is the latest bluetooth version) and with it I am not able to find my client's device. With the second option, BluetoothManager i

iOS 6 - Bluetooth LE disconnect

你。 提交于 2019-12-18 04:52:45
问题 Ok what the heck is up with iOS6 and how it handles Bluetooth LE disconnections? Before the device would disconnect immediately but now, for some strange reason, the device waits to disconnect for about 30-60 seconds. I need it to disconnect ASAFP! I've been searing all over the internet trying to figure out how to initiate an immediate disconnection from the peripheral and I found this nifty email that explains a workaround is to unsubscribe from notifications on the service characteristics.

Android Bluetooth Low Energy code compatible with API>=21 AND API<21

浪子不回头ぞ 提交于 2019-12-17 19:46:13
问题 I'm developing an app that have to connect with a BLE device, in my code I want to use the new Scan and ScanCallback for BLE implemented from API 21 (Android 5) but I have to maintain the compatibility with Android 4.3 and above. So I wrote the code, for example, in this way: if (Build.VERSION.SDK_INT >= 21) { mLEScanner.startScan(filters, settings, mScanCallback); } else { btAdapter.startLeScan(leScanCallback); } And I have defined the 2 callbacks, one for API 21 and above and one for API 18

Can a HTC advertise itself as a BLE Beacon?

拈花ヽ惹草 提交于 2019-12-17 19:38:00
问题 Ive been doing some work around BLE and iBeacons. At present I'm aware that you can turn your iPhone into an iBeacon but I have not come across any details of whether this is possible with an Android phone - specifically a HTC One as that the one I've got ;) Any advice, details or web links on this matter would be appreciated, Thanks, Steve 回答1: Android devices have a public APIs to transmit BLE advertisements only starting with Android 5.0. You would need to install this operating system on

Obtaining Bluetooth LE scan response data with iOS

与世无争的帅哥 提交于 2019-12-17 19:25:06
问题 I am working with Bluetooth Low Energy devices, and I was wondering whether it is possible to read the Scan Response Data to an advertisement with iOS and Core Bluetooth without connecting. I understand that after reading an advertisement packet, you can request additional data from the peripheral in the format of a 31 byte scan response. I know that Core Bluetooth suggests that if the ad packet is full, you can put the local name in the scan response packet, but does it allow you to see the

iOS CoreBluetooth / iBeacon: Advertise an iBeacon and a peripheral service concurrently

天涯浪子 提交于 2019-12-17 18:39:56
问题 I'm writing an application for iOS that requires that the application advertise both an iOS iBeacon as well as advertise peripheral service concurrently. It's necessary that the service is advertised rather that simply discoverable on the peripheral because the use case requires the central (in BLE parlance) connect to the peripheral after being woken up by iOS (but still in the background) due to proximity to the iBeacon. Apps running in the background on centrals can only discover

Android listing BLE devices after device scan

…衆ロ難τιáo~ 提交于 2019-12-17 18:27:22
问题 Can u provide me the simple code for scanning the nearby BLE devices and list it by device name and MAC ID. I tried this using sample code provided in http://developer.android.com/guide/topics/connectivity/bluetooth-le.html. But didn't work, any reference link or ideas since i am new to BLE app. 回答1: This example is based on the developers web you posted and works great for me. This is the code: DeviceScanActivity.class package com.example.android.bluetoothlegatt; import android.app.Activity;

Core Bluetooth State Preservation and Restoration Not Working, Can't relaunch app into background

和自甴很熟 提交于 2019-12-17 16:07:36
问题 I'm trying to make core bluetooth wake up the app even when it's not running. As Apple stated, "Because state preservation and restoration is built in to Core Bluetooth, your app can opt in to this feature to ask the system to preserve the state of your app’s central and peripheral managers and to continue performing certain Bluetooth-related tasks on their behalf, even when your app is no longer running. When one of these tasks completes, the system relaunches your app into the background