bluetooth-lowenergy

Receiving BluetoothGattCallback multiple times after foreground Service restart

怎甘沉沦 提交于 2020-01-03 13:43:29
问题 I am working with BLE enabled hardware and communicating with the hardware using Foreground Service of the Android. Foreground service is responsible for handling the BLE related events and it works quite good as per requirements for a while but somehow if the Foreground service is got killed or BLE connection is broken due to any reason then app tries to reconnect to the BLE again and then BLE callbacks start getting duplicate events from the BluetoothGattCallback, that is even though

Android BLE Gatt Characteristic WRITE_TYPE_NO_RESPONSE not working

陌路散爱 提交于 2020-01-03 09:54:49
问题 I have developed an Android app that connects to a CC2540 BLE peripheral. When I do a Characteristic write of type no response (WRITE_TYPE_NO_RESPONSE), I still get the callback onCharacteristicWrite at the app level. Is this behavior correct? I understand there is probably a low level acknowledgement that occurs between the Android device and the peripheral. But the reason I am asking is because this is causing an issue where I can only send a write once I have received this callback, which

How can I receive simple integer values over bluetooth in ios

回眸只為那壹抹淺笑 提交于 2020-01-03 05:48:45
问题 I am trying to learn how to get some sensors plugged into an Arduino board to talk to an iPhone over Bluetooth with a Red Bear Labs mini board but have hit a brick wall. The sensors get a reading and this is sent to the phone over BLE. So far I've connected to the device and I get back what appears to be data but I can't make sense of it. I've written a little sketch that looks like this, to simulate the sensor data. #include <SoftwareSerial.h> SoftwareSerial bluetooth(5, 6); void setup() {

How to advertise manufacturer specific data using bluetooth low energy protocol in Xamarin iOS?

六眼飞鱼酱① 提交于 2020-01-03 05:36:05
问题 I need to broadcast advertisement packets which contain certain manufacturer specific data using Bluetooth low energy protocol in Xamarin iOS. I am able to broadcast advertising packets, but when they are received they contain no manufacturer specific data. They do contain local name and data service UUID key which I'm setting. I should mention doing this in Xamarin Android is not a problem. Could you please tell me why manufacturer specific data is not being broadcast in Xamarin iOS? I am

How to make a BLE mesh network?

爷,独闯天下 提交于 2020-01-03 04:51:31
问题 I had been wondering how wireless earbuds work and came across this image. I do not know how to replicate what is shown in the following image and would like to learn how to do it. My end goal is to be able to have the smartphone connect to a device, while still being able to play music to a Bluetooth Headphone. I read into BLE 4.1 mesh and I am not sure if that would help either. I have made images for the possible ways the multiple devices could communicate but I don't have enough

How to send RGB signal to BLE device using iPhone application?

烂漫一生 提交于 2020-01-03 03:15:08
问题 We are working on iOS application and in which we need to pass the RGB signal to the BLE device and based on RGB code the device LED will glow. We are doing the connection using CBCentralManager for the CBPeripheral object of Bluetooth Framework in iOS app. We are setting the characteristic and descriptor UUID but still we are not able to send the signal on the BLE device. Here is the code we are using to pass RGB data in hex bytes format. - (void)centralManager:(CBCentralManager )central

BLE: Read Long Characteristics Value using Android / iOS

人盡茶涼 提交于 2020-01-02 19:21:16
问题 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

How to get Disconnect Event from GATT Server on Bluez/Linux

杀马特。学长 韩版系。学妹 提交于 2020-01-02 10:25:32
问题 Environment: Bluez 5.14, Linux 3.1, USB Plugable BLE radio, TI BLE keyfob (CC2541 dev kit) Linux Device <---hci----> USB BLE Radio We enabled key press events on TI keyfob using gatttool and started to listen for events gatttool -b [hardware ID] --char-write-req -a [handle] -n [value] --listen (gatttool -b 90:59:AF:09:E1:5D --char-write-req -a 0x0048 -n 0100 --listen) Pressing buttons on the keyfob and see these events Notification handle = 0x0047 value: 02 Notification handle = 0x0047 value:

Android BLE // Using custom service UUID

不问归期 提交于 2020-01-02 07:09:21
问题 We are developping a custom bluetooth low energy peripheral and we need to define our custom service. Based on this link: https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery All short UUID (16 bits) are reserved pending future revisions of the BT services specs. And it seems that current version of Android (4.4) doesn't support the 128 bits UUID. So basically i can't use a 16 bits UUID for defining my service, but i can't filter my services with Android for a 128

Android BLE // Using custom service UUID

左心房为你撑大大i 提交于 2020-01-02 07:09:12
问题 We are developping a custom bluetooth low energy peripheral and we need to define our custom service. Based on this link: https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery All short UUID (16 bits) are reserved pending future revisions of the BT services specs. And it seems that current version of Android (4.4) doesn't support the 128 bits UUID. So basically i can't use a 16 bits UUID for defining my service, but i can't filter my services with Android for a 128