bluetooth

Bluetooth headphones button event detection in javascript

风格不统一 提交于 2021-02-18 11:25:37
问题 I am building a web app where I detect the headphones button event. I succeeded in capturing headphones button event when they are plugged in. Now I am trying to capture Bluetooth headphones next button event. Any help on this please? Code for headphone button detection. document.addEventListener('volumeupbutton', () => { //Do something here }, false); I need something similar to this. 回答1: You can use keydown and keyup events for implementing the long press functionality. // Imprementation

How to refresh services / clear cache?

蓝咒 提交于 2021-02-16 09:15:08
问题 On some android devices (regardless of the OS or Bluetooth version) there is a problem after BLE device connect. The services / characteristics are not up to date. This usually happens when the peripheral changes his services. (while the app was not connected) In this state, it is not possible to use the device. To verify this issue you can discover all characteristics and you see that there are outdated (no more existing) characteristics loaded from cache of the android device. Current

How to refresh services / clear cache?

南笙酒味 提交于 2021-02-16 09:14:47
问题 On some android devices (regardless of the OS or Bluetooth version) there is a problem after BLE device connect. The services / characteristics are not up to date. This usually happens when the peripheral changes his services. (while the app was not connected) In this state, it is not possible to use the device. To verify this issue you can discover all characteristics and you see that there are outdated (no more existing) characteristics loaded from cache of the android device. Current

Receiving/sending signals via Bluetooth antenna

徘徊边缘 提交于 2021-02-11 18:16:02
问题 Is there a possibility to read signals from Bluetooth antenna? I want to do a kind of radar. I also want to sending signals bytes by bytes. Can I do it on Android? 回答1: Short answer: no Long answer: yes, but you have to root your device, recompile kernel and write new bluetooth driver and firmware for your bluetooth module. No way to do it using only Android SDK. 来源: https://stackoverflow.com/questions/21800252/receiving-sending-signals-via-bluetooth-antenna

Did something change with Bluetooth Serial in Android 10?

守給你的承諾、 提交于 2021-02-11 16:27:24
问题 I have a Google Pixel 3a XL on Android 10 that is unable to make a good Bluetooth serial connection to a Bluetooth SPP module using Bluetooth 2.0. However, I can connect to a module with Bluetooth 1.2. I haven't been able to determine if this is related to all of Android 10, or something specific to the Pixel 3 line. I'm trying to get GPS position data from a GPS receiver via Bluetooth. When I try to bring up a connection using createInsecureRfcommSocketToServiceRecord() , the serial

Did something change with Bluetooth Serial in Android 10?

一曲冷凌霜 提交于 2021-02-11 16:27:08
问题 I have a Google Pixel 3a XL on Android 10 that is unable to make a good Bluetooth serial connection to a Bluetooth SPP module using Bluetooth 2.0. However, I can connect to a module with Bluetooth 1.2. I haven't been able to determine if this is related to all of Android 10, or something specific to the Pixel 3 line. I'm trying to get GPS position data from a GPS receiver via Bluetooth. When I try to bring up a connection using createInsecureRfcommSocketToServiceRecord() , the serial

BLE temperature characteristic conversion

▼魔方 西西 提交于 2021-02-11 13:58:48
问题 I have a BLE app running on nrf51822 on Zephyr. Application is reading data from humidity and temperature sensor and exposes environmental sensing characteristic. Main exposed value is temperature (uuid:2A6E). I have trouble reading this data via Bluez on linux. With nrfConnect app everything works no problem - I connect to the device and can see temperature reading - somewhere between 20 and 26 degrees (assigned to said uuid). Via Bluez I can connect and read characteristic handle but the

BLE temperature characteristic conversion

帅比萌擦擦* 提交于 2021-02-11 13:57:16
问题 I have a BLE app running on nrf51822 on Zephyr. Application is reading data from humidity and temperature sensor and exposes environmental sensing characteristic. Main exposed value is temperature (uuid:2A6E). I have trouble reading this data via Bluez on linux. With nrfConnect app everything works no problem - I connect to the device and can see temperature reading - somewhere between 20 and 26 degrees (assigned to said uuid). Via Bluez I can connect and read characteristic handle but the

Need help to parse mealtype on glucometer android BLE

佐手、 提交于 2021-02-11 13:20:56
问题 Need help to parse mealtype on glucometer android BLE. https://github.com/oesmith/gatt-xml/blob/master/org.bluetooth.characteristic.glucose_measurement_context.xml Here's my data: [27, 5, 0, -28, 7, 8, 24, 17, 18, 41, -29, 1, 102, -80, -8, 0, 0] I also found this one: C3: Field exists if the key of bit 1 of the Flags field is set to 1 Here's my enum public static Meal from(final int code) { switch (code) { case 1: return PREPRANDIAL; case 2: return POSTPRANDIAL; case 3: return FASTING; case 4

Is it possible to change bluetooth profile on RPi4?

老子叫甜甜 提交于 2021-02-11 13:00:50
问题 I have a camera connected to a RPi4 and I want to stream its feed via bluetooth. BLE max speed is 2 Mbps, which is a little too slow. I'd like to switch to bluetooth classic, to reach 24 Mbps. Is it possible? 回答1: There is example code for how to switch profiles in BlueZ at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/test-profile I am assuming you are interested in the VDP profile which is documented at: https://www.bluetooth.com/specifications/profiles-overview/) However, I