bluetooth

How to handle AT commands from a Bluetooth headset in Android?

ぃ、小莉子 提交于 2020-06-16 05:04:11
问题 I would like to handle an AT command (for double tap event) from a standard Bluetooth mono headset. By default, the double tap sends AT+BLDN command (Redial event) to the phone. According to Android documentation, registering a Broadcast Receiver for android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT will handle all such vendor related AT commands. But, it is not being invoked when the AT command is sent by the headset. Though, the redial event happens on the phone. 回答1: AT+BLDN

How to handle AT commands from a Bluetooth headset in Android?

谁说我不能喝 提交于 2020-06-16 05:04:07
问题 I would like to handle an AT command (for double tap event) from a standard Bluetooth mono headset. By default, the double tap sends AT+BLDN command (Redial event) to the phone. According to Android documentation, registering a Broadcast Receiver for android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT will handle all such vendor related AT commands. But, it is not being invoked when the AT command is sent by the headset. Though, the redial event happens on the phone. 回答1: AT+BLDN

Bluetooth HC-05 sending error 1F for INQ command only

◇◆丶佛笑我妖孽 提交于 2020-06-12 09:15:54
问题 I have a problem with my new bluetooth HC-05 module. In AT-mode it works perfectly with all commands that I need... exept INQ. I have tried to send whole bunch of other commands beforehand: AT+INIT OK AT+ORGL OK AT+ROLE=1 OK AT+CLASS=0 OK They all are working just fine. I tried to change IAC and INQM settings as well... but the answer from module is always the same: AT+INQ ERROR:(1F) I read related topic here and tried to push the button at HC-05, as it recommended there, but -- no result

Bluetooth diagnostics logs on iOS

我的未来我决定 提交于 2020-06-11 10:37:11
问题 I'd like to generate Bluetooth diagnostics logs on iPhone. I've installed Bluetooth Development Profile and I can click on "Save logs". But where can I find them and how can I transfer them to PC? Preferably without iTunes, as on Windows I have very bad experience with this SW. I'm new to Apple ecosystem. Thank you. 回答1: Your answer can be found in the Apple documentation here. The steps are as follows. Download and install the profile on your device (this can be done through Safari on the

BluetoothAdapter getAddress() return 02:00:00:00:00:00

我怕爱的太早我们不能终老 提交于 2020-06-01 04:04:30
问题 I try to return the Bluetooth mac address of my device but this is not working and return this address : 02:00:00:00:00:00 . -I'm using API Level 28 -I can get my Bluetooth mac address in my android system settings but not programmatically in my app. -I can get the mac address of this device programmatically from other devices. What I understand is that access to address mac is only for system applications ,but if It's true why other devices get my mac address and not me ! BluetoothAdapter

Detect a bluetooth device using android-beacon-library

旧时模样 提交于 2020-05-31 06:27:06
问题 I am using android-beacon-library to discover nearby Beacons and it is work fine and very reliable. Is it possible to use the same library to detect the Bluetooth signal of an Android device? I couldn't find any good reliable method to discover the nearby Bluetooth devices, that's why I want to use this library. 回答1: The library is optimized to detect a very specific kind of Bluetooth LE device -- a beacon as the library name would suggest. It is not designed to detect more general non-beacon

How to update Battery Level in BLE Device with CoreBluetooth in Swift?

元气小坏坏 提交于 2020-05-25 08:06:21
问题 func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { for c in service.characteristics!{ print("---Characteristic found with UUID: \(c.uuid) \n") let uuid = CBUUID(string: "2A19")//Battery Level if c.uuid == uuid{ //peripheral.setNotifyValue(true, for: c)//Battery Level peripheral.readValue(for: c) } } } } func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { /* Battery Level */

Large file sending by using react-native-ble-plx

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-17 06:23:11
问题 I'm trying to write in a characteristic that sends a binary file as the value, this value is large, it's 19215 bytes which is not a problem because i negociated the mtu using : device.connect({ requestMTU: 260 }) i've divided the file into 240 bytes for each element and each time encode the element to base64 and i use the function writeCharacteristicWithResponseForDevice() in order to write that element, the issue is i successfully wrote the whole file 19215 bytes using a loop to write each

Detecting and recovering from “hanging” bluetooth python connection

久未见 提交于 2020-05-17 05:59:05
问题 I have a bluetooth connection between a Raspberry Pi 3b+ and an Arduino Mega, using the RPi built-in module, and an HC-05 module on the Arduino. Bi-directional communication works like a charm, for minutes to sometimes, hours at a time. Then, at seemingly random times, the python code hangs, blocked on the sock.recv() function. I can kill it via ctrl-c, and restart it, and it usually reconnects without a problem. I know Bluetooth is a little finicky and so while any suggestions of how to make

Enable BlueTooth programmatically using C#.net (not UWP)

我只是一个虾纸丫 提交于 2020-05-14 12:36:05
问题 How to Enable BlueTooth programmatically using C#.net. I know there are some APIs in UWP, but I am working on WPF. So dont want get into integrating with UWP code. Please let me know if there is way in C#.net or WPF or Winforms? 来源: https://stackoverflow.com/questions/54555202/enable-bluetooth-programmatically-using-c-net-not-uwp