bluetooth

iOS Swift - Poor audio quality when using Bluetooth external speaker

旧街凉风 提交于 2021-01-28 00:18:04
问题 Im using iOS app that stream from url (radio app), once im trying to stream from the app through Bluetooth devise like external speaker or car audio system, the audio quality is vert poor and jarring. When playing from the iOS devise itself, everything sounds good (speaker and earphones). override func viewDidLoad() { super.viewDidLoad() // Set AVFoundation category, required for background audio var error: NSError? var success: Bool do { try AVAudioSession.sharedInstance().setCategory(

Delete all paired bluetooth devices on Android

↘锁芯ラ 提交于 2021-01-27 19:06:32
问题 I would like to delete paired bluetooth low energy devices with names that start with "ABC" on an Android phone programatically. I am using Android studio. 回答1: To unpair all devices use this code Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices(); if (pairedDevices.size() > 0) { for (BluetoothDevice device : pairedDevices) { try { if(device.getName().contains("abc")){ Method m = device.getClass() .getMethod("removeBond", (Class[]) null); m.invoke(device, (Object[])

Segmentation fault when calling sdp_record_register()

醉酒当歌 提交于 2021-01-27 15:42:35
问题 I'm trying to register my Bluetooth service in SDP using BlueZ. I follow this tutorial. Code compiles successfully but when I run it, I get a segmentation fault (even with the code copy-pasted from the tutorial). Part of stack trace: { "address": 140382101864854 , "build_id": "a629c43f58d471aa12e35d3e63ee264c514a21ac" , "build_id_offset": 86422 , "function_name": "sdp_device_record_register_binary" , "file_name": "/lib64/libbluetooth.so.3" } , { "address": 140382101865504 , "build_id":

Bluetooth connectivity: MODE_IN_CALL vs MODE_IN_COMMUNICATION

橙三吉。 提交于 2021-01-27 12:23:02
问题 I have an application that needs to connect to wireless bluetooth headset to collection RAW audio. MODE_IN_CALL works in some devices and MODE_IN_COMMUNICATION in others. Mic works and I lose audio or vice versa. I am using Nexus 5x and Samsung Edge. But behaviour is inconsistent across 2 devices of same model and make. Phone calls and Media Audio is enabled for paired bluetooth headset. if (btAdapter != null && btAdapter.isEnabled() && btAdapter.getProfileConnectionState(BluetoothProfile

Accessing Bluetooth dongle from inside Docker?

与世无争的帅哥 提交于 2021-01-20 19:31:27
问题 Is it possible to use a bluetooth (BLE in my case) dongle inside of a docker container? On my host machine: $ hcitool dev Devices: hci0 5C:F3:70:64:F0:11 Inside of Docker it doesn't find anything. I'm running Docker as: sudo docker run --privileged -i -t ubuntu /bin/bash I don't know enough about the bluetooth subsystem in Linux to understand what is different between the host and docker. The hci0 device does show up in both systems: $ ls -l /sys/class/bluetooth lrwxrwxrwx 1 root root 0 Mar 5

Accessing Bluetooth dongle from inside Docker?

痞子三分冷 提交于 2021-01-20 19:31:15
问题 Is it possible to use a bluetooth (BLE in my case) dongle inside of a docker container? On my host machine: $ hcitool dev Devices: hci0 5C:F3:70:64:F0:11 Inside of Docker it doesn't find anything. I'm running Docker as: sudo docker run --privileged -i -t ubuntu /bin/bash I don't know enough about the bluetooth subsystem in Linux to understand what is different between the host and docker. The hci0 device does show up in both systems: $ ls -l /sys/class/bluetooth lrwxrwxrwx 1 root root 0 Mar 5

Bluetooth scanner not discovering devices

此生再无相见时 提交于 2021-01-07 01:21:03
问题 I am creating a Bluetooth scanner app and trying to find the available devices to pair. I have a Bluetooth headset which I am trying to find running the application on android 10. Permissions are set in manifest <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> App contains a simple button on whose click I start discovery for bluetooth

Bluetooth scanner not discovering devices

孤者浪人 提交于 2021-01-07 01:15:53
问题 I am creating a Bluetooth scanner app and trying to find the available devices to pair. I have a Bluetooth headset which I am trying to find running the application on android 10. Permissions are set in manifest <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> App contains a simple button on whose click I start discovery for bluetooth

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 .... ?

Reading data from a Bluetooth device low energy rfcomm python3

笑着哭i 提交于 2020-12-15 01:48:48
问题 Faced a problem. There is a bluetooth device with low power consumption. BLE. The goal is to send a command to the device and get the data back. For example: command - 0x** 0x** 0x**, where first 0x** - code command, second 0x - data lenght. Response mast be - 0x** 0x** 0x**. I can not send a command to the device. The device works by RFCOMM. Actually the code that is available, but it does not give a result - it says that the device is off. from bluetooth import * import socket class Work: