bluetooth

QT5 Bluetooth - scanning at regular intervals freezes the program

自作多情 提交于 2021-02-08 07:32:40
问题 I am currently using QT5 (c++) for implementing a bluetooth scanner which searches for all available devices in detection range. The program is running on a Raspberry PI 3, without a GUI (command line only). The routine seems to work fine at first (3+ hours without issues). Then, after a seemingly random amount of repetitions, the bluetooth search doesn't find any device, even if they are physically there. After this happens, the program doesn't respond to system signals anymore, the program

QT5 Bluetooth - scanning at regular intervals freezes the program

落爺英雄遲暮 提交于 2021-02-08 07:32:05
问题 I am currently using QT5 (c++) for implementing a bluetooth scanner which searches for all available devices in detection range. The program is running on a Raspberry PI 3, without a GUI (command line only). The routine seems to work fine at first (3+ hours without issues). Then, after a seemingly random amount of repetitions, the bluetooth search doesn't find any device, even if they are physically there. After this happens, the program doesn't respond to system signals anymore, the program

iOS - Cancel bluetooth connection when app in background

别来无恙 提交于 2021-02-08 06:43:27
问题 I have an iOS app connecting to a peripheral over BLE. I'm able to cancel the connection immediately when the app enters the background, or leave the connection active until iOS suspends the app. Is there a programmatic way to keep the connection active for a brief period, but ensure it disconnect within a certain time - say after 60 seconds - to minimize battery impact and make the peripheral available for other iOS devices? 回答1: First, to get the BLE connection working in the background,

Android 10: GATT error with 133 - how fix?

血红的双手。 提交于 2021-02-08 05:30:16
问题 I have android app. I use BLE(Bluetooth low energy) for connect to devices. It is work good, but I have issue on Android 10. This is my code: Hashtable<String, BluetoothDevice> myHtDevices; .... BluetoothGatt gatt = myHtDevices.get(deviceId).connectGatt(this, false, gattCallback); in onConnectionStateChange I get: //public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState){ status= 133, newStatus =0, I have this issue only Android Q. I tried this method(add param

Implicit Broadcast android.bluetooth.device.action.ACTION_ACL_CONNECTED NOT working

这一生的挚爱 提交于 2021-02-08 03:26:50
问题 My receiver is not getting called when I declare an implicit broadcast receiver in AndroidManifest. <receiver android:name=".BluetoothConnectionReceiver_" android:enabled="true" android:exported="true" android:permission="android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN"> <intent-filter> <action android:name="android.bluetooth.device.action.ACL_CONNECTED" /> <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED" /> </intent-filter> </receiver> I understand

Implicit Broadcast android.bluetooth.device.action.ACTION_ACL_CONNECTED NOT working

走远了吗. 提交于 2021-02-08 03:25:36
问题 My receiver is not getting called when I declare an implicit broadcast receiver in AndroidManifest. <receiver android:name=".BluetoothConnectionReceiver_" android:enabled="true" android:exported="true" android:permission="android.permission.BLUETOOTH, android.permission.BLUETOOTH_ADMIN"> <intent-filter> <action android:name="android.bluetooth.device.action.ACL_CONNECTED" /> <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED" /> </intent-filter> </receiver> I understand

How to detect whenever my android device gets connected/disconnected from paired bluetooth device

陌路散爱 提交于 2021-02-07 21:40:05
问题 I would like to receive an event for detecting whenever bluetooth gets paired or unpaired in my device. In the beginning i found http://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html. I followed this blog : http://android-er.blogspot.co.il/2014/12/make-bluetooth-connection-between.html which is quite usefull, but, isn't detecting when a new connection is made. Needless to say, I have no use for bluetooth implementation, which i'm well aware of : final

How to detect whenever my android device gets connected/disconnected from paired bluetooth device

不问归期 提交于 2021-02-07 21:38:26
问题 I would like to receive an event for detecting whenever bluetooth gets paired or unpaired in my device. In the beginning i found http://developer.android.com/reference/android/bluetooth/BluetoothServerSocket.html. I followed this blog : http://android-er.blogspot.co.il/2014/12/make-bluetooth-connection-between.html which is quite usefull, but, isn't detecting when a new connection is made. Needless to say, I have no use for bluetooth implementation, which i'm well aware of : final

Is it possible to use a wiimote as an android game controller?

点点圈 提交于 2021-02-07 20:59:56
问题 I have been interested in using a Wiimote as a controller for Android for a long time. I know this was possible many years ago before the methods for creating an l2cap socket were removed from the Android api. In api 29 (Android 10) methods for creating an l2cap socket were added, so theoretically it should now be possible to to use a Wiimote as a controller. I create and try to connect to the socket like this: BluetoothSocket socket = mWiimote.createInsecureL2capChannel(0x13); socket.connect

Is it possible to use a wiimote as an android game controller?

∥☆過路亽.° 提交于 2021-02-07 20:59:24
问题 I have been interested in using a Wiimote as a controller for Android for a long time. I know this was possible many years ago before the methods for creating an l2cap socket were removed from the Android api. In api 29 (Android 10) methods for creating an l2cap socket were added, so theoretically it should now be possible to to use a Wiimote as a controller. I create and try to connect to the socket like this: BluetoothSocket socket = mWiimote.createInsecureL2capChannel(0x13); socket.connect