gatt

Gatttool: Limited to 5 connections?

两盒软妹~` 提交于 2019-12-05 19:02:22
I connect to five devices by spawning gatttools with pexpect in python*. When I try to connect to a sixth device (using the same CSR 4.0 dongle for all connections) manually I encounter: sudo gatttool -b DC:05:4F:BC:F6:4A -It random [DC:05:4F:BC:F6:4A][LE]> connect Attempting to connect to DC:05:4F:BC:F6:4A Error: connect error: Too many links (31) Is this a gatttool limitation or a hardware limitation? I cloned the source at http://git.kernel.org/cgit/bluetooth/bluez.git and ran grep -r "attempting" but did not get any results. I would like to connect to 20 devices over bluetooth low energy,

BLuetooth Gatt Callback not working with new API for Lollipop

大兔子大兔子 提交于 2019-12-05 12:59:15
问题 I currently have a method which writes to the BLE devices to beep it. My Bluetooth Callback goes as follows : ReadCharacteristic rc = new ReadCharacteristic(context, ds.getMacAddress(), serviceUUID, UUID.fromString(myUUID), "") { @Override public void onRead() { Log.w(TAG, "callDevice onRead"); try{Thread.sleep(1000);}catch(InterruptedException ex){} WriteCharacteristic wc = new WriteCharacteristic(activity, context, getMacAddress(), serviceUUID, UUID.fromString(myUUID), ""){ @Override public

Advertise Bluetooth LE Service using HCITool

时光总嘲笑我的痴心妄想 提交于 2019-12-05 11:45:04
I'm experimenting with creating a Bluetooth Low Energy Peripheral on my Linux computer (The goal is to send data over Bluetooth From an iPhone). Im currently using the Tools hciconfig , hcitool and hcidump . My current experiment is to advertise a Service with a Specific UUID, that the iOS CoreBluetooth Library will pick up. (Note: I'm not trying to create an iBeacon). Right now, it's actually as simple as One Single Command that is bugging me. hcitool -i hci0 cmd 0x08 0x0008 15 02 01 1a 11 07 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 What I think it should do is the following: 0x08:

BLE subscribe to notification using gatttool or bluepy

怎甘沉沦 提交于 2019-12-05 11:04:39
I am writing a program using bluepy that listen for a characteristic sent by a bluetooth device. I can also use any library or language, the only constraint is to run on Linux and not in mobile environment (it seems is widely used only in mobile devices, no one use BLE with desktop). Using bluepy I register the delegate and after trying to register for notification calling write('\x01\x00') as described in the bluetooth rfc. But it doesn't work, any notification for the characteristic is received. Maybe I am wrong in writing the message for subscribing. Is there an error in the small snippet I

Android BLE 4.3 onDescriptorWrite returns status 128 on enabling characteristics notification

被刻印的时光 ゝ 提交于 2019-12-05 08:51:39
A question on enabling characteristics using the new android BLE 4.3: I am not getting any notification from the BLE device though I enable notification on characteristics one by one asynchronously using a queue. I also write the descriptor with UUID "00002902-0000-1000-8000-00805f9b34fb" with ENABLE_NOTIFICATION_VALUE. I have followed the recommendation from Google sdk doc and as well suggestions from various forums. By the way I get status = 128 on "onDescriptorWrite". Any idea as what this status means? I went thru google code and did not see any info on this. Even the source code does not

Reading multiple characteristics from a BLE device synchronously (Recommended Method for Android)

萝らか妹 提交于 2019-12-05 06:33:19
I am working on an android application which reads data from a BLE device. I came across plenty of solutions here on how to read multiple characteristics and most of them suggested Queues. I did implement the Queue method and everything is working fine in my code as expected. The reason why i started this thread is to find the best possible and most efficient solution and also to clear some of my doubts regarding how certain BLE service characteristics work. I have taken the below two links as reference which helped me in making my code work. Source 1: Android: BLE how to read multiple

BLE GATT onCharacteristicChanged not called after subscribing to notification

≯℡__Kan透↙ 提交于 2019-12-05 02:32:52
this is my first post on SO. I have some problems subscribing to GATT notifications on android 5.0.2 . What I aim to do is to connect an Arduino with a BLE Shield to my Android phone. I have a sensor connected to the Arduino and want to send the data from the Arduino to my phone by using the BLE shield. There is a nRF8001 on the shield which is the server, my phone/app is the client. What I did so far was to create an Android app which scans for BLE devices. It can connect to a device and read or write characteristics. So, I can "manually" read the characteristic by calling gatt

Maximum no. of BLE Connection using BlueZ

允我心安 提交于 2019-12-04 22:29:59
问题 Q1. Is there a connection limit for BLE Central Device while connecting to BLE peripherals using BlueZ 5.34? My question is for general connection capabilities using BlueZ not white list. Q2. If the no. of connection depends on the controller. Is there a way of finding the Max limit? Q3. Does/Can the host BlueZ or Bluedroid add limit to the max no. of LE connections supported by the controller? Q4. If there is a connection limit for LE devices, what does the author mean by "no inherent limit"

Android Using BluetoothGattServer

谁说胖子不能爱 提交于 2019-12-04 21:50:18
For an application I have need for an android device to be both a Ble Gatt peripheral and server to accept both incoming and send outgoing messages; however, it seems I cannot find much information pertaining to setting up and maintaining the server other than looking at projects of others in github. Can anyone show me the correct solution or guide me to more information regarding setting up BluetoothGattServer. I would like to quickly mention, that most of the Android devices in use don't support the BluetoothGattServer. However newer models have that capability more and more. First of all

Android How to read BLE properties Readable Writable Notifiable GATT Characteristics

為{幸葍}努か 提交于 2019-12-04 18:03:47
问题 How to read BluetoothGattCharacteristic properties like is characteristic Readable , Writable or Notifiable . 回答1: /** * @return Returns <b>true</b> if property is writable */ public static boolean isCharacteristicWritable(BluetoothGattCharacteristic pChar) { return (pChar.getProperties() & (BluetoothGattCharacteristic.PROPERTY_WRITE | BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE)) != 0; } /** * @return Returns <b>true</b> if property is Readable */ public static boolean