bluetooth-lowenergy

Subscribing for notifications from a CBCharacteristic does not work

限于喜欢 提交于 2019-12-07 01:37:14
问题 First things first: running OSX 10.10.4, iOS 4, Xcode 6.3.2, iPhone 6, Swift Short story: I have a certain Bluetooth LE device here from which I want to receive notifications when values of a Characteristic change, e.g. by user input. Trying to subscribe to it does not succeed, but rather yields an error Error Domain=CBATTErrorDomain Code=10 "The attribute could not be found." Long story: So, I have a BluetoothManager class in which I start scanning for Peripherals as soon as my

Detecting whether a BLE device is connectable on Android

那年仲夏 提交于 2019-12-06 23:45:57
问题 I am working on a project for configuring beacons. A certain amount of time after being powered on, a beacon becomes unconfigurable until it is power-cycled. In order to show a list of the configurable beacons, I am looking at certain characteristics (Bluetooth device name, certain manufacturer data in the advertising packet). I also need to know if it is "connectable", i. e. if the PDU Type in the BLE advertising packet for the device indicates that it is connectable. I've searched the

NoClassDefFoundError during class load for BLE scanning callback

戏子无情 提交于 2019-12-06 16:23:45
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.getAddress(); Log.d(TAG,msg); addItems(msg); } }); } };

MQTT-SN on Raspberry pi3 , 6lowpan over BLE

核能气质少年 提交于 2019-12-06 16:01:43
I'm trying to set a MQTT-SN broker (rsmb) ,and using several pi3 as clients. First , I will build a 6lowpan over ble connection. Setting pi3 (RASPBIAN JESSIE kernel v4.4) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable hciconfig hci0 leadv BLE gateway (Ubuntu 14.04) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 35 > /sys/kernel/debug/bluetooth/6lowpan_psm echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo "connect *my_pi3_bluetooth_address* 1" > /sys/kernel/debug/bluetooth/6lowpan_control ifconfig bt0 add 2001:xxxx

UWP Bluetooth LE InvalidCastException

左心房为你撑大大i 提交于 2019-12-06 15:22:05
问题 i want to connect the myo wristband to the hololens. This is the end goal, but I am anyway but close to that :-/ The idea is to set up a Bluetooth LE Connection with UWP. I wanted to do this, as explanined in this Microsoft Document The search for the devices workes fine, but when I try to connect to a device, this line (Point "Connecting to the device" ): GattDeviceServicesResult result = await device.GetGattServicesAsync(); raises the error: System.InvalidCastException: "Unable to cast

How to send command to BLE device and show result

孤人 提交于 2019-12-06 15:12:51
@Override public void onServicesDiscovered(final BluetoothGatt gatt, int status) { super.onServicesDiscovered(gatt, status); if (status == BluetoothGatt.GATT_SUCCESS) { List<BluetoothGattCharacteristic> characteristics = null; List<BluetoothGattService> services = gatt.getServices(); //I am getting all services for (final BluetoothGattService service : services) { characteristics = service.getCharacteristics(); //I am getting all characteristics for each services } } } I am able to connect with BLE device and I am getting all services and characteristics, now I have send some commands, like to

Bluez implementation in android

六月ゝ 毕业季﹏ 提交于 2019-12-06 14:41:20
问题 Can anyone please provide us any source code for bluez implementation in android. Actually we are trying to make an application with GATT profile. This android application should connect with other device by Bluetooth connection. Please suggest me what should be the best way to send data to a non android device. 回答1: Look at Bluetooth chat example by Google, you also can use the same method to connect to a non android device. Specifically you will need this api device

iOS and Bluetooth Low Energy

本秂侑毒 提交于 2019-12-06 14:08:14
问题 I know that there are a lot of restrictions on bluetooth when it comes to iOS. I wanted some more information on Bluetooth Low Energy (LE) and the CoreBluetooth Framework apple provides from iOS 5.0 and greater. Can i connect ANY Bluetooth LE device to an iOS device using the Core Bluetooth Framework? Is there any Bluetooth LE device in production,that comes with a three axis accelerometer and a gyro that i could use like a Human Interface device? 回答1: Sagar, Maybe you can explain more about

Android / iOS - BLE - wake up a terminated application when a BLE device connects

て烟熏妆下的殇ゞ 提交于 2019-12-06 13:48:59
问题 Iam creating an iOS and an Android application that read some data from a bluetooth sensor and saves them in a db. I want to give the ability to save the sensor's data even when the application is terminated. fyi. I have already managed to read the sensor in both iOS and Android while the app is the background. But my concern is on how to make the following scenario work: -Sensor is disconnected from the phone -User terminates the application from the task manager -User connects (and pairs)

While connecting to BLE113 from android 4.3 is logging “Client registered, waiting for callback”

北战南征 提交于 2019-12-06 13:44:47
问题 I'm trying to connect to a BlueGiga BLE113 device and my Samsung Galaxy S4(Android 4.3). I can successfully discover the device but unable to connect and discover services. This is the log after pushing the button to connect. 12-30 16:38:34.012: D/BluetoothGatt(11280): registerApp() 12-30 16:38:34.012: D/BluetoothGatt(11280): registerApp() - UUID=5a5ac8ad-7583-457f-ba60-373c3beaf1b2 12-30 16:38:34.022: D/BluetoothGatt(11280): onClientRegistered() - status=0 clientIf=8 12-30 16:38:34.022: I