bluetooth

Linux BlueZ custom Manufacturing Scan Response Data

依然范特西╮ 提交于 2021-02-20 04:10:05
问题 I have a custom GATT Server working as a plugin using BlueZ 4.101 on Linux. I am now trying to set custom Scan Response advertising data. I am using LightBlue on iOS to debug my GATT Server and advertising parameters. I tried the following code, and LightBlue can see the Advertising Payload and Device Name, but not the Scan Response data. How do I set custom Scan Response data with BlueZ? Thanks. # BLE Name echo "<GATT SERVER> Setting BLE Advertising Name..." btmgmt -i $BLUETOOTH_DEVICE name

Linux BlueZ custom Manufacturing Scan Response Data

大憨熊 提交于 2021-02-20 04:07:04
问题 I have a custom GATT Server working as a plugin using BlueZ 4.101 on Linux. I am now trying to set custom Scan Response advertising data. I am using LightBlue on iOS to debug my GATT Server and advertising parameters. I tried the following code, and LightBlue can see the Advertising Payload and Device Name, but not the Scan Response data. How do I set custom Scan Response data with BlueZ? Thanks. # BLE Name echo "<GATT SERVER> Setting BLE Advertising Name..." btmgmt -i $BLUETOOTH_DEVICE name

Linux BlueZ custom Manufacturing Scan Response Data

谁都会走 提交于 2021-02-20 04:05:19
问题 I have a custom GATT Server working as a plugin using BlueZ 4.101 on Linux. I am now trying to set custom Scan Response advertising data. I am using LightBlue on iOS to debug my GATT Server and advertising parameters. I tried the following code, and LightBlue can see the Advertising Payload and Device Name, but not the Scan Response data. How do I set custom Scan Response data with BlueZ? Thanks. # BLE Name echo "<GATT SERVER> Setting BLE Advertising Name..." btmgmt -i $BLUETOOTH_DEVICE name

How to programmatically share multiple files of different MIME types within the same Android intent?

这一生的挚爱 提交于 2021-02-20 03:51:43
问题 I am working on an Android application that is already successfully sharing a generated PDF file via Bluetooth using the following method: public static void sharePdfFile(Context ctx, String pathAndFile) { try { Intent share = new Intent(Intent.ACTION_SEND); share.setPackage("com.android.bluetooth"); share.setType("application/pdf"); share.putExtra(Intent.EXTRA_STREAM, Uri.parse(pathAndFile)); share.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ctx.startActivity(share); } catch (Exception e) {

How to programmatically share multiple files of different MIME types within the same Android intent?

匆匆过客 提交于 2021-02-20 03:51:22
问题 I am working on an Android application that is already successfully sharing a generated PDF file via Bluetooth using the following method: public static void sharePdfFile(Context ctx, String pathAndFile) { try { Intent share = new Intent(Intent.ACTION_SEND); share.setPackage("com.android.bluetooth"); share.setType("application/pdf"); share.putExtra(Intent.EXTRA_STREAM, Uri.parse(pathAndFile)); share.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ctx.startActivity(share); } catch (Exception e) {

Does Bluetooth 5 implements BR/EDR natively?

与世无争的帅哥 提交于 2021-02-19 04:04:17
问题 I can't find a proper answer on the Internet. The Bluetooth Basic Rate / Enhanced Data Rate (BR/EDR) appeared with the 2.0 Bluetooth Core Specification to improve data rate transfers. The Bluetooth Low Energy (BLE) appeared with the 4.0 Bluetooth Core Specification to improve consumption in the IoT field. Yet, to make those two modes work together (BLE & BR/EDR) you had to use a "Smart Ready" module (or dual-mode specific module). Today, we have the Bluetooth 5. I don't quite understand if,

How do you pin point the location of a user with 3 nodes, using Triangulation?

泄露秘密 提交于 2021-02-18 19:34:25
问题 I am trying to find a user through their Bluetooth strength (RSSI value). I have 3 Raspberry PIs, each gathering the signal strength of the user. Lets say the nodes returned: node1 = 65 node2 = 70 node3 = 75 How would I find the user through triangulation and pin point them on a map, and output the RSSI value? I have researched Trilateration and Ceva's Theorem but do not know how to implement them. I am unsure on how to locate the nodes in an environment, do I give the main node a location of

How do you pin point the location of a user with 3 nodes, using Triangulation?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-18 19:34:05
问题 I am trying to find a user through their Bluetooth strength (RSSI value). I have 3 Raspberry PIs, each gathering the signal strength of the user. Lets say the nodes returned: node1 = 65 node2 = 70 node3 = 75 How would I find the user through triangulation and pin point them on a map, and output the RSSI value? I have researched Trilateration and Ceva's Theorem but do not know how to implement them. I am unsure on how to locate the nodes in an environment, do I give the main node a location of

Communicating via Bluetooth serial with Python

▼魔方 西西 提交于 2021-02-18 12:51:14
问题 How do you process and receive serial data via Bluetooth and Python? I'm trying to make a simple Python server that access data via Bluetooth as explained here. My server.py file, which sends a random number when sent the text "temp", is: #!/usr/bin/env python import os import glob import time import random from bluetooth import * def read_temp(): return random.random() server_sock=BluetoothSocket( RFCOMM ) server_sock.bind(("",PORT_ANY)) server_sock.listen(1) port = server_sock.getsockname()

Android Bluetooth StartDiscovery() always returns false

落爺英雄遲暮 提交于 2021-02-18 12:16:04
问题 I am trying to discover bluetooth devices nearby, but startDiscovery() always returns false, as if it is not working. Therefore it is not able to find devices. I saw that i have to include Coarse_Location permission apart from Bluetooth and Bluetooth_Admin, but anyway, it doesn´t work. Here is the code I am trying right now, where there are mainly traces to see how it works: public class BluetoothActivity extends AppCompatActivity { RecyclerView recyclerView; ArrayList<BluetoothDevice>