bluez

How to encrypt data using BLE connection using Bluez5.50

主宰稳场 提交于 2019-12-08 07:31:01
问题 I'm working on a C++ project that deals with data transmission. My system is composed of two different devices, that have to exchange sensitive data in a trusted mode. To do this I downloaded and set up the last bluez library (v5.50) on my Raspberry Pi. Is there any possibility to enable data encryption using the bluez API? Googling around the possibility to use the BLE encryption mechanism I found discordant opinions. Someone suggests using it while others one discourage it in favor of

How to make Android BLE connect to Bluez Peripheral? (Connection issues)

痞子三分冷 提交于 2019-12-08 06:44:50
问题 I am trying to connect my Nexus 5 (Android 6.0.1) smartphone to my desktop computer (Ubuntu 15.04 64-bit with BlueZ 5.36) using Bluetooth Low Energy. I use a BT 4.0 USB dongle with a CSR BC8510 chipset. The setup did actually work just a couple of days ago. Then I switched to a Broadcom USB dongle and it started to become unstable. Connecting became slow and started to fail. It now does not work anymore at all even though I switched back to the CSR dongle and a different Ubuntu machine (still

Python PyBluez connecting to passkey protected device

孤街醉人 提交于 2019-12-08 05:20:59
问题 I'm working on an application in Python (currently 2.7, can switch to 3.3 if necessary) that is supposed to: Detect bluetooth device (finger clip pulse oximeter, if you're interested). Establish connection with device (which is passkey protected) Stream data from the device to my computer Do more (currenly irrelevant) programming with the data To accomplish this, I'm using the PyBluez library for Python, as it is probably the most documented library I've found (which sadly is still quite

Does AirLocate only look for particular UUIDs?

ぐ巨炮叔叔 提交于 2019-12-08 03:52:43
问题 I've been testing some iBeacons -- hen I set the UUID of the beacon to something other than the default it isn't picked up by AirLocate. Is AirLocate only looking for particular beacon UUIDs or am I doing something wrong? Thanks! 回答1: AirLocate works differently depending on whether you are ranging or monitoring. When you are monitoring, you can choose from any one of eight built-in ProximityUUIDs to monitor, and you can optionally also choose to monitor based on a major and minor identifier.

How to use dbus-send to call org.bluez.Adapter1.StartDiscovery?

谁说我不能喝 提交于 2019-12-08 03:29:31
I am trying to interact with Bluez 5.44 using the dbus-send command line tool. I cannot seem to get it to start discovery properly, although it works fine when I use bluetoothctl 's scan on and scan off commands. I can also start and stop discovery using d-feet . I've tried powering off and on prior to issuing the command, but it doesn't seem to get discovery started. The command line I'm using is: dbus-send --system --type=method_call --print-reply --dest=org.bluez \ /org/bluez/hci0 \ org.bluez.Adapter1.StartDiscovery What I usually get upon issuing this command is from dbus-monitor is that

DBUS APIs in BLUEZ

倖福魔咒の 提交于 2019-12-07 16:49:01
问题 I am new to BLUEZ as well as linux. I found that Bluez promotes usage of DBUS APIs. I want to know whats a DBUS API in terms of BLUEZ also, whats the benefit of using them instead of direct C APIS? How different is it as compared to C APIs? 回答1: From my own experience: DBUS apis are the officially published ones so are more likely to be stable, maintained and documented. The C apis are a bit more low level and it's not always obvious how they can be used (beyond simple discover). The C apis

Bluez implementation in android

六月ゝ 毕业季﹏ 提交于 2019-12-06 14:41:20
问题 Can anyone please provide us any source code for bluez implementation in android. Actually we are trying to make an application with GATT profile. This android application should connect with other device by Bluetooth connection. Please suggest me what should be the best way to send data to a non android device. 回答1: Look at Bluetooth chat example by Google, you also can use the same method to connect to a non android device. Specifically you will need this api device

Bluetooth communication between Arduino and PyBluez

天涯浪子 提交于 2019-12-06 13:50:35
问题 I am trying to establish bluetooth communication between an Arduino Uno board (with a bluetooth shield) and my Linux OS, using Python PyBluez. I've successfully paired my laptop to the Uno. I'm able to connect to the board, however the board is not reading the data being sent nor is it able to send data. Here is the Arduino Sketch #include <SoftwareSerial.h> #define RxD 0 //receive data on digital 0 #define TxD 1 //transmit on digital 1 SoftwareSerial blueToothSerial(RxD, TxD); int counter =

How to get Disconnect Event from GATT Server on Bluez/Linux

前提是你 提交于 2019-12-06 07:12:16
Environment: Bluez 5.14, Linux 3.1, USB Plugable BLE radio, TI BLE keyfob (CC2541 dev kit) Linux Device <---hci----> USB BLE Radio We enabled key press events on TI keyfob using gatttool and started to listen for events gatttool -b [hardware ID] --char-write-req -a [handle] -n [value] --listen (gatttool -b 90:59:AF:09:E1:5D --char-write-req -a 0x0048 -n 0100 --listen) Pressing buttons on the keyfob and see these events Notification handle = 0x0047 value: 02 Notification handle = 0x0047 value: 00 Notification handle = 0x0047 value: 02 Hence we can receive the key press events from the Keyfob

How to scan for Bluetooth low energy devices using bluez API

試著忘記壹切 提交于 2019-12-06 04:00:01
问题 I'm new in programming Bluetooth low energy using BlueZ. I want to develop a native code c to scan nearby devices using a BlueZ API for Bluetooth low energy under Android 4.0.3. Anyone know which BlueZ methods I should use? 回答1: If you're looking to write native c code to scan BLE devices, your best option would be to get the bluez package from here and look at how that is implemented. For scanning for devices, see the /tools/hcitool.c source file, specifically the function static void cmd