bluetooth-lowenergy

How do you get a BLE Advertisment callback in a desktop .NET app?

丶灬走出姿态 提交于 2019-12-06 11:29:33
I am trying to get a BLE advertisement callback from a .NET Windows desktop application. I am able to call into the APIs, however the Received event is never called from the OS in a WPF or Command line application. I do get events when the code is called from a Unit Test in VS2015, or universal Windows app. However, I need to do other things not available in universal Windows. Here is the code: using Windows.Devices.Bluetooth.Advertisement; public static void ScanForAdvertisments() { mWatcher = new BluetoothLEAdvertisementWatcher(); mWatcher.Received += OnAdvertismentReceived; mWatcher

BLE: Read Long Characteristics Value using Android / iOS

谁都会走 提交于 2019-12-06 11:01:18
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, and if the server returns an attribute value with a length equal to the BLE MTU (22 bytes), then

forget a BLE device in a iPhone 6 (8.1.3)

点点圈 提交于 2019-12-06 10:33:01
问题 I don't know how to forget a BLE device in my iPhone device. Going to Settings -> Bluetooth page , I see the list of Devices, but I don't see any option to forget it. 回答1: BLE devices will appear in one of three cases - An app has an active connection (the device will be listed under "My devices") An app has a pending connection to a device that has gone out of range (the device will be listed under "Other devices") The device is paired (bonded) (the device will be listed under "My Devices"

How to correctly set the date and time in a bluetooth low energy peripheral?

不问归期 提交于 2019-12-06 10:29:28
问题 I am developing a sensor device and a corresponding iOS-app that shall communicate using Bluetooth low energy. The sensor device needs to maintain the current date and time in a real-time clock. Now, I am confused as to what would be the correct way to set the time and date in the sensor device if I want to implement the Bluetooth standard services as much as possible because the official documentation is contradictory: in the ServiceViewer for the "Current Time Service", it says that the

Bluetooth Low Energy Notification Interval

本秂侑毒 提交于 2019-12-06 10:26:18
问题 I have a question regarding the bluetooth LE protocol. I have an Android Device and a peripheral device. Looking at the transmission with a sniffer and wireshark there is +/- every 40ms an empty PDU message. As I understood the protocol this means the connection interval those device chose is 40ms. For testing I am using a simple "UART" application where the android device enables the notification on an antribute of the peripheral device and gets notified whenever the attribute changes. Now,

How to correctly use UUID.fromString method?

馋奶兔 提交于 2019-12-06 09:48:31
I am trying to read/write these ble characteristics: Right now, I'm trying to read AA01* I am using this library to do it. Here's my code: private void connectToSensorTag(RxBleDevice rxBleDevice) { rxBleDevice.establishConnection(getApplicationContext(), false) .doOnError(new Action1<Throwable>() { @Override public void call(Throwable throwable) { int i = 0; } }) .flatMap(rxBleConnection -> rxBleConnection.readCharacteristic(UUID.fromString("AA01*"))) .subscribe(new Subscriber<byte[]>() { @Override public void onCompleted() { int i = 0; } @Override public void onError(Throwable e) { int i = 0;

Bluetooth low energy advertisement scan, channel info or selection

我的梦境 提交于 2019-12-06 08:35:25
问题 I've written an application using bluez, which scans for BLE advertisement data. The application currently receives advertisement messages with no problems. For advertisement messages, BLE sends messages using 3 channels which are 37, 38 and 39. Each uses a different frequency. When the application receives data, I'd like to be able to determine on which channel that data was received. If that is not possible, would it be possible to force a low energy scan on a single channel or a subset of

Bluetooth Low Energy Android - Search in Background

二次信任 提交于 2019-12-06 08:33:36
I would like to know whether it is possible to check in the background if someone enters or leaves the a beacon Region? In iOS for example you can use the methods didEnterRegion or didExitRegion to send notifications from the background. Is there any native possibility or has someone a workaround? Android doesn't have any "native" iBeacon capability at all, but you can see iBeacons using my company's open source Android iBeacon Library , which has APIs similar to those native to iOS 7. In the case of iOS, the CLLocationManagerDelegate gives you access to the didEnterRegion and didExitRegion

Android Thread vs AsyncTask vs IntentService called from BLE onCharacteristicChanged()

若如初见. 提交于 2019-12-06 08:08:24
I have an Android app from which I receive BLE data (every 62ms via notifications). The app can save data via a BufferedWriter to a file. Upon each onCharacteristicChanged() callback, I call either an AsyncTask, Thread or an IntentService to do a file write if the user enabled file save. The AsyncTask seems to work fine. But the docs say execute must be invoked on the UI thread, and I'm calling it from the BLE callback. Is that a problem? And how should I fix it? Using Thread causes this error: GKI_exception out of buffers https://code.google.com/p/android/issues/detail?id=65455 (except my

Bluetooth LE (4.0) How many centrals can connect to a peripheral?

谁说胖子不能爱 提交于 2019-12-06 07:46:42
问题 I'd like to know how many centrals a peripheral can simultaneously be connected to. My question is specific to iOS but I'd appreciate answers from everyone. A couple things: I'm aware that centrals, not peripherals, are designed to handle multiple connections. However I'd like to experiment with the opposite setup for various reasons. From the Bluetooth Core spec V4 - "The Peripheral role is optimized for devices that support a single connection and are less complex than central devices.