ble

BLE gatttool cannot connect even though device is discoverable with hcitool lescan

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm running RPi with a USB Bluetooth dongle. When I use hcitool, I can discover the SmartTag device. But when I use gatttool, I cannot connect. It says "Host is down (112)". Here are my commands: $ sudo hcitool lescan LE Scan ... BC:6A:29:AB:DE:2B (unknown) BC:6A:29:AB:DE:2B SensorTag Checking for bluetooth adapters on my RPi I get: $ hcitool dev Devices: hci0 5C:F3:70:60:E6:1B Then, when I use the gatttool like this, I get: $ sudo gatttool -i hci0 -b BC:6A:29:AB:DE:2B -I [ ][BC:6A:29:AB:DE:2B][LE]> When I type connect, I get this: [ ][BC:6A

Android listing BLE devices after device scan

匿名 (未验证) 提交于 2019-12-03 01:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 ; import android . app .

Bluetooth Low Energy API for Windows 7.0

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Windows 8 exposes an API to communicate to Bluetooth Low Energy (Smart) devices, but this API is not available in previous versions of Windows, so how can I communicate with a BLE dongle on Windows 7? The BLE dongle I'm currently using (BLED112) exposes a virtual serial port, over which you can send commands using their custom proprietary API, but if I implement this in my software, it will not work with dongles from other manufacturers. So is there a way to communicate with BLE devices on Windows 7 which is manufacturer-independent? 回答1: So

Nordic SDK printing to serial

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an Arduino device that runs on the Nordic SDK (it's a Red Bear Lab BLE nano). I want to be able to do a serial print into GTKTerm to be able to debug what is going on in my code. To do this I have the following code: /* * Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is confidential property of Nordic Semiconductor. The use, * copying, transfer or disclosure of such information is prohibited except by express written * agreement with Nordic Semiconductor. * */ /** * @brief BLE Heart

BLE different MTU for different implementations

匿名 (未验证) 提交于 2019-12-03 01:40:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have tried different implementations of BLE connection on Android. One with RxAndroidBle and another one with simple Android API. I used RxAndroidBle example app for testing. I connect to the same peripheral with the same service and characteristic. Though when I read or get notifications from it in the case of RxAndroidBle I receive 512 bytes and in the case of Android API - just 20. I try to request MTU 512 but onMtuChanged is never called and I still receive 20. Do I miss something? 转载请标明出处: BLE different MTU for different

NoClassDefFoundError during class load for BLE scanning callback

匿名 (未验证) 提交于 2019-12-03 01:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am keep on getting the NoClassDefFoundError when my class is loaded. The code is taken from BluetoothLeGatt project - http://developer.android.com/samples/BluetoothLeGatt/project.html My code: // Device scan callback. private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { //java.lang.NoClassDefFoundError... @Override public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) { runOnUiThread(new Runnable() { @Override public void run() { String msg= device

Scanning for BLE Devices from C/C++

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: from the "Bluetooth Device Access Guide" , I've read that the Bluetooth API should be accessable from C or from C++. I've found some C-headers (IOBluetoothUserLib.h, Bluetooth.h) in the IOBluetooth framework that are related to Bluetooth and contain enumerations and data structured to define search creteria but I fail to find any function that takes such enumeration or data structure as parameter. According to the documentation I would have to create a CBCentralManager but I fail to find a way to do so from C or C++. Background: We use OS/X

Programmatically pairing with a BLE device on Android 4.4+

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Does anyone have a complete working example of how to programmatically pair with a BLE ( not Bluetooth Classic) device that uses passkey entry (i.e. a 6-digit PIN) or Numeric Comparison on Android 4.4 or later? By 'programmatically' I mean I tell Android the PIN - the user isn't prompted. There are many similar questions about this on SO but they are either a) about Bluetooth Classic, b) old (before setPin() and createBond() were public), or c) unanswered. My understanding is as follows. You connect to the device and discover its services.

BLE Scan Interval Windows 10

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there any way to adjust the BLE advertisement scanning interval on Windows 10 when using Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher ? When scanning on Android, I see the the advertisements every 100ms, but on Windows 10 using C# I am only getting a BluetoothLEAdvertisementWatcher.Received event thrown every maybe 700ms. 回答1: I guess not. The scan parameters are hardcoded to a scan interval of 118.125 ms and scan window of 18.125 ms. That's why you only get 1/7 of all packets (since 18.125 / 118.125 is ~1/7).

Getting Type_Gatt_Error with status 133 while connecting to AND UA651BLE

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to connect to AnD UA-651BLE blood pressure monitor and get the values in an android app. The app is able to find the device but I am getting Type_Gatt_Error in 'onConnectionStateChange'. This is working fine for certain devices like samsung galaxy S5, Moto G4 etc. but not for certain phones like redmi 3s prime, etc. This works well and i am able to read data, when i unpair the device and re pair it everytime. I am not able to understand anything as i am new to android-ble integration. I tried to change the target SDK versions to