bluetooth-lowenergy

java.lang.NoClassDefFoundError on older Android SDK versions

落花浮王杯 提交于 2021-01-27 03:52:37
问题 I released a version of my app to the Google Play and woke up this morning with a number of unhappy customers. The latest version of the app integrates support for a Bluetooth Low Energy (BTLE) heart rate monitor. The app runs fine on Android 4.3 and 4.4 but crashes on 4.0, 4.1, and 4.2 with the following error. FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.eiref.boatcoach.MainActivity at com.eiref.boatcoach.WhatToDo.onClick(WhatToDo.java:274) at android.view.View.performClick

Ble: Send advertise data to iOS from Android

。_饼干妹妹 提交于 2021-01-07 06:35:57
问题 I have to send some advertise data via ble to an iOS central app. On Android peripheral side, when i create advertise i do: var byteArrayData = dataToSend.toByteArray(Charsets.UTF_8) var data = AdvertiseData.Builder().apply { addServiceData( ParcelUuid(MY_SERVICE_UUID), byteArrayData ) } bleAdvertiser.startAdvertising(mySettings.build(), data.build(), myAdvertiseCallback) but it seems that iOS is not able to read custom service data. So, there's a way to sent some small data (few bytes) via

Ble: Send advertise data to iOS from Android

淺唱寂寞╮ 提交于 2021-01-07 06:34:31
问题 I have to send some advertise data via ble to an iOS central app. On Android peripheral side, when i create advertise i do: var byteArrayData = dataToSend.toByteArray(Charsets.UTF_8) var data = AdvertiseData.Builder().apply { addServiceData( ParcelUuid(MY_SERVICE_UUID), byteArrayData ) } bleAdvertiser.startAdvertising(mySettings.build(), data.build(), myAdvertiseCallback) but it seems that iOS is not able to read custom service data. So, there's a way to sent some small data (few bytes) via

Request MTU is not working in Nougat

纵饮孤独 提交于 2021-01-04 14:36:40
问题 I am working on App which is communicate with BLE device.I can write 20 bytes easily on characteristics but when it is more than 20 bytes it's create problem.I am using mBluetoothGatt.requestMtu(512); write charateristics after getting success. @Override public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { super.onMtuChanged(gatt, mtu, status); if (status == BluetoothGatt.GATT_SUCCESS) { System.out.print("Mtu Granted"); // this.supportedMTU = mtu; } } which is working fine in

Request MTU is not working in Nougat

£可爱£侵袭症+ 提交于 2021-01-04 14:36:12
问题 I am working on App which is communicate with BLE device.I can write 20 bytes easily on characteristics but when it is more than 20 bytes it's create problem.I am using mBluetoothGatt.requestMtu(512); write charateristics after getting success. @Override public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { super.onMtuChanged(gatt, mtu, status); if (status == BluetoothGatt.GATT_SUCCESS) { System.out.print("Mtu Granted"); // this.supportedMTU = mtu; } } which is working fine in

continue advertising after connection bluez

此生再无相见时 提交于 2021-01-01 07:53:27
问题 I have setup advertising in bluez using hcitool The device sow up as expected. The setup is done as follow: #advertising sudo hcitool -i hci0 cmd 0x08 0x0008 18 02 01 06 02 0a 00 11 07 9e ca dc 24 0e e5 a9 e0 93 f3 a3 b5 01 00 40 6e 00 00 00 00 00 00 00 #scan response sudo hcitool -i hci0 cmd 0x08 0x0009 0d 0c 09 6f 6f #setup advertising interval sudo hcitool -i hci0 cmd 0x08 0x0006 80 02 c0 03 00 00 00 00 00 00 00 00 00 07 00 #turn advertising on sudo hcitool -i hci0 cmd 0x08 0x000a 01 After

continue advertising after connection bluez

我的梦境 提交于 2021-01-01 07:52:41
问题 I have setup advertising in bluez using hcitool The device sow up as expected. The setup is done as follow: #advertising sudo hcitool -i hci0 cmd 0x08 0x0008 18 02 01 06 02 0a 00 11 07 9e ca dc 24 0e e5 a9 e0 93 f3 a3 b5 01 00 40 6e 00 00 00 00 00 00 00 #scan response sudo hcitool -i hci0 cmd 0x08 0x0009 0d 0c 09 6f 6f #setup advertising interval sudo hcitool -i hci0 cmd 0x08 0x0006 80 02 c0 03 00 00 00 00 00 00 00 00 00 07 00 #turn advertising on sudo hcitool -i hci0 cmd 0x08 0x000a 01 After

continue advertising after connection bluez

别等时光非礼了梦想. 提交于 2021-01-01 07:50:01
问题 I have setup advertising in bluez using hcitool The device sow up as expected. The setup is done as follow: #advertising sudo hcitool -i hci0 cmd 0x08 0x0008 18 02 01 06 02 0a 00 11 07 9e ca dc 24 0e e5 a9 e0 93 f3 a3 b5 01 00 40 6e 00 00 00 00 00 00 00 #scan response sudo hcitool -i hci0 cmd 0x08 0x0009 0d 0c 09 6f 6f #setup advertising interval sudo hcitool -i hci0 cmd 0x08 0x0006 80 02 c0 03 00 00 00 00 00 00 00 00 00 07 00 #turn advertising on sudo hcitool -i hci0 cmd 0x08 0x000a 01 After

advertise custom service uuid with bluez 5.4x

余生颓废 提交于 2021-01-01 06:44:23
问题 I am writing a custom service over BLE to transmit custom characteristics. It has it's own UUID such as '8E400001-B5A3-F393-E0A9-E50E24DCCA9E'. I have found that a particular android app (BLE client) I wish to support requires that a custom service UUID is included in the advertising packet. However our peripheral is running via bluez 5.43 on debian and I cannot figure out how to put this UUID in the advertising packet. I think it will be something like: hcitool -i hci0 cmd 0x08 0x0008 .... ?

How does one create a Terminal I/O connection to a Telit BLE module?

可紊 提交于 2021-01-01 04:12:36
问题 I'm writing a progressive web app for an android tablet which should be able to read and write to a device with an embedded Telit BLE module via a BLE connection. I am able to open a BLE connection and discover services and characteristics. I am unable to establish a connection over BLE using Telit's Terminal I/O (TIO) protocol. My remote (server) device is a Falcom Fox3 tracker unit. A notification event can be read from the Fox3 serial port when a connection is established. This has been